From: James Boddington (boddingt_at_optusnet.com.au)
Date: Wed 07 Sep 2005 - 07:39:38 BST
Paul Haddad wrote:
> Doesn't work (nor do a half dozen other things I've tried). Yeah I
> know its not a vserver specific question but I'm guessing I'm not the
> only one who's run into this? So maybe its worth an answer so google
> finds it when other people are curious..
I have the following in my /etc/ppp/ip-up.local to redo the SNAT rules
everytime I reconnect to the net.
IP="172.16.31.11 172.16.31.2 172.16.31.4 172.16.27.5"
PPPIP=`ifconfig ppp0 | grep 'inet addr' | awk -F: '{print $2}' | awk
'{print $1}'`
iptables -t nat -F POSTROUTING
iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE
iptables -t nat -I POSTROUTING -o bcsf0 -j MASQUERADE
for ip in ${IP}
do
iptables -t nat -I POSTROUTING -o ppp0 -s ${ip} -j SNAT \
--to-source ${PPPIP}
done
-- James _______________________________________________ Vserver mailing list Vserver_at_list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver