[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] pmfirewall



Installing a firewall can cause you to get locked out of your system.
If you cut and paste the following patch to /etc/rc.d/init.d/pmfirewall
You can cause it to run for a short period of time.
After you run install.sh;
open /etc/rc.d/init.d/pmfirewall in your favorite editor.
Find Set "default policy" in /etc/rc.d/init.d/pmfirewall
Add the lines below to.
Set TTF for some number of seconds for the firewall to run
When you are sure it will work set it to 0

     ## Set default policy
     $IPCHAINS -A output -j ACCEPT
     $IPCHAINS -A input -j DENY -l
# ======= ADD to /etc/rc.d/init.d/pmfirewall =======#
     # disable after $TTF seconds.
     TTF=30  # set this to the number of seconds to run
     if test $TTF -gt 0
     then
        echo "Firewall rules runing for $TTF seconds"
        (sleep $TTF; \
         /etc/rc.d/init.d/pmfirewall stop  # stop firewall rules
        ) &
     else
        echo "Firewall rules running for ever"
     fi
# =========== End of Addition ============== #
     echo "             Done!"
 
Don't forget to set TTF to 0 when you are satisfied, so the firewall
will run for ever.
There is one little glitch? After running for a few seconds, and stopping
there is no prompt, but hitting enter, or running another command the
prompt will return.
Gerald