Click to See Complete Forum and Search --> : Internet Connection Sharing and a Firewall


jrbush82
09-19-2001, 01:43 PM
Hello, I have a script that works decent as far as sharing an internet connection, and it also has a firewall on it. Here is the script...

#!/bin/sh

echo -e "\nStarting ICS & Firewall.\n"

/sbin/depmod -a
/sbin/insmod ip_tables
/sbin/insmod ip_conntrack
/sbin/insmod ip_conntrack_ftp
/sbin/insmod iptable_nat
/sbin/insmod ip_nat_ftp
/sbin/insmod iptable_filter
/sbin/insmod ipt_MASQUERADE

iptables -F
iptables -t nat -F
iptables -X

iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A INPUT -i eth0 -p tcp --syn -j DROP

echo -e "\nDone.\n"

I really have no idea on IPTABLES, and I've tried reading up on it... I just can't grasp it I guess. I just want to get rid of the firewall completely, and just forward information and crap with no firewall.

What do I need to do to that script?

Take out the

iptables -A INPUT -i eth0 -p tcp --syn -j DROP

part... seems to be logical... because it would be dropping the packets?????

de_lupus
09-19-2001, 05:21 PM
install gSchield :p

jrbush82
09-20-2001, 01:13 AM
why? all I gotta do is use a simple script and it works

slacker_x
09-20-2001, 01:21 AM
just take out that one line you mentioned and you will just be doing connection sharing.

that rule was only blocking traffic destined for the firewall anyway, so it shouldn't have mattered much