Link to home
Create AccountLog in
Networking Hardware-Other

Networking Hardware-Other

--

Questions

--

Followers

Top Experts

Avatar of Yasir Arf
Yasir Arf🇨🇦

How to Do Port Forwarding To Multiple Devices on the Same Port
How can I forward internal and external ports with the same port numbers 34001-34009 using TCP/UDP to two different gaming computers in the same LAN with static IP? I tried but got the following message "I cannot create a rule with the same protocol and external port as an existing rule" one Pc is fine working with port forward but cannot set up 2nd Pc I have to manually change IP in Port forward rules to make the 2nd Pc work but then the 1st one goes down. please advise if there's any solution or workaround. thanks

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of CompProbSolvCompProbSolv🇺🇸

How are you expecting your router to know which device should get the incoming packet?  I don't think that most (any?) routers will duplicate the packet for you.


You'll need to have different incoming port numbers for the different computers.


Avatar of Yasir ArfYasir Arf🇨🇦

ASKER

I think the only solution I can think of is to get multiple WANs with multi wan routers and setup both computers on separate LANs, lets's see what other experts says, there might be a better solution out there.

You may be able to use SNI if the TCP connections are TLS based. use a tool like HAproxy configured for this.

Otherwise if the packets have some other host indication like in HTTP then you can use the Host: header to forward. traffic.

Again HAproxy can be your friend.  For other protocols you may need to build a proxy yourself.

otherwise you have to assign each of the servers a unique port and use that.


Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of Yasir ArfYasir Arf🇨🇦

ASKER

Hi Noci, port forwarding is needed for the games with an exact port numbers they don't have any alternate ports so I am not sure if the TCP is TLS based or any header details not sure about it

In that case you have no real solution. to connect a single port to various systems behind it, there must be a way to identify those backend systems.


I'm guessing that you are trying to do a load-balancing or failover setup but that's not how that works.

In your case the solution is it to have different external IPs for each internal device.

So incoming port 34001 from WAN1 forwards to internal PC1

And incoming port 34001 from WAN2 forwards to PC2.

Load-balancing and failover is a whole other structure.

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Hi,

This is a common problem when forwarding ports to two different internal devices with the same port numbers. The best solution is to assign different internal port numbers for each computer.

For example, you can assign port 34001 to one computer, and port 34002 to the other computer. Then, you can set up the port forwarding rules in your router with the external port being 34001 and the internal port being 34001 for the first computer, and the same with port 34002 for the second computer. This way, both computers can have the same external port number, but different internal port numbers, which will be forwarded to the correct internal device.

Cheers

This question needs an answer!
Looks like this question is still being worked on. Think you can help?
Create your account and start contributing!
Create Account
Networking Hardware-Other

Networking Hardware-Other

--

Questions

--

Followers

Top Experts

Networking hardware includes the physical devices facilitating the use of a computer network. Typically, networking hardware includes gateways, routers, network bridges, modems, wireless access points, networking cables, line drivers, switches, hubs, and repeaters. But it also includes hybrid network devices such as multilayer switches, protocol converters, bridge routers, proxy servers, firewalls, network address translators, multiplexers, network interface controllers, wireless network interface controllers, ISDN terminal adapters and other related hardware.