SNAT will only take the servers IP
I have my IPTABLES set up and was going to SNAT to multiple IP's on my network (IE. IPTABLES -t nat -A POSTROUTING -o eth0 -j SNAT --to-source xxx.xxx.xxx.10-xxx.xxx.xxx.50) The only way I can get it to work though is to SNAT --to-source xxx.xxx.xxx.215 which is the IP address of my server. How come I cannot use anymore of my Class C network like I want to?
Does translating to multiple IPs instead of just 1 help with speed any? Thanks for any information.
Signature · 12 lines
Scott Mayo
Technology Coordinator
Bloomfield Schools
PH: 573-568-4564
FA: 573-568-4565
Pager: 800-264-2535 X2549
WindowS
LinUX!
Duct tape is like the force, it has a light side and a dark side and it
holds the universe together.Quoted 8 lines · Scott Mayo
I have my IPTABLES set up and was going to SNAT to multiple IP's on my network (IE. IPTABLES -t nat -A POSTROUTING -o eth0 -j SNAT --to-source xxx.xxx.xxx.10-xxx.xxx.xxx.50) The only way I can get it to work though is to SNAT --to-source xxx.xxx.xxx.215 which is the IP address of my server. How come I cannot use anymore of my Class C network like I want to?
Does translating to multiple IPs instead of just 1 help with speed any? Thanks for any information.
it's because your firewall doesn't answer arp requests for any IP address other than 215. it SNATs the packet, but the upstream router cannot find a MAC address to send the reply packets to. the easiest fix, would be to add IP aliases to your firewall on that interface as part of your iptables script:
i=10
while [ $i -le 50 ]; do
ip address add xxx.xxx.xxx.${i} dev $interface
let "i = $i + 1"
donei am unaware of any "speed" advantage of using multiple IP's for SNAT. there is a speed advantage in using SNAT over MASQUERADE. using multiple SNAT addresses would normally be for scalability (>65000 simultaneous NAT connections), or for functionality purposes.
HTH...
-j
Signature · 1 line
Jason Opperisano <[email protected]>