Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110462030
D6788.id17480.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6788.id17480.diff
View Options
Index: blacklistd-helper
===================================================================
--- blacklistd-helper
+++ blacklistd-helper
@@ -16,6 +16,9 @@
break
fi
done
+if [ -f "/etc/ipf.conf" ]; then
+ pf="ipfilter"
+fi
if [ -f "/etc/ipfw-blacklist.rc" ]; then
pf="ipfw"
. /etc/ipfw-blacklist.rc
@@ -48,6 +51,10 @@
case "$1" in
add)
case "$pf" in
+ ipfilter)
+ ipfstat -io | ipf -I -f -
+ echo "block in quick proto $proto from $addr/$mask to any port = $port head $port$6" | ipf -I -f - -s
+ ;;
ipfw)
rule=$(( $ipfw_offset + $6 )) # use $ipfw_offset+$port for rule number
tname="port$6"
@@ -69,6 +76,10 @@
;;
rem)
case "$pf" in
+ ipfilter)
+ ipfstat -io | ipf -I -f -
+ echo "block in quick proto $proto from $addr/$mask to any port = $port head port$6" | ipf -r -f - -s
+ ;;
ipfw)
/sbin/ipfw table "port$6" delete "$addr/$mask" 2>/dev/null
;;
@@ -82,6 +93,9 @@
;;
flush)
case "$pf" in
+ ipfilter)
+ /sbin/ipf -Z -I -Fa -s
+ ;;
ipfw)
/sbin/ipfw table "port$6" flush 2>/dev/null
;;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Feb 19, 6:56 PM (20 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16726313
Default Alt Text
D6788.id17480.diff (1 KB)
Attached To
Mode
D6788: Add experimental support for ipfilter to blacklistd-helper.
Attached
Detach File
Event Timeline
Log In to Comment