Multiple SNAT source address ranges
I am attempting to create SNAT rules that will round-robin through a series of addresses from different ranges as per the man page. Apparently I am making mistakes with the syntax, as running my script results in some errors. Can someone tell me how I need to structure these rules? Here are some examples of what I have tried:
$IPTABLES -t nat -A POSTROUTING -o $EXT -m state --state NEW -p tcp --dport 80 -j SNAT --to-source 24.28.18.56 --to-source 24.28.18.57 --to-source 24.28.18.58
Or:
$IPTABLES -t nat -A POSTROUTING -o $EXT -m state --state NEW -p tcp --dport 80 -j SNAT --to-source 24.28.18.56-24.28.18.63 --to-source 16.7.15.32-16.7.15.39 --to-source 16.7.87.64-16.7.87.71
How do I specify more than one source address from seperate ranges?
Quoted 2 lines · Kirk Hoganson
I am attempting to create SNAT rules that will round-robin through a series of addresses from different ranges as per the man page.
http://netfilter.org/patch-o-matic/pom-base.html#pom-base-nth
probably does what you need. In fact, its example is round robin SNAT. =)
--Curby