Skip to contentSkip to conversation

difference between MASQ and SNAT in iptables

DISCUSSION urgrue 1 participant 1 message Jun 19, 2002

lore
Share & tools
lore

urgrue

author
#0 lore raw

why is there the MASQUERADE target at all, if SNAT can do the same thing? it seems both of these rules have the same exact effect:
iptables -t nat -A POSTROUTING -s 1.0.0.0/24 -o eth0 -j MASQUERADE iptables -t nat -A POSTROUTING -s 1.0.0.0/24 -o eth0 -j SNAT --to-source <external ip>

is there any difference?