Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Justin Booth" <jbooth@ccbill.com>
To: netfilter@lists.netfilter.org
Subject: Internal connection to an External port forwarded ip.
Date: Mon, 24 Mar 2003 02:23:13 -0700	[thread overview]
Message-ID: <005301c2f1e6$fed1ce50$3500000a@WORKSTATION> (raw)

Hi,

    I'm not currently part of the mailing list so please carbon me on any
replies.   The current configuration is:

Firewall (2 interfaces):
    eth0: a.b.c.d
    eth0:1 a.b.c.e  ( e = d+1 ... I got a small netblock of about 5 ip's)
    eth1: 192.168.0.1

Internal Web Server (1 interface):
    eth0: 192.168.0.2

a.b.c.d and a.b.c.e is a public IP address.

Current Rules I'm useing are this:

iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source a.b.c.d
iptables -t nat -A PREROUTING -i eth0 -d a.b.c.e -p tcp --dport 1000 -j
DNAT --to-destination 192.168.0.2
iptables -t nat -A PREROUTING -i eth0 -d a.b.c.e -p tcp --dport 80 -j
DNAT --to-destination 192.168.0.2

Everything looks like it's fine and dandy, from the outside of eth0
everything is fine. I can connect to both port 1000 and port 80 on eth0:1
from any outside source. I have another internal machine on 192.168.0.3. The
problem I am currntly haveing  is that the 192.168.0.3 machine cannot
connect to the forwarded ports on eth0:1 (a.b.c.e) interface, ports 1000 and
80. All I seem to get is a "Connection Refused" unless I add the rule:

iptables -t nat -A PREROUTING -i eth1 -d a.b.c.e -p tcp --dport 80 -j
DNAT --to-destination 192.168.0.2

In which case I get a hung connection on "SYN_SENT" with incomming
connection to the 192.168.0.2 machine.

any help would greatly be appreciated.

Thanks in advance,
    Justin Booth
    jbooth@ccbill.com



                 reply	other threads:[~2003-03-24  9:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='005301c2f1e6$fed1ce50$3500000a@WORKSTATION' \
    --to=jbooth@ccbill.com \
    --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