[PLUG] iptables and aliased interfaces

Derek Loree drl at drloree.com
Tue Apr 6 11:17:02 UTC 2004


On Mon, 2004-04-05 at 08:00, Matt Alexander wrote:
> I have two IP addresses assigned to the WAN side of my Linux router.  The
> router is running Arno's IPTables Script:
> 
> http://rocky.molphys.leidenuniv.nl/

I glanced at those scripts, and it looks like it would take some heavy
modification to support two external interfaces.  Do you have the
modified version available for perusal?
> 
> I have certain ports open on the first interface, eth0, but I want those
> same ports blocked on the aliased interface, eth0:0.  Is this possible?
> I've tried several different commands, but none block incoming connections
> to eth0:0, such as:
> 
> iptables -A INPUT -i eth0 -d {eth0:0-ip} -j DROP
> iptables -A INPUT -i eth0:0 -d {eth0:0-ip} -j DROP
> iptables -A INPUT -d {eth0:0-ip} -j DROP

Wait a minute, aren't eth0 and eth0:0 the same interface?  When I set up
multiple interfaces on the same card, the first is eth0 and the second
is eth0:1, I used to have to change eth0 to eth0:0, but not any more.

HTH,

Derek Loree





More information about the PLUG mailing list