From: "Leonardo Rodrigues Magalhães" <leolistas@solutti.com.br>
To: Chris Verges <squirrel@headnut.org>, netfilter@lists.netfilter.org
Subject: Re: firewall rules for subinterfaces
Date: Fri, 15 Oct 2004 09:03:58 -0300 [thread overview]
Message-ID: <009301c4b2af$0e653070$8b00000a@casa> (raw)
In-Reply-To: 20041015035535.GA19170@clifford.headnut.org
Short answer: NO
Better answer: iptables cannot use subinterfaces. What you can do is,
instead of using the subinterface as your criteria, use your IP addresses.
So, in your situation, you can do:
iptables -A INPUT -i eth0 -p icmp -d 192.168.1.1 -j DROP
iptables -A INPUT -i eth0 -p icmp -d 192.168.2.1 -j ACCEPT
If you REALLY need to difference subinterfaces, then you should try to
split subinterfaces in two real interfaces.
Sincerily,
Leonardo Rodrigues
----- Original Message -----
From: "Chris Verges" <squirrel@headnut.org>
To: <netfilter@lists.netfilter.org>
Sent: Friday, October 15, 2004 12:55 AM
Subject: firewall rules for subinterfaces
> Hey,
>
> Is there a way to add firewall rules for subinterfaces? I'm
> trying to do the equivalent of:
>
> eth0 Intel Pro 10/100
> eth0:0 192.168.1.1
> eth0:1 192.168.2.1
>
> iptables -A INPUT -p icmp -i eth0:0 -j DENY
> iptables -A INPUT -p icmp -i eth0:1 -j ACCEPT
>
> When I try to do this at the command line, iptables spits back
> an error about how colons (:) are not allowed in the interface
> name. That brings up the interesting question of how to do this
> whole thing ...
>
> Any advice or insight is greatly appreciated!
>
> Thanks,
>
> chris
> --
> http://headnut.org
> squirrel@headnut.org
>
>
next prev parent reply other threads:[~2004-10-15 12:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-15 3:55 firewall rules for subinterfaces Chris Verges
2004-10-15 12:03 ` Leonardo Rodrigues Magalhães [this message]
2004-10-15 12:06 ` George Alexandru Dragoi
2004-10-15 13:20 ` Aleksandar Milivojevic
2004-10-15 14:25 ` Andre Correa
2004-10-15 14:44 ` Cedric Blancher
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='009301c4b2af$0e653070$8b00000a@casa' \
--to=leolistas@solutti.com.br \
--cc=netfilter@lists.netfilter.org \
--cc=squirrel@headnut.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.