Changeset 57

Show
Ignore:
Timestamp:
04/20/08 20:00:22 (10 years ago)
Author:
rmcmillen
Message:

Fixes Ticket#39. The firewall script now properly reads the black/white/fence files.

Location:
honeywall/trunk/rpm-devel/roo-base
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • honeywall/trunk/rpm-devel/roo-base/roo-base.spec

    r45 r57  
    2424# Version follows CentOS version so yum $releasever works 
    2525Version: 5 
    26 Release: 26.hw 
     26Release: 27.hw 
    2727License: GPL 
    2828Source: %{name}-%{version}.tar.gz 
  • honeywall/trunk/rpm-devel/roo-base/src/etc/rc.d/init.d/rc.firewall

    r1 r57  
    323323      logger -p local0.info "rc.firewall: loading blacklist from ${HwFWBLACK}" 
    324324 
    325       IPS=`cat ${HwFWBLACK} | grep -v ^#` 
     325      IPS=$(cat ${HwFWBLACK} | grep -v ^# | sed 's/[\r|\n]//') 
    326326      for ip in $IPS; do 
    327327         iptables -A BlackList -s "${ip}" -j DROP 
     
    343343      logger -p local0.info "rc.firewall: loading whitelist from ${HwFWWHITE}" 
    344344 
    345       IPS=`cat ${HwFWWHITE} | grep -v ^#` 
     345      IPS=$(cat ${HwFWWHITE} | grep -v ^# | sed 's/[\r|\n]//') 
    346346      for ip in $IPS; do 
    347347         iptables -A WhiteList -s "${ip}" -j ACCEPT  
     
    364364      logger -p local0.info "rc.firewall: loading fencelist from ${HwFWFENCE}" 
    365365 
    366       IPS=`cat ${HwFWFENCE} | grep -v ^#` 
     366      IPS=$(cat ${HwFWFENCE} | grep -v ^# | sed 's/[\r|\n]//') 
    367367      for ip in $IPS; do 
    368           
    369368         iptables -A FenceList -d "${ip}" -j FenceLogDrop 
    370369      done 
    371370 
    372          iptables -A FenceLogDrop  -j LOG --log-level debug \ 
    373              --log-prefix "BOUNCED OFF Fence: " 
    374          iptables -A FenceLogDrop  -j DROP 
     371      iptables -A FenceLogDrop  -j LOG --log-level debug \ 
     372          --log-prefix "BOUNCED OFF Fence: " 
     373      iptables -A FenceLogDrop  -j DROP 
    375374       
    376375