* Ipsec/L2tp with NETKEY
@ 2009-07-04 0:21 Martin
2009-07-04 4:14 ` Eray Aslan
0 siblings, 1 reply; 3+ messages in thread
From: Martin @ 2009-07-04 0:21 UTC (permalink / raw)
To: netfilter
Hi list!
I've been looking for a solution for this for a few days, but couldn't
find any solution.
I've configured a VPN in a Debian box using openswan to do ipsec and
l2tp, as it is pretty simple to implement on Windows and Mac users and
it doesn't needs any 3rd party software.
My problem is that openswan uses netkey for ipsec unless you patch the
kernel to use klips, and netkey doesn't create an ipsec0 interface, and
makes it really difficult to firewall things to l2tp, and having as a
unique soltution (without compiling kernel), leaving l2tp port wide
open.
Here is a diagram, just for fun ;)
MS-client ==== /ext interface/ Linux GW /internal interface/ ==== LAN
What I see is that user completes ipsec auth, and then tries to connect
to the l2tpd's port (7101) on the external interface, and then I must
accept connections in that port, or the vpn connection fails.
Any suggestions how to let connections on udp 1701 only to connections
before authenticated by ipsec?
Cheers
Martin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Ipsec/L2tp with NETKEY
2009-07-04 0:21 Ipsec/L2tp with NETKEY Martin
@ 2009-07-04 4:14 ` Eray Aslan
[not found] ` <114b7d1a0907052027y1204f945s4d9b5ea7032d6b13@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Eray Aslan @ 2009-07-04 4:14 UTC (permalink / raw)
To: netfilter
On 04.07.2009 03:21, Martin wrote:
[...]
> Here is a diagram, just for fun ;)
>
> MS-client ==== /ext interface/ Linux GW /internal interface/ ==== LAN
>
>
> What I see is that user completes ipsec auth, and then tries to connect
> to the l2tpd's port (7101) on the external interface, and then I must
> accept connections in that port, or the vpn connection fails.
>
>
> Any suggestions how to let connections on udp 1701 only to connections
> before authenticated by ipsec?
On the openswan machine, mark the ESP packets and accept only marked
packets to l2tpd daemon:
# iptables -t mangle -A PREROUTING -i $EXT_INT -p 50 -j MARK --set-mark 1
# iptables -A INPUT -i $EX_INT -m mark --mark 1 -j ACCEPT
# iptables -A INPUT -i $EX_INT -p udp --dport 1701 -j DROP
--
Eray
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-06 7:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-04 0:21 Ipsec/L2tp with NETKEY Martin
2009-07-04 4:14 ` Eray Aslan
[not found] ` <114b7d1a0907052027y1204f945s4d9b5ea7032d6b13@mail.gmail.com>
2009-07-06 7:04 ` Eray Aslan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox