All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: port-based filtering of IPsec packets?
@ 2003-07-24 21:37 George Vieira
  2003-07-25  6:14 ` Rick Kennell
  0 siblings, 1 reply; 10+ messages in thread
From: George Vieira @ 2003-07-24 21:37 UTC (permalink / raw)
  To: Rick Kennell, Ramin Dousti; +Cc: netfilter

>Surely there must be some way of doing port-based filtering of ESP
>packets that are known to be bound for the local host.
If the packet isn't intended for the firewall/ipsec server, then it's forwarded unencrypted to the internal hosts.... I'm sure by then the data in decrypted right? Because it can't pass an encrypted packet to a host who isn't using IPSEC.

Can you put -j LOG rules in the FORWARD chain to filter on it? Mine appear to pickup port 23 telnet sessions... sorry if what you want isn't this..


[root@firewall root]# iptables -I FORWARD -i ipsec0 -o eth0 -p tcp --dport 23
[root@firewall root]# iptables -L FORWARD -n -v -x
Chain FORWARD (policy DROP 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination
       2      104            tcp  --  ipsec0 eth0    0.0.0.0/0            0.0.0.0/0          tcp dpt:23


Thanks,
____________________________________________
George Vieira
Systems Manager
georgev@citadelcomputer.com.au

Citadel Computer Systems Pty Ltd
http://www.citadelcomputer.com.au
 


^ permalink raw reply	[flat|nested] 10+ messages in thread
* port-based filtering of IPsec packets?
@ 2003-07-23 19:35 Rick Kennell
  2003-07-23 20:42 ` Ramin Dousti
  0 siblings, 1 reply; 10+ messages in thread
From: Rick Kennell @ 2003-07-23 19:35 UTC (permalink / raw)
  To: netfilter


I'm curious how I might do port-based filtering of IPsec packets with
iptables.  Presently, filtering IPsec-encrypted packets is an
all-or-nothing proposition because iptables can't look inside an ESP
section to get the port info.  It can only filter ESP packets based on
the SPI.  Actually, I'm not even sure how I'd get iptables to do
address-based filtering of IPsec packets.

Why would I want this?  Well, I might want to do opportunistic IPsec and
allow arbitrary parties to interact with my host, but I still want to
make sure that only selected services are made available.

I noticed that a similar thing was asked over on the FreeBSD side of the
world:

   http://www.bsdforums.org/forums/showthread.php?threadid=11725

Somehow, I don't expect the iptables solution to be quite so easy.

-- 
Rick Kennell <kennell@ecn.purdue.edu>
Purdue University Department of Electrical and Computer Engineering



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

end of thread, other threads:[~2003-07-25  6:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-24 21:37 port-based filtering of IPsec packets? George Vieira
2003-07-25  6:14 ` Rick Kennell
  -- strict thread matches above, loose matches on Subject: below --
2003-07-23 19:35 Rick Kennell
2003-07-23 20:42 ` Ramin Dousti
2003-07-23 21:11   ` Garcia Ruiz
2003-07-23 21:23     ` Rick Kennell
2003-07-24  1:08       ` Ramin Dousti
2003-07-24 20:50         ` Rick Kennell
2003-07-24 21:36           ` Ramin Dousti
2003-07-23 21:30     ` James A. Pattie

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.