Code: #!/bin/bash # UPPERCASE space-separated country codes to ACCEPT ALLOW_COUNTRIES="US DE AU CH"

Code: cat /var/log/syslog | grep DENY

Code: Dec 26 14:06:38 yourservername root: DENY sshd connection from 61.184.247.3 (CN) Dec 26 14:09:33 yourservername root: DENY sshd connection from 61.184.247.8 (CN) Dec 26 14:25:56 yourservername root: DENY sshd connection from 36.156.24.97 (CN) Dec 26 14:40:44 yourservername root: DENY sshd connection from 36.156.24.96 (CN) Dec 26 14:45:58 yourservername root: DENY sshd connection from 95.112.119.12 (DE) Dec 26 14:51:16 yourservername root: DENY sshd connection from 122.226.181.166 (CN) Dec 26 14:51:32 yourservername root: DENY sshd connection from 85.224.40.159 (SE) Dec 26 14:56:15 yourservername root: DENY sshd connection from 223.111.139.210 (CN) Dec 26 15:02:56 yourservername root: DENY sshd connection from 61.184.247.6 (CN) Dec 26 15:05:15 yourservername root: DENY sshd connection from 122.226.181.167 (CN)

for all those peoples out there struggeling with security, that's a good way to limit SSH logins to your server.the howto is courtesy of axllent.orgassuming you're running a dedicated or VPS servermake sure you follow all steps exactly as shown and pay attention to the details.important: edit the script according to your needs especially heremake sure your country where you connect from is set here, and if you want to add more countries that are allowed they are separated by space.if you want to check and see if it works/blocks just typeand you should get something like