Hi,
We have a router and devices for testing. We route devices with below command
iptables -t nat -A PREROUTING -p tcp -d 0/0 --dport 80 -s 10.111.111.22 -j DNAT --to-destination 10.13.0.16:3128
where 10.111.111.22 is device IP. and 10.13.0.16 is our Linux box machine.
Likewise we are having 20 devices so 20 different IPs.
So, the issue is each time we need to copy paste above command with different device IP address.
My question is will someone please point me to command where I can have 5-6 device ip addresses together so, I can route 5-6 devices symultaniously?
I tried below but failed
iptables -t nat -A PREROUTING -p tcp -d 0/0 --dport 80 -s 10.111.111.22,10.111.111.23 -j DNAT --to-destination 10.13.0.16:3128
iptables -t nat -A PREROUTING -p tcp -d 0/0 --dport 80 -source 10.111.111.22,10.111.111.23 -j DNAT --to-destination 10.13.0.16:3128
iptables -t nat -A PREROUTING -p tcp -d 0/0 --dport 80 -source 10.111.111.22 10.111.111.23 -j DNAT --to-destination 10.13.0.16:3128
Please help me in this case.