From: Mattia Martinello <liste@mattiamartinello.com>
To: netfilter@lists.netfilter.org
Subject: DNAT on Debian
Date: Sun, 31 Aug 2003 04:00:59 +0200 [thread overview]
Message-ID: <3F5156DB.7080407@mattiamartinello.com> (raw)
Hi all
I created a script that setup a set of rules on the nat table.
It works good without any problem on SuSE 8.0, and now I wish to move
the system on Debian.
I installed Debian and I set the network correctly like on SuSE and I
copied the script on it.
The scripts shows me no error, and the rules works good, but there is a
little problem.
The DNATs from the local network works very well (I can see the server
which is on the DMZ from the local network), but the DNATs from the
Internet doesn't work! From the Internet (ppp0) i cannot see the server
which is on the DMZ.
On SuSE 8.0 all works good and I didn't change anything in the script!
The input, output and forward chains are all setted on ACCEPT, like all
the chains on the nat table.
This works good:
iptables -t nat -A POSTROUTING -s $LocalNET/24 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s $LocalNET/24 -o ppp0 -j ACCEPT
iptables -t nat -A POSTROUTING -s $LocalNET/255.255.255.0 -o eth2 -j
MASQUERADE
iptables -t nat -A PREROUTING -p tcp -i eth1 -d $PublicIP -j DNAT --to
$ServerIP
This DOESN'T work!
iptables -t nat -A PREROUTING -p tcp -i ppp0 -d $PublicIP --dport 80 -j
DNAT --to $ServerIP:80
The kernel in use is 2.4.20 with all netfilter modules.
Where could be the problem? Shall I attach the script?
Thank you very much!
Bye
Mattia.
next reply other threads:[~2003-08-31 2:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-31 2:00 Mattia Martinello [this message]
2003-09-03 9:50 ` DNAT on Debian Ralf Spenneberg
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=3F5156DB.7080407@mattiamartinello.com \
--to=liste@mattiamartinello.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