All of lore.kernel.org
 help / color / mirror / Atom feed
* kernel 2.6 IPsec and netfilter
@ 2004-03-29 11:10 Devaraj Das
  2004-03-29 12:33 ` Thomas Lussnig
  2004-03-29 12:36 ` Lane Powers
  0 siblings, 2 replies; 7+ messages in thread
From: Devaraj Das @ 2004-03-29 11:10 UTC (permalink / raw)
  To: netfilter

Hi,
I wanted to know whether there is a working solution for the issue that
was discussed sometime back:
http://www.spinics.net/lists/netfilter/msg22099.html
In short is there any solution to enable blocking selective ports in a
machine running Linux 2.6.0 + in-kernel ipsec.
I would be very helpful if I can get a working solution or some
information on a possible solution.
Thanks,
Devaraj.



^ permalink raw reply	[flat|nested] 7+ messages in thread
* kernel 2.6 IPsec and netfilter
@ 2004-01-14 18:51 Dobersberger Dieter
  2004-01-15  3:06 ` Dobersberger Dieter
  0 siblings, 1 reply; 7+ messages in thread
From: Dobersberger Dieter @ 2004-01-14 18:51 UTC (permalink / raw)
  To: netfilter

Hi All !

I have set up an in-kernel IPsec Tunnel with Linux 2.6.0 and want to
filter traffic going through this tunnel.

Before I upgraded to 2.6 I used FreeS/WAN on Linux 2.4 which provided
a virtual interface called ipsec0 which I could use to apply rules
after the IPsec packet has been decrypted. Now with kernel 2.6 ipsec0
is gone and the incoming interface is the same as the physical (eth0).
So the machine on the other end of the IPsec tunnel has unlimted
access to my server.

I used these rules for FreeS/WAN:

# $WWW .. ip address of the webserver
# $DB ... ip address of the database server
# both are linked with an IPsec tunnel

# allow IKE and IPsec (AH and ESP)
iptables -A INPUT -s $WWW -d $DB -p udp --dport 500 -j ACCEPT
iptables -A INPUT -s $WWW -d $DB -p 50 -j ACCEPT
iptables -A INPUT -s $WWW -d $DB -p 51 -j ACCEPT

# allow mysql via IPsec
iptables -A INPUT -i ipsec0 -p tcp -s $WWW -d $DB \
   --dport 3306 -j ACCEPT

# drop everything else
iptables -A INPUT -j DROP

The above rules don't work for in-kernel IPsec. The www server has
unlimited access to the db server because the decrypted packets are
not processed by iptables.

All I found on the net is a link to an older thread discussing the
same problem but they didn't find a solution:
http://www.spinics.net/lists/netfilter/msg18030.html

Anyone got an idea how to limit the traffic coming in via IPsec to
certain ports and block all other traffic ? Can someone please post
iptables rules that do the same filtering for in-kernel IPsec as mine
did in FreeS/WAN ?

Thanks for reading this far.
best regards,
Dieter



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

end of thread, other threads:[~2004-03-29 15:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-29 11:10 kernel 2.6 IPsec and netfilter Devaraj Das
2004-03-29 12:33 ` Thomas Lussnig
2004-03-29 15:13   ` Devaraj Das
2004-03-29 12:36 ` Lane Powers
2004-03-29 15:21   ` Devaraj Das
  -- strict thread matches above, loose matches on Subject: below --
2004-01-14 18:51 Dobersberger Dieter
2004-01-15  3:06 ` Dobersberger Dieter

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.