View Full Version : Iptables will not take Ethernet Alias Eth0:1
25th September 2004, 09:35 AM
I am configuring my Firewall with IPTables. And when I want to assign some rules to my "eth0:1" ethernet alias, iptables won't take that :(
Does that mean that the rules I had defined for my eth0 ethernet card, will also be the rules for my aliasses??
1st October 2004, 02:18 AM
That does seem like an intuitive piece of code for the interface parameter. You might suggest that to the netfilter people. The answer is that you will need to write a rule for each of your ethernet interfaces. You could use "eth+" for all ethernet devices. The rules are applied from the beginning and the first rule to apply to the traffic is the one used.
9th October 2004, 09:45 PM
I imagine that you have different IP-numbers on eth0 and eth0:1, so to use different rules you have to look at the IP-numbers also, i.e. something like this (this is just a short example)
$IPT -A INPUT -i $INET_ETH -d $INET1 -j ip1_from_inet
$IPT -A INPUT -i $INET_ETH -d $INET2 -j ip2_from_inet
$IPT=/sbin/iptables, $INET_ETH is the ethernet interface, i.e. eth0, $INET1 and $INET2 are the two different IP-numbers of eth0 and eth0:1, both jump of to two different chains with different rules in them.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.