Commit e47db2b2 authored by Stephan's avatar Stephan

fastd - black/white list: add posibility to add fastd public key to black or white list.

This allows to (ex/in)clude spezific clients
parent aa66f992
# add one IP each line without any leading or trailing characters!
# Blacklist
#
# add one IP or peer public key per line without any leading or trailing characters!
# entries in /etc/fastd/whitelist always has higher priority than
# /etc/conf/ffdd:fastd_restrict and /etc/fastd/blacklist
......@@ -74,7 +74,7 @@ case $1 in
_PEER_ADDRESS=${PEER_ADDRESS//\./\\.}
# check whitelist
if [ -n "$(grep ^$_PEER_ADDRESS$ /etc/fastd/whitelist)" ]; then
if [ -n "$(grep "^$_PEER_ADDRESS$\|$PEER_KEY" /etc/fastd/whitelist)" ]; then
logger -t fastd "whitelisted. ($PEER_ADDRESS:$PEER_PORT key $PEER_KEY)"
else
......@@ -85,7 +85,7 @@ case $1 in
fi
# check blacklist
if [ -n "$(grep ^$_PEER_ADDRESS$ /etc/fastd/blacklist)" ]; then
if [ -n "$(grep "^$_PEER_ADDRESS$\|$PEER_KEY" /etc/fastd/blacklist)" ]; then
logger -t fastd "blacklisted. ($PEER_ADDRESS:$PEER_PORT key $PEER_KEY)"
exit 1;
fi
......
# add one IP each line without any leading or trailing characters!
# Whitelist
#
# add one IP or peer public key per line without any leading or trailing characters!
# entries in /etc/fastd/whitelist always has higher priority than
# /etc/conf/ffdd:fastd_restrict and /etc/fastd/blacklist
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment