Bind multiple ips to SA:MP server
#1

Hi. I have a server which has 2 ips. The problem is that samp only responds to the default eth0 ip, not the requesting ip.

For example, supposing I have two ips assigned to the same server: 1.1.1.1 and 2.2.2.2. The first is the default.

When I query to the first IP (using samp client), when dumping packets I get the following:

Code:
[my ip] > 1.1.1.1
1.1.1.1 > [my ip]
But when I query server 2.2.2.2, I get:
Code:
[my ip] >2.2.2.2
1.1.1.1 > [my ip]
So, I get a response from 1.1.1.1, but I queried IP 2.2.2.2, not 1.1.1.1!

The only way I got ip 2.2.2.2 responding my request was "bind 2.2.2.2" in server.cfg, but, if I do this, ip 1.1.1.1 stop working.
So, what I need is a way to make SAMP respond to the requesting IP.

I tried running a TS3 server and a Minecraft server, both works as expected (i.e responding to requesting ip).

Note: Both IPs 1.1.1.1 and 2.2.2.2 are OVH failover ips.

I know this is possible, because some servers got it working, see:
- IPs 158.69.137.222:7777 and 198.27.88.127:7777 redirect to the same server (fenixzone 2)
- IPs 167.114.34.10:7777 and 167.114.28.244:7777 also redirect the same server (unplayer)

the machine is running on CentOS 6.
Thanks for reading.
Reply
#2

You can't use it on 2 IPs, you can only bind to the one.


There was someone playing around with some mock-up DDoS mitigation, but that was just a mock-up of some sort that used multiple IPs to pass it through to the right server behind some NAT/IPTables setup.

Don't know what happened to it actually.
Reply
#3

Quote:
Originally Posted by Sew_Sumi
View Post
You can't use it on 2 IPs, you can only bind to the one.


There was someone playing around with some mock-up DDoS mitigation, but that was just a mock-up of some sort that used multiple IPs to pass it through to the right server behind some NAT/IPTables setup.

Don't know what happened to it actually.
I edited the post and added some real-life examples of servers working:

Code:
I know this is possible, because some servers got it working, see:
- IPs 158.69.137.222:7777 and 198.27.88.127:7777 redirect to the same server (fenixzone 2)
- IPs 167.114.34.10:7777 and 167.114.28.244:7777 also redirect the same server (unplayer)
Any idea of how to achieve this using NAT or some iptables magic?
Reply
#4

Those servers must be running on a dedicated machine with multiple IPs allocated to that one single machine. You can order multiple IPs from your provider too for a certain charge per month.

tl;dr - Buy additional IP addresses !

Edit - If you already have 2 IPs and only one works, then contact your service provider. This issue is for them to resolve.
Reply
#5

Yea, pretty sure they are just forwarding the packets via some sort of IPTables, or a network wiz has set up their routing to be crazy.

Quote:
Originally Posted by Mark™
View Post
This issue is for them to resolve.
It's not an issue, it's a question about how it can be done...

Also, be aware he's done exactly how you should be doing it on his machine, and it doesn't work like you are portraying it to be.

IPs from one machine are usually in the same subnet, and these aren't. The multple IPs that you usually get are sequential to make it easier for them to setup.


What they could be using is a cloud based setup, with advanced virtual network config.

In particular look at OVHs vrack setup, with Hybrid options.
Reply
#6

how did you setup your routing? through iptables or?

if you haven't, then can you please describe what you did to do the routing?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)