All of lore.kernel.org
 help / color / mirror / Atom feed
* snat and ICMP question
@ 2002-10-03 10:20 Ciaran Deignan
  2002-10-03 12:36 ` Ciaran Deignan
  0 siblings, 1 reply; 9+ messages in thread
From: Ciaran Deignan @ 2002-10-03 10:20 UTC (permalink / raw)
  To: netfilter; +Cc: Matthieu Marc


Hi All,

I have a problem with ICMP (destination-unreachable /
fragmentation needed) packets not bieng NAT-ed correctly
with a specific SNAT configuration.

I have an IPsec tunnel (frees/wan), and I need to source-nat
everything that comes out of the tunnel (strange routing
problem).

I'm using the following configuration

iptables -t mangle -A PREROUTING --in-interface ipsec+ \
                        -j MARK --set-mark 1
iptables -t nat -A POSTROUTING -m mark --mark 1 \
                                -j MASQUERADE

However the IPsec tunnel had an MTU of 1400, slightly less 
than the ehternet packet. When a user requests a large
web page (for example), the web server send big packets,
and an ICMP error is generated by the NAT-ing node. However
the ICMP packet contains the real destination address, not
the address of the NAT device... The web server ignores the
ICMP error, which is normal.

I'm using iptables v1.2.5. I've noticed that there is
a DNAT / ICMP correction in 1.2.7a. I'm going to download
and test this new version, but I suspect that the behaviour
will be the same.

Has anybody previously encountered this sort of problem?
How can I tell iptables to NAT inside ICMP packets that are
generated locally but that concern connections coming
from the tunnel? I suppose it would work if I just
masquraded everything going through any interface,
but that seems a bit drastic...

Thanks for any pointers,
Ciaran

-- 
+---------------------------------------------------------+
Ciaran Deignan                              04 38 49 87 27

Netcelo SA - IPsec VPN Solutions    http://www.netcelo.com/
18-20 rue Henri Barbusse - BP 2501, 38035 Grenoble Cedex 2
+---------------------------------------------------------+


^ permalink raw reply	[flat|nested] 9+ messages in thread
* snat and ICMP question
@ 2002-10-08 16:52 Ciaran Deignan
  2002-10-08 19:00 ` Marian Stagarescu
  0 siblings, 1 reply; 9+ messages in thread
From: Ciaran Deignan @ 2002-10-08 16:52 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Matthieu Marc



Hi All,

I asked this question on the normal netfilter mailing-list.
Either I outlined the problem badly, or I'm beyond help :)

I have a problem with ICMP (destination-unreachable /
fragmentation needed) packets not bieng NAT-ed correctly
with a specific SNAT configuration.

I have an IPsec tunnel (frees/wan), and I need to source-nat
everything that comes out of the tunnel (strange routing
problem).

I'm using the following configuration

iptables -t mangle -A PREROUTING --in-interface ipsec+ \
                        -j MARK --set-mark 1
iptables -t nat -A POSTROUTING -m mark --mark 1 \
                                -j MASQUERADE

However the IPsec tunnel had an MTU of 1400, slightly less 
than the ethernet packet. When a user requests a large
web page (for example), the web server send big packets,
and an ICMP error is generated by the NAT-ing node. However
the ICMP packet contains the real destination address, not
the address of the NAT device... The web server ignores the
ICMP error, which is normal.

I'm using iptables v1.2.7a with a 2.4.17 kernel. I haven't
tried anding any additional patches.

Has anybody previously encountered this sort of problem?
How can I tell iptables to NAT inside ICMP packets that are
generated locally but that concern connections coming
from the tunnel? I suppose it would work if I just
masquraded everything going through any interface,
but that seems a bit drastic...

Thanks for any pointers,
Ciaran

-- 
+---------------------------------------------------------+
Ciaran Deignan                              04 38 49 87 27

Netcelo SA - IPsec VPN Solutions    http://www.netcelo.com/
18-20 rue Henri Barbusse - BP 2501, 38035 Grenoble Cedex 2
+---------------------------------------------------------+

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-10-10 10:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-03 10:20 snat and ICMP question Ciaran Deignan
2002-10-03 12:36 ` Ciaran Deignan
  -- strict thread matches above, loose matches on Subject: below --
2002-10-08 16:52 Ciaran Deignan
2002-10-08 19:00 ` Marian Stagarescu
2002-10-09 10:11   ` Ciaran Deignan
2002-10-09 11:16     ` Ciaran Deignan
2002-10-09 13:34       ` Marian Stagarescu
2002-10-10 10:23         ` Ciaran Deignan
2002-10-10 10:41           ` Balazs Scheidler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.