Port Forwarding
I am trying to setup communication between a Windows based SNMP management application and another Windows based device simulator software.
In order for the management application to consider devices to be unique, it needs them to have unique IP Addresses. However, the device simulator software implements multiple simulated devices by listening on only one IP, but assigning a unique port to each simulated device.
I figured I should be able to use NAT/port forwarding using a dual-NIC Fedora Linux box and forward/translate packets as follows:
10.0.0.1:161 -> 192.168.1.1:6001
10.0.0.2:161 -> 192.168.1.1:6002
.
.
10.0.0.100:161 -> 192.168.1.1:6100
On the Linux box, eth0 is connected to the 192.168.1.x subnet and eth1 is connected to the 10.0.x.x subnet. I have created these 10.0.0.x virtual IPs using eth1:0, eth1:1, etc virtual interfaces. I have been trying to understand how to achieve this using iptables but cannot get this to work properly.
I would greatly appreciate any suggestions. Thanks!
|