From: "John A. Sullivan III" <john.sullivan@nexusmgmt.com>
To: Helge Weissig <helgew@grajagan.org>
Cc: Netfilter Mailing List <netfilter@lists.netfilter.org>
Subject: Re: protocol 50 unreachable
Date: Thu, 02 Dec 2004 00:15:47 -0500 [thread overview]
Message-ID: <1101964546.2025.149.camel@localhost> (raw)
In-Reply-To: <Pine.LNX.4.44.0412012017260.22471-100000@gollum.grajagan.net>
On Wed, 2004-12-01 at 23:53, Helge Weissig wrote:
> On Wed, 1 Dec 2004 at 23:12 -0500, Jason Opperisano wrote:
<snip>
> JO> state tracking. in a VPN client -> VPN server scenario the esp packets
> JO> are *always* initiated from the client side:
I don't believe that is true. The tunnel is always initiated from the
client side but the traffic in the tunnel can be initiated from the
remote side.
>
<snip>
> JO> > let's leave the VPN client/server out of the picture to simplify. If I
> JO> > send an ESP packet from somewhere to my external IP address I get the
> JO> > "protocol 50 unreachable" ICMP response. The underlying problem seems to
> JO> > be the primary cause of my troubles, no?
> JO>
> JO> um--no. i have run pretty much every single VPN client/server
> JO> combination in existence, and have never even thought of testing it by
> JO> sending unsolicited IP Protocol 50 packets through a firewall to the VPN
> JO> client behind it. it's the most flawed troubleshooting technique i've
> JO> heard in quite some time...save yourself some time and give up on it.
Why? Helge's methodology is simplifying matters. He's not testing end
to end connectivity. He's testing only one small part, viz., will the
NAT gateway properly forward the packet. It doesn't matter if the
client won't accept it at this stage of testing.
>
> can you be more specific about why you would not expect ESP forwarding to
> work without an IPsec tunnel in place? I am really trying to understand
> this since most suggestions (including the ipchains rules in the netfilter
> documentation) include some FORWARD rules for ip/50.
It should work. It won't be a tunnel but you should see the esp packet
pass through the gateway.
>
<snip>
> I changed my iptables script to the following now to get some logging
> information, but I think I may need help with it:
>
> $IPTABLES -P INPUT ACCEPT
> $IPTABLES -F INPUT
> $IPTABLES -P OUTPUT ACCEPT
> $IPTABLES -F OUTPUT
> $IPTABLES -P FORWARD DROP
> $IPTABLES -F FORWARD
> $IPTABLES -t nat -F
>
> $IPTABLES -A FORWARD -i $EXTIF -o $INTIF -p 50 -j LOG --log-level info \
> --log-prefix 'esp fwd: '
> $IPTABLES -A FORWARD -i $EXTIF -o $INTIF -p 50 -j ACCEPT
> $IPTABLES -A PREROUTING -t nat -p 50 -i $EXTIF -j LOG --log-level info \
> --log-prefix 'esp route: '
> $IPTABLES -A PREROUTING -t nat -p 50 -i $EXTIF -j DNAT \
> --to-destination $VPN_CLIENT
>
> $IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state \
> --state ESTABLISHED,RELATED -j ACCEPT
> $IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
> $IPTABLES -A FORWARD -j LOG --log-level info --log-prefix 'dropped: '
> $IPTABLES -A FORWARD -j DROP
>
> $IPTABLES -t nat -A POSTROUTING -o $EXTIF -j LOG --log-level info \
> --log-prefix 'masq: '
> $IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
>
> Basically, I only ever see log entries from the postrouting chain. I also
> do not see ESP packets going from INTIF to EXTIF contrary to what I
> thought. So with the VPN "up" (how do I check for encryption for example)
> and packets coming in from the server, they don't get to INTIF. Pinging a
> host on VPN shows ESP packets getting to INTIF but no further. If I ping
> the server itself from the VPN client, i.e. not through the tunnel, all
> three interfaces report outgoing and incoming traffic.
<snip>
Interesting. You've showed us what you think you have. Would you
kindly show us what you do have.
Do a
iptables -v -n -t nat -L
iptables -v -n -L FORWARD
iptables -v -n -L INPUT
If I'm following this correctly, the esp packets should hit your NAT
rule and have the destination changed. It should then hit the routing
table which will determine that the packet is not local and send it to
the FORWARD chain. If you are not logging packets on the FORWARD chain,
perhaps the match is wrong. Try a generic log rule for all packets and
see what the packets look like on the FORWARD chain. Do they match the
rules dumped in the above list? - John
--
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
john.sullivan@nexusmgmt.com
---
If you are interested in helping to develop a GPL enterprise class
VPN/Firewall/Security device management console, please visit
http://iscs.sourceforge.net
next prev parent reply other threads:[~2004-12-02 5:15 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-01 22:51 protocol 50 unreachable Helge Weissig
2004-12-01 23:59 ` John A. Sullivan III
2004-12-02 0:07 ` Helge Weissig
2004-12-02 0:29 ` Jason Opperisano
2004-12-02 3:29 ` Helge Weissig
2004-12-02 3:46 ` Jason Opperisano
2004-12-02 4:00 ` Helge Weissig
2004-12-02 4:09 ` John A. Sullivan III
2004-12-02 4:12 ` Jason Opperisano
2004-12-02 4:53 ` Helge Weissig
2004-12-02 5:15 ` John A. Sullivan III [this message]
2004-12-02 5:44 ` Helge Weissig
2004-12-02 15:14 ` Jason Opperisano
2004-12-02 15:13 ` Helge Weissig
2004-12-02 17:25 ` Jason Opperisano
2004-12-02 18:22 ` Helge Weissig
2004-12-02 18:54 ` John A. Sullivan III
2004-12-02 20:11 ` Jason Opperisano
2004-12-02 19:26 ` Helge Weissig
2004-12-02 20:56 ` Jason Opperisano
2004-12-02 20:12 ` Helge Weissig
2004-12-02 21:30 ` Jason Opperisano
2004-12-03 6:35 ` Philip Craig
2004-12-03 17:11 ` Helge Weissig
2004-12-04 2:20 ` Alistair Tonner
2004-12-04 2:35 ` Jason Opperisano
2004-12-04 3:03 ` Helge Weissig
2004-12-02 4:03 ` John A. Sullivan III
2004-12-04 17:07 ` Helge Weissig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1101964546.2025.149.camel@localhost \
--to=john.sullivan@nexusmgmt.com \
--cc=helgew@grajagan.org \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.