Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > System > Networking

    iptables firewall script 0.5

    Download button

    No screenshots available
    Downloads: 516  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Rick Dicaire | More programs
    GPL / FREE
    February 14th, 2007, 17:29 GMT
    ROOT / System / Networking

     Read user reviews (0)  Refer to a friend  Subscribe

    iptables firewall script description

    iptables firewall script is an Linux firewall based on the iptables software.

    iptables firewall script is an Linux firewall based on the iptables software.

    Sample:

    ######## START FUNCTIONS #########
    scripthelp () {
    cat t restart > /dev/null 2>&1
    # Check every 5 minutes:
    # */5 * * * * /path/to/this/script restart > /dev/null 2>&1

    OLDIP=`$PROG -n -L INPUT| grep 6005|grep udp| cut -b55-|cut -f1 -d u`

    case $1 in

    start)
    if [ -z "$OLDIP" ];
    then
    echo -n "Starting firewall..."
    fireme
    elif [ $IP = $OLDIP ];
    then
    echo "FIREWALL IS UPDATED."
    fi
    ;;
    restart)
    echo -n "Restarting firewall..."
    if [ -z "`$PROG -n -L INPUT| grep 6005`" ];
    then
    fireme
    elif [ $IP = $OLDIP ];
    then
    echo "FIREWALL IS UPDATED."
    else
    for i in DENIED_PORT_PRIV DENIED_PORT_UNPRIV_TCP DENIED_PORT_UNPRIV_UDP ONTHEFLY
    do
    $PROG -F $i
    $PROG -F INPUT
    $PROG -F FORWARD
    $PROG -X $i
    done
    fireme
    fi
    ;;
    refresh)
    echo -n "Resetting firewall..."
    if [ -z "`$PROG -n -L INPUT| grep 6005`" ];
    then
    fireme
    else
    for i in DENIED_PORT_PRIV DENIED_PORT_UNPRIV_TCP DENIED_PORT_UNPRIV_UDP ONTHEFLY
    do
    $PROG -F $i
    $PROG -F INPUT
    $PROG -F FORWARD
    $PROG -X $i
    done
    fireme
    fi
    ;;
    stop)
    for i in DENIED_PORT_PRIV DENIED_PORT_UNPRIV_TCP DENIED_PORT_UNPRIV_UDP ONTHEFLY
    do
    $PROG -F $i
    $PROG -F INPUT
    $PROG -F FORWARD
    $PROG -X $i
    done
    echo "Firewall stopped...[ [32;01mOK [0m]"
    ;;
    *)
    echo
    scripthelp
    ;;
    esac
    fi

    Product's homepage

      


    TAGS:

    iptables firewall | netfilter firewall | IP firewall | iptables | netfilter | IP

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM