From: Aleksandar Milivojevic <amilivojevic@pbl.ca>
To: Netfilter User Mailinglist <netfilter@lists.netfilter.org>
Subject: Re: OT: alias for a network card
Date: Thu, 15 Jul 2004 08:40:36 -0500 [thread overview]
Message-ID: <40F68954.8020802@pbl.ca> (raw)
In-Reply-To: <f51b72bc0407150121527f95a4@mail.gmail.com>
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@pbl.ca> Pollard Banknote Limited
Systems Administrator 1499 Buffalo Place
Tel: (204) 474-2323 ext 276 Winnipeg, MB R3T 1L7
prev parent reply other threads:[~2004-07-15 13:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-15 8:21 OT: alias for a network card Payal Rathod
2004-07-15 12:28 ` Erik Wikström
2004-07-18 13:14 ` Payal Rathod
2004-07-19 11:09 ` Saad Faruque
2004-07-15 13:40 ` Aleksandar Milivojevic [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40F68954.8020802@pbl.ca \
--to=amilivojevic@pbl.ca \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox