diff --git a/ChangeLog b/ChangeLog index 9884958..8ce25bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,10 @@ - New block file format, much more capable now, thanks to an hour or two of improving my bash scripting skills to the point where I can do more complex breakdowns of formats + - Rename blocked to ipv4-blocked since we're going to have + ipv6 support + - ipv6 blocking support. Different format for config file + because IPv6 uses :, which means we get to use | 0.9.7 - Brielle Bruns - Support for marking packets, uses new config file and diff --git a/bin/firewall-sosdg b/bin/firewall-sosdg index 62653a9..afda1ba 100755 --- a/bin/firewall-sosdg +++ b/bin/firewall-sosdg @@ -139,8 +139,8 @@ if [ $BLOCKEDIP ]; then display_c YELLOW "Adding blocked IPs... " for i in `grep -v "\#" $BLOCKEDIP`; do #echo -n "$i " - if [[ "$i" =~ ":" ]]; then - IFS_OLD=${IFS};IFS=: + if [[ "$i" =~ "|" ]]; then + IFS_OLD=${IFS};IFS=\| ADVBLKIP=($i) IFS=${IFS_OLD} SRCIF=${ADVBLKIP[0]} diff --git a/ipv4-blocked.default b/ipv4-blocked.default index 80f1b5c..ed6980b 100644 --- a/ipv4-blocked.default +++ b/ipv4-blocked.default @@ -2,11 +2,11 @@ # Two formats: # 1) One IP or range per line # 2) One ip or range per line with added specific IN/OUT/FWD and TCP/UDP port (added in 0.9.8) -# ::::::: +# ||||||| # One can leave out # if you want to apply to all ports/interfaces/etc # Example: # - Block SRC of eth1 192.168.0.5:80 from contacting DST eth0 192.168.1.10:20 through 21, TCP -# eth1:192.168.0.5:80:eth0:192.168.1.10:20-21:IN:TCP -# Useful ones that I use at home are: -#::6881-6999:::OUT:TCP +# eth1|192.168.0.5|80|eth0|192.168.1.10|20-21|IN|TCP +# Useful ones that I use at home are| +#||6881-6999|||OUT|TCP