From: Alejandro Flores <alejandro.flores@triforsec.com.br>
To: Wilson Mak <wilson.mak@digitalview.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: Port Forwarding with iptables
Date: Thu, 19 Aug 2004 13:39:19 -0300 [thread overview]
Message-ID: <1092933559.3705.7.camel@aflores> (raw)
In-Reply-To: <412487B7.9090505@digitalview.com>
Hello Wilson,
> iptables -t nat -A PREROUTING -i eth0 -d <ext ip> -p tcp --dport 80 -j
> DNAT --to 10.1.0.12:80
That's ok.
> iptables -A INPUT -p tcp -i eth0 -d <ext ip> --dport 80 -m state
> --state NEW -j ACCEPT
This rule is only necessary if you have a webserver running on you
firewall.
> iptables -A FORWARD -p tcp -i eth0 -o eth1 -d <ext ip> --dport 80 -m
> state --state NEW -j ACCEPT
Ops. You made a mistake. You have added a rule which changes the
destination IP address to your internal webserver, remember? Your
forward rule must specify the internal address as destination.
iptables -A FORWARD -p tcp -i eth0 -o eth1 -d 10.1.0.12/32 --dport 80
--syn -j ACCEPT
Regards,
--
--
Alejandro Flores
http://www.triforsec.com.br/
http://www.defenselayer.com/
http://www.nabucodonosor.com/
next prev parent reply other threads:[~2004-08-19 16:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-19 10:57 Port Forwarding with iptables Wilson Mak
2004-08-19 11:15 ` George Alexandru Dragoi
2004-08-19 11:22 ` Nick Drage
2004-08-20 10:06 ` Wilson Mak
2004-08-20 10:15 ` Nick Drage
2004-08-23 3:04 ` Wilson Mak
2004-08-19 16:39 ` Alejandro Flores [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-08-19 11:13 Jason Opperisano
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=1092933559.3705.7.camel@aflores \
--to=alejandro.flores@triforsec.com.br \
--cc=netfilter@lists.netfilter.org \
--cc=wilson.mak@digitalview.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox