Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > System > Networking

    iptables firewall script 0.5

    Download button

    No screenshots available
    Downloads: 454  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



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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