Fix block ssh
This commit is contained in:
parent
b085908413
commit
851ee20229
|
@ -155,7 +155,7 @@ while [ ${blockauth} -eq 0 ] ; do
|
||||||
if [ -z "${read_block_ip}" ] ; then
|
if [ -z "${read_block_ip}" ] ; then
|
||||||
echo "blockauth: blocking ip ${block_ip}"
|
echo "blockauth: blocking ip ${block_ip}"
|
||||||
echo "blockauth: blocking ip ${block_ip}" >> ${filelog}
|
echo "blockauth: blocking ip ${block_ip}" >> ${filelog}
|
||||||
iptables -A INPUT -p tcp --dport 22 -d ${block_ip} -j DROP
|
iptables -A OUTPUT -p tcp -d ${block_ip} --sport 22 -j DROP
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# Reduce log
|
# Reduce log
|
||||||
|
|
Loading…
Reference in New Issue
Block a user