* howto setup masquerade in multihomed server
@ 2008-12-09 2:57 sean darcy
0 siblings, 0 replies; only message in thread
From: sean darcy @ 2008-12-09 2:57 UTC (permalink / raw)
To: netfilter
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-12-09 2:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-09 2:57 howto setup masquerade in multihomed server sean darcy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox