Quote:
#!/bin/sh
#line above says which shell we are using. You can also change it to #!/bin/bash
#Set the path the file will use
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
# Set your ethernet variables with appropriate ip
eth0 = "192.168.0.1"
eth1 = "192.168.1.1"
# You can also set a variable in place of the iptables name itself.
IPTABLES = "/sbin/iptables"
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
Save the file in the appropriate directory. Set the perms to 700. Then type