All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Marco Berizzi <pupilla@hotmail.com>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: new iptables policy match
Date: Thu, 12 Jan 2006 11:42:34 +0100	[thread overview]
Message-ID: <43C6329A.8010101@trash.net> (raw)
In-Reply-To: <BAY103-F16E9571FF1B70C7DBB70A1B2270@phx.gbl>

Marco Berizzi wrote:

> Ok, my fault sorry. Here is my corrected (I hope) iptables rules:
> 
> iptables -P FORWARD DROP
> iptables -F
> 
> iptables -A FORWARD -m policy --dir out --pol ipsec --mode tunnel 
> --tunnel-src 10.1.2.0/24 --tunnel-dst 10.1.1.0/24 -j DROP
> iptables -A FORWARD -m policy --dir in  --pol ipsec  --mode tunnel 
> --tunnel-dst 10.1.2.0/24 --tunnel-src 10.1.1.0/24 -j DROP
> 
> iptables -A FORWARD -m policy --dir in --pol ipsec --mode tunnel 
> --tunnel-src 10.1.2.0/24 --tunnel-dst 10.1.1.0/24 -j DROP
> iptables -A FORWARD -m policy --dir out  --pol ipsec  --mode tunnel 
> --tunnel-dst 10.1.2.0/24 --tunnel-src 10.1.1.0/24 -j DROP
> 
> 
> iptables -A FORWARD -s 10.1.2.0/24 -d 10.1.1.10/24 -j ACCEPT
> iptables -A FORWARD -d 10.1.2.0/24 -s 10.1.1.10/24 -j ACCEPT
> 
> iptables -L -v output:
> 
> root@Calimero:/tmp/RACOON# iptables -L -v
> Chain INPUT (policy ACCEPT 11574 packets, 2434K 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
>    0     0 DROP       all  --  any    any     anywhere             
> anywhere            policy match dir out pol ipsec 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 mode tunnel tunnel-dst 
> 10.1.2.0/24 tunnel-src 10.1.1.0/24
>    0     0 DROP       all  --  any    any     anywhere             
> anywhere            policy match dir in pol ipsec 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 out pol ipsec mode tunnel 
> tunnel-dst 10.1.2.0/24 tunnel-src 10.1.1.0/24
> 1074 64440 ACCEPT     all  --  any    any     10.1.2.0/24          
> 10.1.1.0/24
> 1074 64440 ACCEPT     all  --  any    any     10.1.1.0/24          
> 10.1.2.0/24
> 
> Chain OUTPUT (policy ACCEPT 5983 packets, 933K bytes)
> pkts bytes target     prot opt in     out     source               
> destination
> 
> Ipsec policy match are never matched: I can ping-pong from-to both sites.
> I'm not understand what is wrong.

What does "ip xfrm policy" show?

  reply	other threads:[~2006-01-12 10:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-11 16:17 new iptables policy match 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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2006-01-12 17:59 Greg Scott
2006-01-13  7:01 ` Patrick McHardy
2006-01-13 21:18 Greg Scott
2006-01-14 16:22 ` Patrick McHardy

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=43C6329A.8010101@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=pupilla@hotmail.com \
    /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 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.