Wednesday, July 28, 2010

REDHAT LINUX INTERNET SHARING


Linux net sharing is a very simple method .First you configure 2 network cards
eth0  is first network card connect Internet to this card and configure static ip address
eth1 is second card connect this card to your LAN network give ip address is 192.168.0.1
step 1.   enabling packet forwaring
log in as root
edit   vi /etc/sysctl.conf
add this line to enable packer forwarding ip 4  net.ipv4.conf.default.forwarding=1
save and restart network
step 2. ip  masquerading
give this commad   iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
service iptables save
service iptables restart………….
now you done internet sharing
step 3 xp configuration
take lan card properties in xp
give ip address 192.168.0.XXX
and default gate way  give linux pc ip 192.168.0.1
dns  preferred   same as isp
dns alternate   same as isp
app lay ok   and check the Internet