0

I have been thinking about the problem for a few days now, maybe you guys can give me some sensible suggestions. Networking is a bit of a new topic for me and I may be confusing some concepts.

I need to connect 10 devices with the same IP (I can't change it). I want to be able to talk to them simultaneously.

The effect I want to achieve is as follows:

192.168.0.1 -> 10.0.0.250 on physical port 1

192.168.1.1 -> 10.0.0.250 on physical port 2

...

192.168.9.1 -> 10.0.0.250 on physical port 10

Is this possible?

I was thinking to create 10 VLANs, each in a different class and use the address of that class to indicate where the packet should go. Then change the source and destination IP and it is done. However, it is not that easy, in POSTROUTING you can only change the source IP, in the other direction the problem is similar - destination IP only in PREROUTING. I cannot change the IP in the FORWARD table, because it will go to the wrong interface. Besides, I wonder how ARP will work in all this. Even if I managed to change both IPs in POSTROUTING, will the MAC be entered correctly or is there no such option?

Of course, I'm not counting on a ready-made solution, but any tips on what I should read will be invaluable.

Thanks in advance and best regards.

  • IPTABLES SUPPORT AND NETWORKING IS OFF-TOPIC. Support questions may be asked on https://superuser.com. Use this tag only for questions on programming with iptables. Questions about configuring iptables should be asked on Server Fault (https://serverfault.com/tour). – Rob Oct 27 '21 at 09:34

1 Answers1

0

Network Address Translation (NAT) allows a single device, such as a router, to act as an agent between the Internet (or public network) and a local network (or private network), which means that only a single unique IP address is required to represent an entire group of computers to anything outside their network.

ADDRESS TRANSLATION (NAT) OVERLOAD allows your 10 devices to communicate with your router. Each device has unique private IP address.

Above scenario is only applicable if your 10 devices act as a client.

If your 10 devices acts as a server then the solution is “Port forwarding”.

Port forwarding is needed when a machine on the Internet needs to initiate a connection to a machine that's behind a firewall or NAT router.

Refer video for detail information. https://www.youtube.com/watch?v=-K6jMYBfuIY

Prasad 14723312
  • 539
  • 1
  • 3
  • 14