From: Sander Sneekes <sander@dmdsecure.com>
To: Todd Hartman <thartman@bass-inc.com>
Cc: "'netfilter@lists.netfilter.org'" <netfilter@lists.netfilter.org>
Subject: Re: Port Forwarding only works outside?
Date: 10 Dec 2002 17:28:51 +0100 [thread overview]
Message-ID: <1039537731.7136.10.camel@sander> (raw)
In-Reply-To: <97AE76F7052DBB43A268427FCAAEF0371BF6CE@s-2k-corp1.bass-inc.com>
try
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE
iptables -A FORWARD -p tcp --dport 25 -d 192.168.1.29 -j ACCEPT
iptables -A PREROUTING -t nat -p tcp --dport 25 -d x.x.x.x -j DNAT --to
192.168.1.29
x.x.x.x = eth0 external ip
On Tue, 2002-12-10 at 16:31, Todd Hartman wrote:
> I've come across an issue I just don't know how to solve. I'm not even
> certain it's an issue with iptables itself, but I thought that someone
> here might have run across this before and have some advice.
>
> I've got a RH7.3 box set up with two NICs. Eth0 is external and eth1
> is internal. Internal network is 192.168.1.* with netmask
> 255.255.255.128. I need to forward traffic on eth0, port 25 to
> 192.168.1.29. The firewall is 192.168.1.1 - both in the same subnet as
> I understand it.
>
> When I forward SMTP traffic to 192.168.1.29 and try to telnet to port
> 25 to test SMTP, it just sits there, unresponsive. BUT, if I forward
> eth0 port 25 traffic to a machine out on the internet, it works just
> fine.
>
> I suspect a networking problem, but I don't know well enough to pin it
> down myself.
>
> -T
>
next prev parent reply other threads:[~2002-12-10 16:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-10 15:31 Port Forwarding only works outside? Todd Hartman
2002-12-10 16:28 ` Sander Sneekes [this message]
2002-12-10 17:43 ` Brad Morgan
-- strict thread matches above, loose matches on Subject: below --
2002-12-10 17:00 Todd Hartman
2002-12-10 17:53 ` Andrea Rossato
2002-12-10 18:18 Todd Hartman
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=1039537731.7136.10.camel@sander \
--to=sander@dmdsecure.com \
--cc=netfilter@lists.netfilter.org \
--cc=thartman@bass-inc.com \
/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.