From: David A Golden <david@hyperbolic.net>
To: netfilter@lists.netfilter.org
Subject: Re: IPSec passthrough with iptables
Date: Tue, 15 Oct 2002 23:45:18 -0400 [thread overview]
Message-ID: <5.1.0.14.2.20021015233540.03a36008@secure.hyperbolic.net> (raw)
In-Reply-To: <200210151300.g9FD0vL23616@vulcan.rissington.net>
Just to muddy the waters, through experimentation, I have found that using
Checkpoint SecuRemote (on windows) behind a Linux netfilter firewall, I can
achieve an IPSEC connection using just:
iptables -A FORWARD -s $INTERNAL_NET -j ACCEPT
iptables -A FORWARD -d $INTERNAL_NET -m state --state ESTABLISHED,RELATED \
-j ACCEPT
I.e. explicit per-protocol forwarding seems unnecessary. (Though you might
want to be explicit for security/control reasons.) [Note, no UDP
encapsulation, either]
I do experience weird time-outs occasionally, apparently connected to
incoming IKE packets (UDP port 500) that aren't recognized as connected,
but I can get around this by just accepting them to the firewall, which
does nothing as there is nothing running on that port. (I'm trying
variations of reject/drop to see if there is a better way to reply.)
Regards,
David
At 09:00 AM 10/15/2002, Antony Stone wrote:
>On Tuesday 15 October 2002 12:09 pm, George Agnelli wrote:
>
> > I'm having a similar problem and am not very experienced yet with iptables.
> >
> > > Make sure you are forwarding (both ways :-) protocol 50 (ESP), protocol
> > > 51 (AH) and UDP sport 500 / dport 500 (IKE).
> >
> > Could you show me the best way to write this in iptables syntax?
>
>iptables -A FORWARD -p esp -j ACCEPT
>iptables -A FORWARD -p ah -j ACCEPT
>iptables -A FORWARD -p udp --sport 500 --dport 500 -j ACCEPT
>
>You may wish to add some -s and/or -d source & destination address
>restrictions on the above rules, eg:
>
>iptables -A FORWARD -p esp -s a.b.c.d -d w.x.y.z -j ACCEPT
>iptables -A FORWARD -p esp -s w.x.y.z -d a.b.c.d -j ACCEPT
>
>where a.b.c.d and w.x.y.z are the two IPsec gateways which need to
>communicate.
>
>Antony.
next prev parent reply other threads:[~2002-10-16 3:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-15 4:47 IPSec passthrough with iptables Thomas Smith
2002-10-15 8:22 ` Antony Stone
2002-10-15 11:09 ` George Agnelli
2002-10-15 13:00 ` Antony Stone
2002-10-16 3:45 ` David A Golden [this message]
2002-10-16 8:41 ` Antony Stone
-- strict thread matches above, loose matches on Subject: below --
2002-10-15 7:32 Sneppe Filip
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=5.1.0.14.2.20021015233540.03a36008@secure.hyperbolic.net \
--to=david@hyperbolic.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox