From: Adrian Chung <adrian@enfusion-group.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Redirecting wayward traffic
Date: Tue, 05 Jun 2001 16:06:06 +0000 [thread overview]
Message-ID: <marc-lartc-99175775218171@msgid-missing> (raw)
In-Reply-To: <marc-lartc-99174669408206@msgid-missing>
On Tue, Jun 05, 2001 at 08:09:41AM -0500, David Talbot wrote:
> #THIS IS THE PROBLEM LINE
> iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 10.0.0.1
> #THIS IS THE PROBLEM LINE
I think I know what the problem is.
Before that though, Juri is right in saying that this is more easily
and effectively achieved using Squid, but, that being said...
You're trying to do DNAT onto the same network. You change the
destination IP of the packets back onto the local network, but when
they hit 10.0.0.1 they look like they came from the external IP of
your router, and so they get dropped.
Look at:
http://netfilter.samba.org/unreliable-guides/NAT-HOWTO/NAT-HOWTO.linuxdoc-10.html
Try adding:
iptables -t nat -A POSTROUTING -p tcp -s <yourLAN> -d 10.0.0.1 --dport
80 -j SNAT --to <NATboxIP>
It worked for me, but I had to do some other fiddling because I'm also
doing policy based (source) routing, and so my setup might not quite
be the same as yours, but it's worth a try.
If you use tcpdump, you should see packets hitting 10.0.0.1 from a
non-LAN IP.
--
Adrian Chung (adrian at enfusion-group dot com)
http://www.enfusion-group.com/~adrian
GPG Fingerprint: C620 C8EA 86BA 79CC 384C E7BE A10C 353B 919D 1A17
[rogue.enfusion-group.com] up 28 days, 23:15, 3 users
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
next prev parent reply other threads:[~2001-06-05 16:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-05 13:09 [LARTC] Redirecting wayward traffic David Talbot
2001-06-05 14:55 ` Adrian Chung
2001-06-05 15:12 ` David Talbot
2001-06-05 15:48 ` Juri Haberland
2001-06-05 16:06 ` Adrian Chung [this message]
2001-06-05 16:20 ` David Talbot
2001-06-05 16:39 ` Adrian Chung
2001-06-05 16:43 ` Juri Haberland
2001-06-05 21:18 ` David Talbot
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=marc-lartc-99175775218171@msgid-missing \
--to=adrian@enfusion-group.com \
--cc=lartc@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