From: Henry Ritzlmayr <h.ritzlmayr@gmx.at>
To: Negrea Mihai <mike@spidernet.co.ro>,
Netfilter Mailing List <netfilter@lists.netfilter.org>
Subject: Re: Redirecting incoming traffic to 127.0.0.1
Date: 21 Mar 2003 18:05:41 +0100 [thread overview]
Message-ID: <1048266341.1492.153.camel@localhost.localdomain> (raw)
In-Reply-To: <200303211651.16884.mike@spidernet.co.ro>
I am not sure if I understood your approach - but I tried it and it
doesn´t do the trick.
What I need is whenever a packet arrives on an external interface it
should be redirected to 127.0.0.1 (localhost). This is needed because a
service is listening only on localhost (not ment to be used on the
network).
Henry
Am Fre, 2003-03-21 um 15.51 schrieb Negrea Mihai:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Maybe the packets reach your service listening on the localhost but they
> cannot get to the client because it has the source 127.0.0.1
>
> Try SNAT-ing those packets:
> iptables -t nat -A POSTROUTING -p tcp -s 127.0.0.1 -j SNAT --to 172.16.172.12
>
> hope I understood the problem
>
> All the best,
>
> - --
> Negrea Mihai
> http://www.negrea.net
>
> On Friday 21 March 2003 16:31, Henry Ritzlmayr wrote:
> > I have a service running on a box wich is only able to bind to 127.0.0.1
> > (hardcoded and I can´t get the source to change it). Since I want to use
> > it from any other box the only way to solve that I think is to nat
> > incoming packets to 127.0.0.1.
> >
> > IPTABLES -t nat -A PREROUTING -p tcp -d 172.16.172.12 -j DNAT
> > --to-destination 127.0.0.1
> >
> > and many others wich I tried don´t work.
> >
> > If I understood REDIRECT correctly it only changes to the local IP where
> > the packet came in (in my situation 172.16.172.12) wich also not solves
> > the problem.
> >
> > any ideas?
> >
> > Henry
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE+eybk8hhhNOp8KlQRAiRpAJ9h3NJ7OLgMhBnPG+ToZ9dAweXAOwCg3R/4
> WtZ8kbHYrihBupFC91nPUeg=
> =PFnF
> -----END PGP SIGNATURE-----
>
next prev parent reply other threads:[~2003-03-21 17:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-21 14:31 Redirecting incoming traffic to 127.0.0.1 Henry Ritzlmayr
2003-03-21 14:51 ` Negrea Mihai
2003-03-21 17:05 ` Henry Ritzlmayr [this message]
[not found] ` <016101c2efbb$db2b8360$8201a8c0@daviddesktop>
2003-03-21 16:58 ` Henry Ritzlmayr
-- strict thread matches above, loose matches on Subject: below --
2003-03-21 17:34 Daniel Chemko
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=1048266341.1492.153.camel@localhost.localdomain \
--to=h.ritzlmayr@gmx.at \
--cc=mike@spidernet.co.ro \
--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.