[CentOS] firewall?

Sat Jul 16 11:11:30 UTC 2011
Fajar Priyanto <fajarpri at arinet.org>

Do this:
1. Make sure your Centos has two network card. One connected to
internet, one to local lan. Make sure the Centos can already browsing
internet.
Example internet: eth0 192.168.1.1
local: eth1 192.168.2.1

2. Activate ip forwarding in /etc/sysconfig/sysctl.conf
net.ipv4.ip_forward = 1

Run sysctl -r to reload the new setting

3. Type this iptables command to share internet:
iptables ­-t nat -­A POSTROUTING ­-o eth0 -­j MASQUERADE

4. Set your windows box to use 192.168.2.1 as it's default gateway.
Don't forget to give it DNS too like 8.8.8.8

5. I'd suggest you join your Linux Local User Group to have more help.