All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: new iptables policy match
@ 2006-01-12 17:59 Greg Scott
  2006-01-13  7:01 ` Patrick McHardy
  0 siblings, 1 reply; 19+ messages in thread
From: Greg Scott @ 2006-01-12 17:59 UTC (permalink / raw)
  To: Patrick McHardy, Marco Berizzi; +Cc: netfilter-devel

Just to be completely anal because I'm just a skinny 
bald guy from Minnesota - is this ASCII art right?
If this is right, maybe this would make the man page
even clearer.  Of course, if it's wrong, that means
I still don't get it.


LAN    FW   Internet   FW    LAN
<----+----+----------+----+----->
     |    |          |    |
Private  Public   Public  Private
    IP    IP        IP     IP

 Tunnel   SA        SA   Tunnel
 endpoint                endpoint


- Greg Scott


-----Original Message-----
From: netfilter-devel-bounces@lists.netfilter.org
[mailto:netfilter-devel-bounces@lists.netfilter.org] On Behalf Of
Patrick McHardy
Sent: Thursday, January 12, 2006 10:31 AM
To: Marco Berizzi
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: new iptables policy match


Marco Berizzi wrote:
> Ok. Here is my suggestion:
> 
> --tunnel-src addr[/mask]
> matches the source end-point address of the SA. Only valid with --mode

> tunnel
> 
> --tunnel-dst addr[/mask]
> matches the destination end-point address of the SA. Only valid with 
> --mode tunnel

Thanks, I've updated the man-page.

^ permalink raw reply	[flat|nested] 19+ messages in thread
* RE: new iptables policy match
@ 2006-01-13 21:18 Greg Scott
  2006-01-14 16:22 ` Patrick McHardy
  0 siblings, 1 reply; 19+ messages in thread
From: Greg Scott @ 2006-01-13 21:18 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: netfilter-devel, Marco Berizzi

> No, the tunnel endpoints are the hosts using the 
> tunnel-mode SA, so in this case both firewalls.

OK, so now I'm confused.  And admittedly, IPSEC has made
me crazy for several years.  Which NICs on the firewalls
are the endpoints?  Is this picture better and more accurate?


  LAN             Internet             LAN
 <----+--FW---+-------------+--FW---+----->
      |       |             |       |
NIC with  NIC with      NIC with  NIC with
private    public        public   private
  IP        IP <---------> IP       IP
                   SA
          Tunnel          Tunnel
         endpoint        endpoint

So the public NICs are the tunnel endpoints?

- Greg



-----Original Message-----
From: Patrick McHardy [mailto:kaber@trash.net] 
Sent: Friday, January 13, 2006 1:02 AM
To: Greg Scott
Cc: Marco Berizzi; netfilter-devel@lists.netfilter.org
Subject: Re: new iptables policy match


Greg Scott wrote:
> Just to be completely anal because I'm just a skinny
> bald guy from Minnesota - is this ASCII art right?
> If this is right, maybe this would make the man page
> even clearer.  Of course, if it's wrong, that means
> I still don't get it.
> 
> 
> LAN    FW   Internet   FW    LAN
> <----+----+----------+----+----->
>      |    |          |    |
> Private  Public   Public  Private
>     IP    IP        IP     IP
> 
>  Tunnel   SA        SA   Tunnel
>  endpoint                endpoint

No, the tunnel endpoints are the hosts using the tunnel-mode SA, so in
this case both firewalls.

^ permalink raw reply	[flat|nested] 19+ messages in thread
* new iptables policy match
@ 2006-01-11 16:17 Marco Berizzi
  2006-01-12  4:07 ` Patrick McHardy
  2006-01-12  9:41 ` Patrick McHardy
  0 siblings, 2 replies; 19+ messages in thread
From: Marco Berizzi @ 2006-01-11 16:17 UTC (permalink / raw)
  To: netfilter-devel

Hello.
I'm testing the new iptables policy match on a snapshot kernel 
(2.6.15-git7).
This is my simple network diagram:

eth1                  eth0                                     eth0          
           eth1
10.1.2.0/24===172.16.1.247..[ipsec tunnel]..172.16.1.226===10.1.1.0/24
-----2.6.15-git7 linux box-----                         --------2.4/KLIPS 
box----------

I have setup a simple ipsec tunnel between the two linux boxes. So far, so 
good.
I'm pinging from 10.1.2.1 (a system connected to the 10.1.2.0/24 net) to 
10.1.1.1
(a system connected to the 10.1.1.0/24 net). This is iptables -L -v output:

root@Calimero:/tmp/RACOON# iptables -L -v
Chain INPUT (policy ACCEPT 70672 packets, 15M bytes)
pkts bytes target     prot opt in     out     source               
destination

Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target     prot opt in     out     source               
destination
   19  1140 ACCEPT     all  --  any    any     anywhere             anywhere 
            policy match dir out pol ipsec strict [0] [1] [2] [3] mode 
tunnel tunnel-dst 10.1.1.0/24 tunnel-src 10.1.2.0/24
    0     0 DROP       all  --  any    any     anywhere             anywhere 
            policy match dir in pol ipsec strict [0] [1] [2] [3] mode tunnel 
tunnel-dst 10.1.2.0/24 tunnel-src 10.1.1.0/24
    0     0 ACCEPT     all  --  any    any     10.1.2.0/24          
10.1.1.0/24
   19  1140 ACCEPT     all  --  any    any     10.1.1.0/24          
10.1.2.0/24

Chain OUTPUT (policy ACCEPT 39941 packets, 7146K bytes)
pkts bytes target     prot opt in     out     source               
destination

As you can see the 2nd rule should drop ipsec packets but they aren't 
dropped:
I'm getting back the echo reply packets from 10.1.1.1 to 10.1.2.1
Also the 3rd rule counter doesn't increment.
Deleting the 1st and 2nd rule counter are fine:

root@Calimero:/tmp/RACOON# iptables -L -v
Chain INPUT (policy ACCEPT 73891 packets, 15M bytes)
pkts bytes target     prot opt in     out     source               
destination

Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target     prot opt in     out     source               
destination
   66  3960 ACCEPT     all  --  any    any     10.1.2.0/24          
10.1.1.0/24
   66  3960 ACCEPT     all  --  any    any     10.1.1.0/24          
10.1.2.0/24

Chain OUTPUT (policy ACCEPT 41881 packets, 7285K bytes)
pkts bytes target     prot opt in     out     source               
destination

I know that this patches are "work in progress" and my apologies if this is
a know problem, but I would like to know is this is a know issue.
PS: I'm using iptables v1.3.4-20060109 on Slackware 10.2

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

end of thread, other threads:[~2006-01-22 13:38 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-12 17:59 new iptables policy match Greg Scott
2006-01-13  7:01 ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2006-01-13 21:18 Greg Scott
2006-01-14 16:22 ` Patrick McHardy
2006-01-11 16:17 Marco Berizzi
2006-01-12  4:07 ` Patrick McHardy
2006-01-12  8:30   ` Marco Berizzi
2006-01-12  8:43     ` Patrick McHardy
2006-01-12 10:38       ` Marco Berizzi
2006-01-12 10:42         ` Patrick McHardy
2006-01-12 10:48           ` Marco Berizzi
2006-01-12 10:53             ` Patrick McHardy
2006-01-12 11:23               ` Marco Berizzi
2006-01-12 12:33                 ` Patrick McHardy
2006-01-12 14:37                   ` Marco Berizzi
2006-01-12 16:31                     ` Patrick McHardy
2006-01-20 15:54       ` Tom Eastep
2006-01-22 13:38         ` Patrick McHardy
2006-01-12  9:41 ` Patrick McHardy

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.