From: Brett Simpson <simpsonb@hillsboroughcounty.org>
To: netfilter@lists.netfilter.org
Subject: Re: Send local traffic to a different server.
Date: Wed, 23 Jun 2004 11:12:15 -0400 [thread overview]
Message-ID: <1088003535.4009.78.camel@simpsonb.hillsboroughcounty.org> (raw)
In-Reply-To: <200406231500.05742.Antony@Soft-Solutions.co.uk>
On Wed, 2004-06-23 at 10:00, Antony Stone wrote:
> On Wednesday 23 June 2004 3:33 pm, Brett Simpson wrote:
>
> > On Wed, 2004-06-23 at 09:33, Antony Stone wrote:
> > > On Wednesday 23 June 2004 3:08 pm, Brett Simpson wrote:
> > > > I've tried a number of different PREROUTING and POSTROUTING rules and
> > > > can't seem to make this work.
> > > >
> > > > I have a system with a single nic (eth0). While I'm on the system via a
> > > > shell I would like to connect to 127.0.0.1:6000 and get seemlessly
> > > > translated to 207.156.7.15:80.
> > > >
> My rule will send packets to 207.156.7.15 with a source address of 127.0.0.1
>
> Not surprisingly, you don't get anything back...
>
> Try:
>
> iptables -A OUTPUT -t nat -p tcp --dport 6000 -d 127.0.0.1 -j DNAT --to
> 207.156.7.15:80
> iptables -A POSTROUTING -t nat -p tcp --dport 80 -d 207.156.7.15 -s 127.0.0.1
> -j SNAT --to a.b.c.d
>
> Where a.b.c.d is the routable address of your machine, to which reply packets
> can successfully return.
Still no go. My machine is 172.27.228.145. I'm using lynx for the
browser on my machine.
iptables -A OUTPUT -t nat -p tcp --dport 6000 -d 127.0.0.1 -j DNAT --to
207.156.7.15:80
iptables -A POSTROUTING -t nat -p tcp --dport 80 -d 207.156.7.15 -s
127.0.0.1 -j SNAT --to 172.27.228.145
Thanks,
Brett
next prev parent reply other threads:[~2004-06-23 15:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-23 14:08 Send local traffic to a different server Brett Simpson
2004-06-23 13:33 ` Antony Stone
2004-06-23 14:33 ` Brett Simpson
2004-06-23 14:00 ` Antony Stone
2004-06-23 15:12 ` Brett Simpson [this message]
2004-06-23 14:24 ` Antony Stone
2004-06-23 16:41 ` Brett Simpson
2004-06-24 18:27 ` Brett Simpson
2004-06-23 14:20 ` John A. Sullivan III
2004-06-23 14:58 ` Antony Stone
2004-06-23 16:34 ` Brett Simpson
2004-06-23 15:39 ` B. McAninch
2004-06-23 16:53 ` Brett Simpson
-- strict thread matches above, loose matches on Subject: below --
2004-06-23 15:26 Aldo Lagana
2004-06-24 8:46 ` 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=1088003535.4009.78.camel@simpsonb.hillsboroughcounty.org \
--to=simpsonb@hillsboroughcounty.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox