From: Joel Newkirk <netfilter@newkirk.us>
To: Henning Riis Rasmussen <hrr@indbakke.dk>, netfilter@lists.netfilter.org
Subject: Re: DNAT and IP aliasing - how?
Date: Tue, 11 Mar 2003 09:10:10 -0500 [thread overview]
Message-ID: <200303110910.10681.netfilter@newkirk.us> (raw)
In-Reply-To: <001701c2e6f4$79edee00$85200f0a@smaug>
On Monday 10 March 2003 06:02 am, Henning Riis Rasmussen wrote:
> LAN0 (Local protected network)
> WAN1 (Sister organisation)
> INET2 (Internet)
> Hence, I need WAN1 to have more than one IP address (i.e. 10.0.0.1/24,
> 10.0.0.2/24 and 10.0.0.3/24).
>
> I assume I should use DNAT to provide the address translation needed
> for the hosts on the LAN that must be visible on the WAN. But what am
> I supposed to do about getting arp responses for the extra IP
> addresses on the WAN1 interface? I recall using the kernel IP aliasing
> option in previous setups, but this is no longer an option in kernel
> 2.4.20 (as far as I can tell).
>
> What is the "correct" way to set this up?
if WAN1 is eth0 with 10.0.0.1 presently, then try this:
ifconfig eth0:1 10.0.0.2 netmask 255.255.255.0
ifconfig eth0:2 10.0.0.3 netmask 255.255.255.0
This creates an alias on eth0 adding 10.0.0.2 as an additional IP for
that interface, then again for 10.0.0.3. Obviously the root interface
needs to match the WAN interface. A subsequent 'ifconfig' will show
these as additional interfaces on the same MAC. Packet info (RX and TX
statistics) will show only on the root interface. In an iptables rule
you can only use the root interface (eth0 in the above example) but can
still match source or dest IP to distinguish one from another in most
cases.
j
next prev parent reply other threads:[~2003-03-11 14:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-10 11:02 DNAT and IP aliasing - how? Henning Riis Rasmussen
2003-03-11 14:10 ` Joel Newkirk [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-03-11 17:16 Elmshauser, Erik
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=200303110910.10681.netfilter@newkirk.us \
--to=netfilter@newkirk.us \
--cc=hrr@indbakke.dk \
--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.