All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Wright <ebwximaurm@mailinator.com>
To: netfilter@lists.netfilter.org
Subject: Re: Multiple IP addresses
Date: Sun, 26 Mar 2006 19:30:09 -0800	[thread overview]
Message-ID: <44275C41.4070603@mailinator.com> (raw)
In-Reply-To: <9a6de10603261753s33408f9cnb5ce6f9ae7b4f75d@mail.gmail.com>

Will Twomey wrote:
> I apologize if this is the wrong list, but...
> 
> I would like to have several (3?) ip addresses on one interface (eth0,
> eth0:1, etc.), 

Aliasing your network card isn't necessary.  Just assign IP's to it.

ip address add 192.168.0.1/24 dev eth0
ip address add 192.168.1.1/24 dev eth0
ip address add 192.168.2.1/24 dev eth0

> and forward each of those IP addresses to another
> interface (192.168.0.1, 192.168.1.1, 192.168.2.1, etc.)

I think these might work.

iptables -A FORWARD -d 192.168.0.0/24 -i eth0 -o eth1 -j ACCEPT
iptables -A FORWARD -d 192.168.1.0/24 -i eth0 -o eth2 -j ACCEPT
iptables -A FORWARD -d 192.168.2.0/24 -i eth0 -o eth3 -j ACCEPT


> Does anyone have an advice for me, or a good place to learn how to do this?
> 
> If someone has an iptables/netfilter script that does this, I'd love
> to see it. :D
> 
> Thanks!
> 
> --
> Will Twomey
> http://UnhandledExceptions.com




  reply	other threads:[~2006-03-27  3:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-27  1:53 Multiple IP addresses Will Twomey
2006-03-27  3:30 ` Mike Wright [this message]
2006-03-27  9:28 ` Martijn Lievaart
2006-03-27 11:51 ` John A. Sullivan III
2006-03-27 12:24 ` Eduardo Spremolla
  -- strict thread matches above, loose matches on Subject: below --
2003-05-22  1:31 George Vieira
2003-05-22  1:25 Brei, Matt
2003-05-21 23:53 George Vieira
2003-05-21 23:01 Brei, Matt

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=44275C41.4070603@mailinator.com \
    --to=ebwximaurm@mailinator.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.