From: Gregory Nowak <greg@romuald.net.eu.org>
To: speakup@braille.uwo.ca
Subject: iptables help please
Date: Wed, 21 Mar 2007 23:18:18 -0700 [thread overview]
Message-ID: <20070322061818.GA21381@localhost.localdomain> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all.
I'm trying to setup iptables, so that if I connect to localhost port
xxx, the connection will be redirected to a machine on my internal lan
on the same xxx port.
So, what I've put into my firewall script is:
iptables -t nat -A PREROUTING -p tcp -i lo --dport xxx -j DNAT
- --to-destination 192.168.0.4
all on one line of course, and where xxx is a valid tcp port number.
However, when I telnet to localhost xxx, I get "trying 127.0.0.1", and
then "connection refused", even though I am able to telnet to
192.168.0.4 on port xxx without a problem.
I also know for a fact that the above line works just fine if I want to expose ports from
machines on my internal network to the outside world, using eth0
instead of lo in those scenarios of course.
So, Can someone please tell me what I'm missing? Is it possible
perhaps that lo cannot be treated in the same way that eth0, my
outside interface, and eth1, my lan interface are treated? Thanks in
advance for any help.
Greg
- --
web site: http://www.romuald.net.eu.org
gpg public key: http://www.romuald.net.eu.org/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
- --
Free domains: http://www.eu.org/ or mail dns-manager@EU.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFGAh+q7s9z/XlyUyARAmPvAKCKhLE4V26PNAo8tdGfoygtfpMsQACgxqLu
8s4rfz3Cvw7skcCDtcaaiM4=
=17oE
-----END PGP SIGNATURE-----
next reply other threads:[~ UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
Gregory Nowak [this message]
` Willem van der Walt
` Gregory Nowak
` Dawes, Stephen
` Dawes, Stephen
` fedora core 6 installing everything Nick Gawronski
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=20070322061818.GA21381@localhost.localdomain \
--to=greg@romuald.net.eu.org \
--cc=speakup@braille.uwo.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).