"Fossies" - the Fresh Open Source Software Archive

Member "sshdfilter-1.5.7/scripts/ipfw.save" (8 Apr 2007, 508 Bytes) of package /linux/privat/old/sshdfilter-1.5.7.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 
    3 # Set these to include all the rules used by sshdfilter, that includes
    4 # both the dynamic rules, *and* and skipto rules.
    5 IPFWMIN=1000
    6 IPFWMAX=1999
    7 
    8 # Set the above, then comment out these two lines.
    9 echo "Disabled until you edit this script!"
   10 echo "Double warning, this script is untested!!"
   11 exit
   12 
   13 ipfw show | awk -vipmin=$IPFWMIN -vipmax=$IPFWMAX -- '{if($1>=ipmin && $2<=ipmax)printf "%s\n",$0;}' > /etc/sshdfilter.ipfw
   14 
   15 awk < /etc/sshdfilter.ipfw -- '{printf "ipfw delete %s\n",$1;}' | bash
   16