netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jimmy Thrasibule <thrasibule.jimmy@gmail.com>
To: netfilter@vger.kernel.org
Subject: Strange behavior with ipset not matching on public range
Date: Mon, 27 May 2013 15:42:15 +0200	[thread overview]
Message-ID: <1369662135.4058.24.camel@BEWS005.euractiv.com> (raw)

Hi,

I've got a very strange problem with ipset not matching on public IP
addresses.

Let's have a look at my firewall configuration.

# ip addr
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP
qlen 1000
    link/ether 00:e0:xx:xx:xx:9e brd ff:ff:ff:ff:ff:ff
    inet 217.x.x.122/29 brd 217.x.x.127 scope global eth1

# ipset list
Name: fw_iface_pub
Type: hash:net,iface
Header: family inet hashsize 64 maxelem 2 
Size in memory: 1552
References: 3
Members:
217.x.x.122,eth1

The entry has been entered in ipset using the following statement:

# ipset add fw_iface_pub 217.x.x.122/32,eth1

So from my point of view, every thing should be OK. Here is the
strangeness:

# iptables -nvL
[...]
Chain FW_OUT (2 references)
 pkts bytes target          prot opt in    out    source         destination
  297 45841 CTRLOUT         icmp --  *     *      0.0.0.0/0      0.0.0.0/0
   77  9731 FW_OUT_common   all  --  *     *      0.0.0.0/0      0.0.0.0/0      match-set fw_iface_all src,dst
    0     0 FW_OUT_pub      all  --  *     *      0.0.0.0/0      0.0.0.0/0      match-set fw_iface_pub src,dst
  126 22031 FW_OUT_pub      all  --  *     eth1   217.x.x.122    0.0.0.0/0

As you can see, no matches on the `fw_iface_pub` list while the
`fw_iface_all` one matches as well as if I'm directly specify the public
IP address.

And do you want to know what is the stranger part? If I reboot the host,
the rule matches as expected...

I'm running iptables v1.4.14 on Debian 7.0 and I have no idea why this
is happening.

--
Jimmy



             reply	other threads:[~2013-05-27 13:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-27 13:42 Jimmy Thrasibule [this message]
2013-05-27 13:49 ` Strange behavior with ipset not matching on public range Jozsef Kadlecsik
2013-05-27 14:44   ` Jimmy Thrasibule
2013-05-27 18:13     ` Jozsef Kadlecsik
2013-05-28 13:30       ` Jimmy Thrasibule
2013-05-28 13:33         ` Jimmy Thrasibule
2013-05-28 13:35         ` Jozsef Kadlecsik

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=1369662135.4058.24.camel@BEWS005.euractiv.com \
    --to=thrasibule.jimmy@gmail.com \
    --cc=netfilter@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).