etc/services - sync with NetBSD-8
[minix.git] / external / bsd / blacklist / libexec / blacklistd-helper
blob0b9deb93ee3f9a42532c35cef289d0c3730f1e75
1 #!/bin/sh
2 #echo "run $@" 1>&2
3 #set -x
4 # $1 command
5 # $2 rulename
6 # $3 protocol
7 # $4 address
8 # $5 mask
9 # $6 port
10 # $7 id
12 case "$1" in
13 add)
14 if [ -n "$3" ]; then
15 proto="proto $3"
17 if [ -n "$6" ]; then
18 port="port $6"
20 exec /sbin/npfctl rule $2 add block in final $proto from $4/$5 to any $port
22 rem)
23 exec /sbin/npfctl rule $2 rem-id $7
25 flush)
26 exec /sbin/npfctl rule $2 flush
29 echo "$0: Unknown command '$1'" 1>&2
30 exit 1
32 esac