Multiple IP with one nic

Gregory P. Ennis PoMec at PoMec.Net
Mon Nov 21 23:21:50 UTC 2005


On Mon, 2005-11-21 at 19:02 -0400, Trevor "TeC" Christian wrote:

> Adding to the mention of firewall rules... iptables (when last checked), 
> i believe does not recognize eth0:X as a device and as such rules 
> related to said traffic still have to be applied based on the main 
> interface.
> 
> Correct me if I'm wrong...
> 
> 
> -- 

Trevor,

You may be correct but I believe it can be managed by using the IP
addresses

-A INPUT -s ###.###.###.250 -i lo -j ACCEPT
-A INPUT -s ###.###.###.251 -i lo -j ACCEPT


-A OUTPUT -s ###.###.###.250 -j ACCEPT                
-A OUTPUT -s ###.###.###.251 -j ACCEPT

where ###.###.###.250 is addressed in eth0
and   ###.###.###.251 is addressed in eth0:1   

This is how I was able to do it.

Greg




More information about the users mailing list