Hi guys…
On this documentation… Will help you to setup linux server as a network gateway without installing any proxy softwares….
#!/bin/sh
# The interface conneected to Your LAN
INTIF=”eth1?
# The interface conneected to Internet (ppp0 or eth)
EXTIF=”eth0?
# If you have a static IP (Public IP), Use the following line. Otherwise comment following line and use the next line
EXTIP=”XXX.XXX.XXX.XXX”EXTIP=”`/sbin/ifconfig ppp0 | grep ‘inet addr’ | awk ‘{print $2}’ | sed -e ’s/.*://’`”
/sbin/depmod -a
/sbin/modprobe ip_tables
/sbin/modprobe ip_conntrack
/sbin/modprobe ip_conntrack_ftp
/sbin/modprobe ip_conntrack_irc
/sbin/modprobe iptable_nat
/sbin/modprobe ip_nat_ftp
echo “1? > /proc/sys/net/ipv4/ip_forward
echo “1? > /proc/sys/net/ipv4/ip_dynaddr
iptables -P INPUT ACCEPT
iptables -F INPUT
iptables -P OUTPUT ACCEPT
iptables -F OUTPUT
iptables -P FORWARD DROP
iptables -F FORWARD
iptables -t nat -F
iptables -A FORWARD -i $EXTIF -o $INTIF -m state –state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
iptables -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
#End Of file
# execute this script and bring it to the startup of your system.
# Go to a client machine in your LAN, and set the gateway to the Linux server’s internal IP address, that’s all.

















