From: Damian Gatabria <damian_g@speedy.com.ar>
To: Lista Netfilter <netfilter@lists.netfilter.org>
Subject: iptables dnat to loopback
Date: Fri, 06 Aug 2004 08:38:34 -0300 [thread overview]
Message-ID: <1091792314.2256.18.camel@localhost> (raw)
Hello listers.
I know this is probably not the proper place to ask
a support question, but after a long googling
session and asking in my regular lists i was unable to
get an answer for what i think is a rather tough situation..
So, flame me if you must, but here it is =oP
I have a rather busy server box hosting several web
sites in separate independent installation directories,
which means several apache, mysql and tomcat installations
running simultaneously, with each mysql instance binding
a port in the loopback interface.
Now, for a very specific reason, i need to provide someone
with remote access to one of these mysql instances.
It would be a real hassle to change mysql's config
(and the webapps' working with it) so i just decided
to use DNAT to redirect incoming tcp connections
to the loopback interface.... but for some reason you
hopefully already know about, it doesn't seem to work.
So, while this iptables rule does work for port forwarding
to another host:
iptables -t nat -A PREROUTING -p tcp -i eth0 -m multiport \
--dports mysql -j DNAT --to some.other.host
changing "some.other.host" to 127.0.0.1 doesn't work
as expected, and packets seem to be dropped altogether.
Using tcpdump i can see packets reaching eth0, but
never reaching loopback.
Is there any way to make iptables do what i'm looking
for? Any help will be greatly appreciated.
Thanks much.
--
Damian Gatabria <damian_g@speedy.com.ar>
next reply other threads:[~2004-08-06 11:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-06 11:38 Damian Gatabria [this message]
2004-08-06 11:54 ` iptables dnat to loopback Klemen Kecman
-- strict thread matches above, loose matches on Subject: below --
2004-08-06 12:48 Jason Opperisano
2004-08-06 17:13 Jason Opperisano
2004-08-07 10:15 ` David Cannings
2004-08-08 6:17 ` Damian Gatabria
2004-08-08 8:41 ` David Cannings
2004-08-08 17:50 ` Alistair Tonner
2004-08-09 14:40 ` Damian Gatabria
2004-08-10 1:29 ` Damian Gatabria
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=1091792314.2256.18.camel@localhost \
--to=damian_g@speedy.com.ar \
--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.