firewall chain script [SOLVED] Home Page › Forums › Network Management › ZeroShell › firewall chain script [SOLVED] This topic contains 1 reply, has 0 voices, and was last updated by mezcal 11 years ago. Viewing 3 posts - 1 through 3 (of 3 total) Author Posts August 15, 2008 at 10:17 am #41142 mezcalMember Hello, I am setting firewall. I have writed some rule in setup – startup – firewall chain. if [ "$CHAIN" = FORWARD ] ; then : # put here the commands for the chain FORWARD -A FORWARD -d 192.168.14.5 -i ETH00 -p tcp -m tcp --dport 21 --tcp-flags SYN,RST,ACK SYN -j ACCEPT fi I restarted zeroshell but rule is not added. What s wrong? Yes, I can do it in menu firewall. But writing the text is simpler. Thanks in advence. Filip August 16, 2008 at 7:16 am #46775 imported_fulvioParticipant You forgot of starting your firewall rule with the word iptables. Try with the following piece of code: if [ “$CHAIN” = FORWARD ] ; then : # put here the commands for the chain FORWARD iptables -A FORWARD -d 192.168.14.5 -i ETH00 -p tcp -m tcp –dport 21 –tcp-flags SYN,RST,ACK SYN -j ACCEPT fi You should test it before rebooting by clicking the [Test] button. Do not forget to enable the Firewall script by using the [Enabled] flag. Regards Fulvio August 16, 2008 at 7:59 am #46776 mezcalMember Thanks Fulvio, word iptables is necessary. 😳 It works. Regards Filip Author Posts Viewing 3 posts - 1 through 3 (of 3 total) You must be logged in to reply to this topic.