From: /dev/rob0 <rob0@gmx.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: Iptables and vlan interfaces
Date: Fri, 30 Sep 2005 08:39:15 -0500 [thread overview]
Message-ID: <200509300839.15330.rob0@gmx.co.uk> (raw)
In-Reply-To: <20050930125427.28160.qmail@focomunicatii.ro>
On Friday 2005-September-30 07:54, sebastian.ionita@focomunicatii.ro wrote:
> > On Fri, 30 Sep 2005 sebastian.ionita@focomunicatii.ro wrote:
> >> Why doesn't iptables works with vlans interfaces? iptables -t
> >> mangle -A FORWARD -i eth0 -o eth1.11 -j MARK --set-mark 4
> >> Gives me the error:
> >> host/network eth1.11 not found.
> >
> > Sounds like there may be a bug in your iptables command.
> >
> > Are you sure the command line given above is what you tried to use?
> > The error seems to suggest a -s/-d option was used instead of -o.
>
> You are right .. it was my mistake .. :)). In the shell i typed the
> wrong command, but when I wrote the e-mail I write the correct
Hmmm, I had always thought you couldn't use virtual interfaces.
# iptables -vI INPUT -i eth0:101
Warning: wierd character in interface `eth0:101' (No aliases, :, ! or *).
all opt -- in eth0:101 out * 0.0.0.0/0 -> 0.0.0.0/0
# iptables -vnL INPUT
Chain INPUT (policy ACCEPT 54651 packets, 5325K bytes)
pkts bytes target prot opt in out source destination
0 0 all -- eth0:101 * 0.0.0.0/0 0.0.0.0/0
12M 4929M State all -- * * 0.0.0.0/0 0.0.0.0/0
55325 12M Outside all -- * * !192.168.0.0/19 0.0.0.0/0
Why the warning (with "weird" misspelled, no less)? I ping the IP
address for eth0:101, check -vnL again, and the packet counters are
still zero. Apparently the rule is accepted but the kernel cannot use
it.
eth0:101 was made using ifconfig(8), which demands the real interface
name and a colon as prefix to an alias. I tried making another one
using ip(8):
ip ad ad 192.168.6.78 label eth0.dl dev eth0
ip(8) only seems to want the real interface name. I inserted the rule
without the warning. I inserted a second rule to count --icmp-type 8
and pinged that IP from another host. The ICMP rule packet counters
incremented exactly one for each ping, but the eth0.dl rule never did.
What's the truth here? Is there something needed in the kernel?
--
mail to this address is discarded unless "/dev/rob0"
or "not-spam" is in Subject: header
next prev parent reply other threads:[~2005-09-30 13:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-30 11:21 Iptables and vlan interfaces sebastian.ionita
2005-09-30 11:34 ` Sascha Reissner
2005-09-30 11:37 ` Marc Haber
2005-09-30 11:56 ` Marcin Giedz
2005-09-30 12:44 ` Henrik Nordstrom
2005-09-30 12:54 ` sebastian.ionita
2005-09-30 13:39 ` /dev/rob0 [this message]
2005-09-30 13:41 ` Marc Haber
2005-09-30 13:55 ` /dev/rob0
2005-09-30 14:14 ` Marc Haber
2005-09-30 15:21 ` Henrik Nordstrom
2005-10-03 6:48 ` Aseem Rastogi
2005-10-03 7:44 ` Marc Haber
2005-10-03 8:55 ` Aseem Rastogi
2005-10-03 8:59 ` Marc Haber
2005-10-03 9:16 ` Henrik Nordstrom
2005-10-03 9:24 ` Marc Haber
2005-10-03 12:46 ` Henrik Nordstrom
2005-10-03 9:27 ` Aseem Rastogi
2005-10-03 10:05 ` Aseem Rastogi
2005-10-03 10:02 ` Marc Haber
2005-10-03 12:18 ` Henrik Nordstrom
-- strict thread matches above, loose matches on Subject: below --
2005-09-30 12:04 Baake, Matthias
2005-09-30 12:53 Baake, Matthias
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=200509300839.15330.rob0@gmx.co.uk \
--to=rob0@gmx.co.uk \
--cc=netfilter@lists.netfilter.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 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.