1

I have dedicated server in OVH. Recently I bought additional IP for my server. Default/main IP is on eth0 interface, both TCP and UDP works fine, no problems.

I followed OVH tutorial how to add additional IP and it went ok, but on that new IP on eth0:1 interface only TCP traffic works. For example my SSH server is binded to 22 port on all hosts *:22 since SSH server is TCP, I can connect to that via both IP, but I have some other UDP applications that are binded to all hosts, but it's only available via main/default IP via eth0. Strange thing is when I bind UDP application to secondary IP, it is available for secondary IP, which is normal and of course it's not available for main/default IP.

I want, when I bind any UDP application to all hosts on my dedi server, that I can access to that UDP with all IPs.

Main IP interface: ifconfig eth0

eth0
Link encap:Ethernet  HWaddr 38:60:77:21:53:99
inet addr:xxx.xxx.xxx.xxx  Bcast:xxx.xxx.xxx.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:784160 errors:0 dropped:0 overruns:0 frame:0
TX packets:908805 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:69402450 (66.1 MiB)  TX bytes:171768853 (163.8 MiB)
Interrupt:20 Memory:fe600000-fe620000

Secondary IP interface: ifconfig eth0:1

eth0:1
Link encap:Ethernet  HWaddr 38:60:77:21:53:99
inet addr:yyy.yyy.yyy.yyy  Bcast:yyy.yyy.yyy.yyy Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
Interrupt:20 Memory:fe600000-fe620000

cat /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address xxx.xxx.xxx.xxx
    netmask 255.255.255.0
    network xxx.xxx.xxx.0
    broadcast xxx.xxx.xxx.255
    gateway xxx.xxx.xxx.254
auto eth0:1
iface eth0:1 inet static
    address yyy.yyy.yyy.yyy
    netmask 255.255.255.255
    broadcast yyy.yyy.yyy.yyy

I tried to reboot system (shutdown -r now) but it did not helped. I hope I attached all info, if someone need more info to help, just tell me what command output you need.

Thanks in advance

AngelDeaD
  • 13
  • 3

1 Answers1

1

It's hard to be specific without knowing exactly which software you're using, but it's possible for example that your UDP-based software is finding the first address and binding to that. You might find that it works if you explicitly bind to 0.0.0.0.

  • I tried to bind to 0.0.0.0 but it's not working and that's the main problem. Applications ar Counter Strike 1.6, SA:MP and some other, all UDP-based. None of them work via secondary IP, when I bind to 0.0.0.0. – AngelDeaD Jun 17 '17 at 12:25
  • Does your SSH access work from a remote machine? Are both IP addresses on the same subnet? I notice that your netmask for eth0:1 is 255.255.255.255; that doesn't look correct and might cause weird issues. – James McDonald Jun 17 '17 at 15:32
  • SSH access work via both IP. I'm in south Europe, dedicated is in Paris OVH DC. IPs are not on same subnet. I tried to put netmask 255.255.255.0 but problem is not gone. I'm not network expert. I did same way to add IP just like before, but this is first time that I need UDP on all IPs on my server. What netmask should I put? – AngelDeaD Jun 17 '17 at 16:39
  • 1
    OK, I'm not awake. My answer is wrong. Binding UDP to 0.0.0.0 generally doesn't work because the server doesn't know which address to reply from. Is it possible in your applications to just specify multiple bind IPs? Maybe passing the option several times. That would be the correct solution. If not, your choices are probably limited to running a separate instance of each application bound to each IP (which means your gamers won't play together) or nagging the software vendors to support this. – James McDonald Jun 17 '17 at 18:11
  • Thank you @James McDonald. Its look like my UDP applications do not have option to listen to multi IP, only to one, and thats the only problem. I will try to redirect/forward with iptables from main IP to secondary IP. – AngelDeaD Jun 17 '17 at 19:01