From: Lars Brinkhoff <lars.spam@nocrew.org>
To: netfilter@lists.netfilter.org
Subject: Translating between local and global IP address
Date: 22 Jan 2003 08:17:16 +0100 [thread overview]
Message-ID: <85fzrlbqmb.fsf@junk.nocrew.org> (raw)
Hello,
My home network is set up something like this:
internet
|
eth0
GATEWAY (Linux)
eth1
|
COMPUTER (Windows)
COMPUTER has a local IP address ($IN), but I'd like to mangle packets
going through GATEWAY so COMPUTER appears to have another IP address
($OUT) on the internet. It seems I've had some success with this:
iptables -t nat -A POSTROUTING -o eth0 -s $IN -j SNAT --to-source $OUT
iptables -t nat -A PREROUTING -i eth0 -d $OUT -j DNAT --to-destination $IN
And to fool GATEWAY into accepting packets for $OUT, I've done this:
ifconfig eth0:1 $OUT
However, it doesn't seem to work when trying to play a network game on
COMPUTER. It times out trying to connect to another machine on the
internet. It probably uses UDP packets.
Any idea what I'm doing wrong?
Thanks.
next reply other threads:[~2003-01-22 7:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-22 7:17 Lars Brinkhoff [this message]
[not found] <FD8F124A387AD6119F7900A0D218B321562093@hslex01.hslbz.local>
2003-01-22 8:28 ` Translating between local and global IP address Rob Sterenborg
-- strict thread matches above, loose matches on Subject: below --
2003-01-22 16:45 Lars Brinkhoff
2003-01-22 20:18 ` Rob Sterenborg
2003-01-23 13:14 Lars Brinkhoff
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=85fzrlbqmb.fsf@junk.nocrew.org \
--to=lars.spam@nocrew.org \
--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.