Linux Netfilter discussions
 help / color / mirror / Atom feed
From: =?unknown-8bit?q?J=F6rgen?= Danielsson <jorgen_d@yahoo.com>
To: netfilter@lists.samba.org
Subject: problem with forward and iptables
Date: Wed, 3 Jul 2002 08:57:02 -0700 (PDT)	[thread overview]
Message-ID: <20020703155702.95481.qmail@web9904.mail.yahoo.com> (raw)

This is part of the rules

PROG="/usr/sbin/iptables"

$PROG -t nat -A POSTROUTING -j SNAT --source
iii.iii.iii.0/255.255.255.128 --to-source
ooo.ooo.*17.*50 -o eth1

### Set a default policy of DROP
$PROG -P FORWARD DROP
$PROG -P INPUT DROP
$PROG -P OUTPUT DROP


## navgw

# mail
$PROG  -t nat -A PREROUTING -p tcp -d ooo.ooo.*17.*54
--dport 25 -j DNAT --to iii.iii.iii.*15:25
$PROG -A FORWARD -p tcp -d iii.iii.iii.*15 --dport 25
-j ACCEPT
$PROG -A INPUT -p tcp --destination ooo.ooo.*17.*54
--destination-port 25 -j ACCEPT

# Allow SMTP 
$PROG -A FORWARD -j ACCEPT -i eth1 -o eth0
--destination iii.iii.iii.*15 -p tcp --dport 25
$PROG -A FORWARD -j ACCEPT -i eth1 -o eth0
--destination iii.iii.iii.*15 -p tcp --sport 25
$PROG -A FORWARD -j ACCEPT -i eth0 -o eth1 --source
iii.iii.iii.*15 -p tcp --dport 25
$PROG -A FORWARD -j ACCEPT -i eth0 -o eth1 --source
iii.iii.iii.*15 -p tcp --sport 25


ooo.ooo.*17.*50 is on eth1 (outside)
ooo.ooo.*17.*54 is another ip on eth1 (outside)

iii.iii.iii.*15 is a ip on a masq network (behind the
fw)

both ooo.ooo.ooo.ooo and iii.iii.iii.iii is real class
c-net (even though iii.iii.iii.iii is being masqed),
which mean no net is a 192.168.0.0/255.255.0.0 or
10.0.0.0/255.0.0.0 or 172.16.0.0/255.255.255.0

The problem:

Telnet from the outside to ooo.ooo.*17.*54 : 25 does
what its supposed to do, i get a reply from a smtp
server. But then i noticed that iii.iii.iii.*15 : 25
gives the same reply. How come ? No other ip on the
iii.iii.iii.iii net is reachable. Is the forward rule
opening for access directly to the masqed ip ? and how
do i stop that ?

/Jörgen



__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com


             reply	other threads:[~2002-07-03 15:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-03 15:57 =?unknown-8bit?q?J=F6rgen?= Danielsson [this message]
2002-07-03 16:20 ` problem with forward and iptables Antony Stone
2002-07-03 16:39   ` problem with forward and iptables (added one more prob in here) =?unknown-8bit?q?J=F6rgen?= Danielsson
2002-07-03 18:05     ` Antony Stone

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=20020703155702.95481.qmail@web9904.mail.yahoo.com \
    --to=jorgen_d@yahoo.com \
    --cc=netfilter@lists.samba.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