Re: OT: alias for a network card

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Payal Rathod wrote:
Hi,
Excuse for this OT question here. But I don't know where I can get an
answer. While doing  NAT i need to have alias IPs for my router
machine like,
# ipconfig eth0:1 192.168.0.4

But these rules are lost once the machine is rebooted. How can I  make
them permanent?
I thought of putting these in rc.local but it rather crude approach as
my firewall might be started before that. I use Mandrake Linux.

It is OK to have firewall rules loaded before your interfaces are configured. I would go a step further and say that it is recommended. On most Linux distribution I saw that is exactly the order how things are done during boot (first iptables, than network). This way you don't have that one or two seconds gap when your machine/network is unprotected.


As for original question, check how and where your "normal" interfaces are configured. On RedHat it is file ifcfg-IF_NAME (where X is interface number, for example for eth0 file is ifcfg-eth0) in /etc/sysconfig/network-scripts directory (so if you want virtual interface on eth0, you just create ifcfg-eth0:1 file). Solaris does it the same way (/etc/hostname.hme0, /etc/hostname.hme0:1 and so on). On Mandrake it is probably something similar (when you find how the normal interfaces are configured, virtuals are most likely configured the very same way).

--
Aleksandar Milivojevic <amilivojevic@xxxxxx>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux