How To Masquerade On Linux (Internet Connection Sharing)
How To Masquerade On Linux (Internet Connection Sharing)It's very simple to masquerade (internet connection sharing in Windows language ) on Linux with a few lines of iptables and ip_forward commands. First of all you have to flush and delete existing firewall rules. So flush rules by typing in terminal:
iptables -F Now delete these chains: iptables -X Now it's time to save the iptables rules so type: service iptables save Now all rules and chains have been cleared! Check it in /etc/sysconfig/iptables which has all default rules set to accept. Now open /etc/rc.d/rc.local and insert the line: echo "1" > /proc/sys/net/ipv4/ip_forward And then save and close the file. Now asuming that your internet interface is eth0, type: iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE Note: check if iptables is set to start during boot up. Or check the status of your iptables service: chkconfig –list iptables If level 5 is on then it's ok othewise start the service at level 5 or level 2345. Note: The post is also available on my own site - article desktop.
|
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning



![Creative Commons Attribution License [Creative Commons Attribution License]](http://creativecommons.org/images/public/somerights20.gif)




Recent comments
12 hours 55 min ago
14 hours 56 min ago
18 hours 8 min ago
20 hours 27 min ago
21 hours 37 min ago
22 hours 55 min ago
1 day 2 hours ago
1 day 6 hours ago
1 day 6 hours ago
1 day 21 hours ago