On Monday 03 June 2002 11:15 pm, "J�rgen" Danielsson wrote: > The problem is that on 2 of the nics have to have 2 > ip's each, and the only way to have more than one ip > on a nic is by using alias, as far as i know, and then > they get names like eth1:0 and so on. I have not seen > any other possibility for names in slack.
Actually, it is not the only way, the preferred method these days is to use the iproute2 functions, which will add another address to your interface without giving the alias a new name: ip addr add w.x.y.z/bits dev eth0 (unless you use the 'label' option which Alin Nastac suggested earlier: ip addr add w.x.y.z/bits dev eth0 label eth00) And no, this is not ifconfig, this is newer and more powerful. > But would it work if i specify it as eth1 in the rule > and use the ip aswell, sounds weird if that would > work. Yes, that is what I am saying - if you want to specify the interface, call it eth1; if you want to specify the destination address, then use that. Use both together if you want. eg: ifconfig eth1 192.168.1.5 ifconfig eth1:1 192.168.1.9 iptables -i eth1 -d 192.168.1.9 -j ACCEPT or whatever..... Antony.
