i do have my a VPS (debian 7) with a public IP address and I would like to protect it. I would like to have access only to SSH (public/private keys), openVPN, services that are requested from the VPS itself, such as sending emails, DNS, access to Internet. All users that connect to the system through OpenVPN then have full access to it and to the Internet.My current setup is:iptables -P INPUT ACCEPTiptables -P OUTPUT ACCEPTiptables -P FORWARD ACCEPTiptables -Fiptables -Xiptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPTiptables -A INPUT -p tcp -m tcp --dport 1194 -j ACCEPTiptables -P INPUT DROPiptables -A OUTPUT -p tcp -m tcp --sport 22 -j ACCEPTiptables -A OUTPUT -p tcp -m tcp --sport 1194 -j ACCEPTiptables -P OUTPUT DROPI would like to blacklist all IPs that attack me or try to scan me. Whoever has 3 failed ssh attempts then get blacklisted for 24 hours. Is it possible to help me please?
iptables to allow only ssh and vpn from outside world
iptables