assigning alias ip address

Jason Opperisano opie at
Fri Sep 10 13:46:52 CEST 2004

On Thu, 2004-09-09 at 23:10, John Black wrote:
> How does assigning alias IP address work?
> I have one network jack coming into my server room. 
> eth0
> I have two servers with public IP address.
> this assigns them, right?
> ifconfig eth0:10 netmask
> ifconfig eth0:11 netmask

the "preferred" method for this (by me) is to use the ip utility from

        ip addr add dev eth0
        ip addr add dev eth0
but yeah--the ifconfig method works too...

> iptables -t nat -A PREROUTING -d -i eth0 \
>                 -j DNAT --to-destination
> iptables -t nat -A PREROUTING -d -i eth0 \
>                 -j DNAT --to-destination
> When a mail or web request is made from the internet.  
> How does it know where the servers are?

routing.  the "one-arm" router scenario can be made to work, as long as
you understand the traffic flow and the routing quirks that can arise. 
the $25,000 question is:  what is the default gateway of and

is there a particular reason why your netfilter box can't have 2 NICs in
it, with the servers placed behind it?


Jason Opperisano <opie at>

More information about the netfilter mailing list