Blocking repetitive OpenVPN attacks - INPUTFW and REDINPUT after OVPNINPUT

Until GUI will allow us to use OVPNBLOCK chain, here is an not so elegant solution to replicate INPUTFW inside OVPNBLOCK…

iptables -t filter -A OVPNBLOCK -s `iptables -L INPUTFW | grep -e ^DROP | awk '{ print $4"," }' | sed '/[a-zA-Z]/d'|tr -d '\n' |sed 's/.$//'` -j DROP
iptables -t filter -A OVPNBLOCK -s `iptables -L INPUTFW | grep -e ^LOG | awk '{ print $4"," }' | sed '/[a-zA-Z]/d'|tr -d '\n' |sed 's/.$//'` -m limit --limit 10/sec --limit-burst 20 -j LOG --log-prefix "OVPNBLOCK"