From: "John A. Sullivan III" <john.sullivan@nexusmgmt.com>
To: Jason Opperisano <opie@817west.com>
Cc: Netfilter users list <netfilter@lists.netfilter.org>
Subject: Re: protocol 50 unreachable
Date: Wed, 01 Dec 2004 23:03:01 -0500 [thread overview]
Message-ID: <1101960180.2025.116.camel@localhost> (raw)
In-Reply-To: <1101947339.22517.9.camel@hubcap.ljm.dom>
On Wed, 2004-12-01 at 19:29, Jason Opperisano wrote:
> On Wed, 2004-12-01 at 17:51, Helge Weissig wrote:
> <snip>
> > Here is my current iptables configuration
> >
> > $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
> >
> > echo "Enabling PORTFW Redirection on the external LAN.."
> > $IPTABLES -A FORWARD -i $EXTIF -o $INTIF -p esp -j ACCEPT
> > $IPTABLES -A PREROUTING -t nat -d $VPN_SERVER -p esp -j DNAT \
> > --to-destination $VPN_CLIENT
>
> what on earth is that rule supposed to accomplish? it's says "any esp
> packet destined for $VPN_SERVER should be destination translated to
> $VPN_CLIENT."
>
> if this is the firewall in front of $VPN_CLIENT (which it sounds like it
> is), you have created (for lack of a better term) a packet reflector.
> any esp packet sent from VPN client to VPN server will be spit back at
> the VPN client.
>
> > echo " FWD: Allow all connections OUT and only existing and related
> > ones IN"
> > $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
> >
> > echo " Enabling SNAT (MASQUERADE) functionality on $EXTIF"
> > $IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
> >
> > here is the tcpdump info I see on $EXTIF:
> >
> > 10:23:09.234937 (vpn server ip) > (my ip): ESP(spi=0x00000000,seq=0x0)
> > 10:23:09.235055 (my ip) > (vpn server ip): icmp: (my ip) protocol 50
> > unreachable [tos 0xc0]
> >
> > (these are empty packets sent by nmap but it looks the same for legit
> > ones coming from the vpn server ip). FWIW, when the ipsec tunnel is
> > established and I try to ping the a host behind the vpn server, I see
> > the outgoing packets on all three interfaces, but not response.
> >
> > thanks for any information or pointers in advance!
> > h.
>
> simplify:
>
> # start fresh
> for t in mangle nat filter; do
> iptables -t $t -F
> iptables -t $t -X
> iptables -t $t -Z
> done
> for c in INPUT FORWARD OUTPUT; do
> iptables -P $c ACCEPT
> done
>
> # hide-nat outbound traffic
> iptables -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
>
> # ip forwarding
> sysctl -w net.ipv4.ip_forward=1
>
> try and connect with your VPN client to your VPN server with that
> script. if you can't connect--it's more likely an IPSec configuration
> detail that your missing.
<snip>
I don't think this is quite right, Jason. It is possible that the other
side of the tunnel will need to initiate traffic once the tunnel is
established. Thus, there may be inbound packets on ip/50 that are not
associated with any entry in the connection tracking table. Thus he
does need the specific port forwarding DNAT rule.
I believe you are correct that he does need to qualify the interface,
i.e., the DNAT rule should only apply to traffic where -i $EXTIF lest he
have the reflector effect. In fact, I'm surprised that he saw the ESP
pings going through. I would have thought they would have been
reflected. Nonetheless, Helge, you should qualify the interface. See
if that helps.
If that doesn't work, I would suggest placing log rules at strategic
points in the rule set to find out what the packet looks like just
before the -p esp -j ACCEPT rule to find out why it doesn't match. I
assume this is not the entire rule set, e.g., somewhere I would imagine
you change the INPUT and OUTPUT policies to DROP.
Is there any chance that one of the variables is set incorrectly, e.g.,
$VPN_CLIENT or $VPN_SERVER?
--
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 4:03 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
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 [this message]
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=1101960180.2025.116.camel@localhost \
--to=john.sullivan@nexusmgmt.com \
--cc=netfilter@lists.netfilter.org \
--cc=opie@817west.com \
/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.