From: "Michel Wilson" <michel@procyon14.yi.org>
To: "Sim, CT \(Chee Tong\)" <CheeTong.Sim@sin.rabobank.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: Linux NAT questions
Date: Wed, 2 May 2001 11:12:57 +0200 [thread overview]
Message-ID: <NEBBLEJBILPLHPBNEEHIMEGECEAA.michel@procyon14.yi.org> (raw)
In-Reply-To: <1E8992B3CD28D4119D5B00508B08EC5627E8A1@sinxsn02.ap.rabobank.com>
> what I am trying to do is this. I have a genuine network, say 1.1.1.x, and
> my Linux host is on it, as 1.1.1.252 (eth0). I also have a second
> network at
> the back of the Linux box, 192.168.200.x, and a web server on
> that network,
> 192.168.200.2. The Linux address is 192.168.200.1 on eth1.
>
> What I want to do is make the web server appear on the 1.1.1.x network as
> 1.1.1.160. I have done this before with Firewall-1 on NT, by
> putting an arp
> entry for 1.1.1.160 to point to the Linux machine eth0. The packets get
> redirected into the Linux machine, then translated, and then routed out of
> eth1.
>
> The benefit is that there is no routing change to the 1.1.1.x network, and
> the Linux box isn't even seen as a router.
>
> I would appreciate any help with this. Any command to do this?
>
> Chee Tong
This isn't really a kernel question. I think you'd better ask it on some
linux network list/newsgroup. But here's an answer anyway....
You could add 1.1.1.160 to eth0:
ip addr add 1.1.1.160 dev eth0
and then use NAT to redirect these to the webserver:
iptables -t nat -A PREROUTING -p tcp --dst 1.1.1.160 -i eth1 -j
DNAT --to-destination 192.168.200.2
This should work, AFAIK, but i didn't try it myself. You could also try to
use the arp command (see 'man arp'), but i don't know exactly how that
works.
Good luck!
Michel Wilson.
prev parent reply other threads:[~2001-05-02 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-02 5:08 Sim, CT (Chee Tong)
2001-05-02 9:12 ` Michel Wilson [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=NEBBLEJBILPLHPBNEEHIMEGECEAA.michel@procyon14.yi.org \
--to=michel@procyon14.yi.org \
--cc=CheeTong.Sim@sin.rabobank.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®