Skip to contentSkip to conversation

Differences between MASQ and SNAT

DISCUSSION Jimmy Hedman 2 participants 2 messages Feb 9, 2004 – Feb 10, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,
What's the REAL differences between MASQ and SNAT? I've had a problem where it didn't work with SNAT but it did work with MASQ... The setup was two firewalls (A and B) with a Ipsec tunnel between them and and another VPN onward from B. The old setup was to masquerade all the traffic from site A, even the traffic out on the VPN between FW A and FW B. Due to some other changes i had to remove the masquerade for traffic the over the VPN and do SNAT on FW B instead. This worked for everything but one machine. If i turned on MASQ for that machine on FW A everything worked again which made me puzzled what MASQ is doing that SNAT isn't.

So, does MASQ do anything that SNAT doesn't in form of changing the header or such? Or should i find the answer in the Windows machine that was putting up the fight?

// Jimmy

Signature · 4 lines
Jimmy Hedman                       South Pole AB
Phone:  +46 8 51420420             Gelbjutarvägen 5
Fax:    +46 8 51420429             SE - 17148 Solna 
e-mail: [email protected]  www.southpole.se
#1 lore raw
Quoted 1 line · Jimmy Hedman

What's the REAL differences between MASQ and SNAT?

MASQ kills the connections whenthe IP address of the interface changes, SNAT does not.

MASQ is limited in what kind of NAT transform it can perform. SNAT gives some more freedom in what addresses is used for the NAT.

Other than this the two are supposed to be the same, and I do not see how they can be any different as all the targets does is to set up the NAT transform. The actual NAT is always the same.

Regards
Henrik