/sbin/insmod ip_conntrack_ftp
/sbin/insmod iptable_nat
/sbin/insmod ip_nat_ftp
echo "- Enabling packet fowarding in the kernel"
echo "1" > /proc/sys/net/ipv4/ip_forward
echo " - Enabling dynamic addressing measures"
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
echo "-Resetting the firewall andsetting the default FORWARD policy to
DROP"
$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD
#You must change eth0 to ppp0 if you are using a modem or change eth0 and
#eth1 to another network device if that is not what you are using.
echo " - FWD: Allow all connections OUT andonly existing and related ones IN"
$IPTABLES -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i eth1 -o eth0 -j ACCEPT
$IPTABLES -A FORWARD -j LOG
echo "- Enabling SNAT (MASQUERADE) funtionality on eth0"
$IPTABLES -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo -e "\nDone.\n"
Now that that's all done you will simply need to configure your client.
· The ip the machine running ipmasquerading needs to set as the gateway.
· Your ISP's dns server needs to be set as your dns server.
· The ip address should be 192.168.0.x if your running a 192.168.0.0 network
· The submast should be 255.255.255.0
· The domain name needs to be your isp's domain name. ie. msn.com bellsouth.net
· The hostname can be whatever.
If you require any further assistance please visit us in IRC channel #LinuxHelp.net on the DALnet IRC network or write me an email.