From: sean darcy <seandarcy2@gmail.com>
To: netfilter@vger.kernel.org
Subject: howto setup masquerade in multihomed server
Date: Mon, 08 Dec 2008 21:57:17 -0500 [thread overview]
Message-ID: <ghkmqe$sus$1@ger.gmane.org> (raw)
I've got one internal interface (INTIF), a static external interface
(EXTIF) and a Verison DSL external interface (VERISONIF). I want to use
EXTIF just for voip and the VERIZONIF for general internet. I can set
this all up on the server, setting the correct default route.
If EXTIF is set as the default route ( not what I eventually want ), NAT
works fine with this SNAT:
$IPT -t nat -A POSTROUTING -o $EXTIF -j SNAT --to-source xxx.yyy.zzz.aaa
but if I set the default route to VERIZONIF ( dynamic address ) , NAT
doesn't work with this masquerade:
$IPT -t nat -A POSTROUTING -o $VERIZONIF -j MASQUERADE
Forward should work regardless of interface:
#now set up block firewall chain
/sbin/iptables -N block
/sbin/iptables -A block -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A block -i $INTIF -j ACCEPT
/sbin/iptables -A block -j DROP
# allow all from localhost
$IPT -A INPUT -i lo -j ACCEPT
$IPT -A OUTPUT -o lo -j ACCEPT
#allow from ssh
$IPT -A INPUT -p tcp -s 0/0 --dport 22 -j ACCEPT #ssh
# send everything else to the block chain
$IPT -A INPUT -j block
$IPT -A FORWARD -j block
So what am I missing?
sean
reply other threads:[~2008-12-09 2:57 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='ghkmqe$sus$1@ger.gmane.org' \
--to=seandarcy2@gmail.com \
--cc=netfilter@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.