8

My question is simple.

Is it possible to run TWO different game servers using exact same port but on different IP's using same network interface on the same server ?

Does each IP adress have it's own port pool or is it limited to machine's network interface ?

Bartek Szablowski
  • 343
  • 2
  • 3
  • 6
  • 2
    Irrelated, but blocking your site completely to IE users is not particularly fair. If someone want to quickly view the files they shoudln't be *forced* to download another browser or do some trickery. – tombull89 May 16 '13 at 15:18

4 Answers4

12

It is possible. You just have to bind on the right IP address/interface each service using the same port.

Ports (be them UDP or TCP) have their own pool per IP address.

You can listen on the same port if you change: IP address or protocol (UDP or TCP).

See: http://www.bleepingcomputer.com/tutorials/tcp-and-udp-ports-explained/

Heis Spiter
  • 598
  • 7
  • 17
5

Yes. Sockets (IP:Port) come in pairs and have to be unique. You can also bind multiple IPs to a single NIC.

user
  • 1,408
  • 8
  • 10
3

This is easy only if the application supports binding limitations. If it does not then you can put the app into an LXC container if we are talking about Linux or Java (or something running well under WINE). If Windows does not offer something similar then you can use VMs.

Hauke Laging
  • 5,157
  • 2
  • 23
  • 40
2

Yes, that's an entirely valid way to do it. The IP:port combo has to be unique, but you can certainly have port 80 on 1.2.3.4 and on 1.2.3.5.

NickW
  • 10,183
  • 1
  • 18
  • 26