Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Marc Peiser <marc@gocontent.com>
To: netfilter@lists.netfilter.org
Subject: iptables/multiple external natting problem
Date: Tue, 25 Oct 2005 18:40:39 +0100	[thread overview]
Message-ID: <435E6E17.9040602@gocontent.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

Hi,

I'm trying to setup a firewall at our data center and I think I'm 
missing a few things here. I have a Class C ip range, lets call it 
1.2.3.0/24. I have a firewall running kernel 2.6.9 and iptables 1.2.11. 
My firewall has 2 network interfaces, on the external interface I've 
added an alias for each external ip that I want to nat to internal servers:

eg. ifconfig eth0:0 1.2.3.10 netmask 255.255.255.0
(Is this the correct way to use multiple ip's?)

My servers on the inside interface are on the 192.168.0.0/24 network.

I'm able to ssh to an internal server via an external ip address.
The problem is I can't seem to connect out (via ssh, dns, www etc) from 
the inside servers. There is a rule blocking these connections as it 
shows me in the firewall logs:

Oct 25 18:27:22 fw1 kernel: IN=eth1 OUT=eth0 SRC=192.168.0.20 
DST=4.3.2.1 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=28642 DF PROTO=UDP 
SPT=32769 DPT=53 LEN=40
Oct 25 18:27:31 fw1 kernel: IN=eth1 OUT=eth0 SRC=192.168.0.20 
DST=4.3.2.1 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=18271 DF PROTO=TCP 
SPT=32792 DPT=22 WINDOW=5840 RES=0x00 SYN URGP=0

I've attached my firewall script, could someone please take a look at it 
and give me a hand. Or if they have a similar setup, could you send me 
your config. If there is a better way to do this, please let me know.

Many thanks,
Marc

[-- Attachment #2: firewall.sh --]
[-- Type: application/x-shellscript, Size: 3451 bytes --]

             reply	other threads:[~2005-10-25 17:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-25 17:40 Marc Peiser [this message]
2005-10-25 22:25 ` iptables/multiple external natting problem (nfcan: addressed to exclusive sender for this address) Jim Laurino

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=435E6E17.9040602@gocontent.com \
    --to=marc@gocontent.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