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 10 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #41142

    mezcal
    Member

    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

    #46775

    imported_fulvio
    Participant

    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

    #46776

    mezcal
    Member

    Thanks Fulvio,

    word iptables is necessary. 😳
    It works.

    Regards
    Filip

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.