Block ssh port only

This commit is contained in:
q3aql 2024-04-16 18:10:36 +02:00
parent a7e6a38e75
commit ad54ce7d2a

View File

@ -155,8 +155,7 @@ while [ ${blockauth} -eq 0 ] ; do
if [ -z "${read_block_ip}" ] ; then
echo "blockauth: blocking ip ${block_ip}"
echo "blockauth: blocking ip ${block_ip}" >> ${filelog}
iptables -A INPUT -d ${block_ip} -j DROP
iptables -A OUTPUT -d ${block_ip} -j DROP
iptables -A INPUT --dport 22 -p tcp -d ${block_ip} -j DROP
fi
done
# Reduce log