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

Link encap:Ethernet  HWaddr 38:60:77:21:53:99
inet addr:xxx.xxx.xxx.xxx  Bcast:xxx.xxx.xxx.255  Mask:
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

Link encap:Ethernet  HWaddr 38:60:77:21:53:99
inet addr:yyy.yyy.yyy.yyy  Bcast:yyy.yyy.yyy.yyy Mask:
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
    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
    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


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

  • I tried to bind to 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 – 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; 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 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 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.