[CentOS] firewall?

Mon Jul 18 04:24:02 UTC 2011
hadi motamedi <motamedi24 at gmail.com>

On 7/16/11, Fajar Priyanto <fajarpri at arinet.org> wrote:
> 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.
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
Thank you very much for your help. At now, I have put my windows
machine behind my centos 5.6 firewall server with just one NIC. The
windows machine can ping 192.9.9.3 but it cannot browse Internet like
connecting to google. I have set its DNS too. Can you please let me
know what step is missing?
Thank you