
Hi Cynthia, All the explanations given are correct but in my experience you'll lose these settings in case the server reboots, this solution works without modifying iptables, basically what you are doing is making your linux box a router. Assuming eth0 is your WAN interface, add the following lines to /etc/rc.local echo 1 > /proc/sys/net/ipv4/ip_forward /sbin/route add default gw 192.168.6.1 dev eth0 Then restart your network service and run the rc.local script On 28 March 2014 13:04, Thuo Wilson <lixton@gmail.com> wrote:
On 28 March 2014 12:50, Thuo Wilson <lixton@gmail.com> wrote:
iptables -t nat -A POSTROUTING -s 10.10.20/255.255.255.0 -o eth0 -j MASQUERADE *OR the same principle here but you need to change SNAT ip everytime u change provider or WAN ip* iptables -t nat -A POSTROUTING -s 10.10.20/255.255.255.0 -j SNAT --to-source 192.168.6.142
Grrr ---makosa ya network address
iptables -t nat -A POSTROUTING -s 10.10.20.0/255.255.255.0 -o eth0 -j MASQUERADE *OR the same principle here but you need to change SNAT ip everytime u change provider or WAN ip* iptables -t nat -A POSTROUTING -s 10.10.20.0/255.255.255.0 -j SNAT --to-source 192.168.6.142
This is why i love shortcuts:
iptables -t nat -A POSTROUTING -s 10.10.20.0/24 <http://255.255.255.0/> -o eth0 -j MASQUERADE *OR the same principle here but you need to change SNAT ip everytime u change provider or WAN ip* iptables -t nat -A POSTROUTING -s 10.10.20.0/24 <http://255.255.255.0/> -j SNAT --to-source 192.168.6.142
Kind Regards, Wilson./
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
-- Regards, @njukey