From: patrick conlin <patrick@wechsler.com>
To: netfilter@lists.samba.org
Subject: simple nat dilemma
Date: Thu, 09 May 2002 13:33:40 -0400 [thread overview]
Message-ID: <B9002B34.C58%patrick@wechsler.com> (raw)
Hello everyone,
Let me preface this by saying that I am seriously disappointed by my failure
to figure out what I'm doing wrong here, and any admonitions I receive from
ramin for being an idiot will be appreciated. I've been using ipchains for a
over a year for simple packet filtering and am now setting up a simple nat
gateway with iptables, but can't get it to work.
I'm trying to get the nat machine (bulgakov) to make zamyatin look and feel
like 207.224.76.204 for all external activity, inbound and outbound.
Eventually I'll be trying to make olesha look and feel like 207.224.76.202,
but one step at a time.
It's the classic setup:
bulgakov
eth0: 207.224.76.201
eth1: 10.1.1.1
zamyatin
eth0: 10.1.1.107
I've got a 1 in /proc/sys/net/ipv4/ip_forward
As an aside, when I set up
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Everything works great, for what it's worth (obviously not useful for
inbound connections). I am able to connect to the outside world and do
whatever I want (ping, traceroute, ftp, www, whatever) and It looks like the
connection is coming from 207.224.76.201. Of course, that's not what I'm
trying to do so I flush the chain, follow trusty rusty, and add the
following:
# iptables -t nat -A POSTROUTING -o eth0 -s 10.1.1.107 -j SNAT --to-source
207.224.76.204
No dice. I think the packets must be getting nat'd on the way out, but the
return packects aren't getting sent to the right place, so I add:
# iptables -t nat -A PREROUTING -d 207.224.76.204 -j DNAT --to-destination
10.1.1.107
Still nothing. I think maybe I need some explicit action on my FORWARD
chain, so I add:
# iptables -t filter -A FORWARD -s 10.1.1.107 -j ACCEPT
And
# iptables -t filter -A FORWARD -d 207.224.76.204 -j ACCEPT
Alas, still no love. So, a plea for help to those more fluent. I know I must
be missing something obvious.
Thanks!
patrick
next reply other threads:[~2002-05-09 17:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-09 17:33 patrick conlin [this message]
2002-06-13 16:09 ` simple nat dilemma Antony Stone
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=B9002B34.C58%patrick@wechsler.com \
--to=patrick@wechsler.com \
--cc=netfilter@lists.samba.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.