Unable to deny SSH from other ips
by harry1805 from LinuxQuestions.org on (#6R2M7)
Currently I am unable to deny ssh from other IPs, I am using hostinger Ubuntu VPS, have added restriction on the firewall. to allow IP from my IP and few others, but deny all others. This is not working, i am still able to get the SSH done from all the IPs. Based on the recommendation hostinger support i followed these commands:
Code:sudo ufw allow from 191.1.2.3 to any port 22
sudo ufw allow from 38.1.2.3 to any port 22
sudo ufw allow from 103.1.2.3 to any port 22
sudo ufw deny 22This command is also not working, its allowing from other ips as well. I have a VPN setup and changed to other regions and it works well with other IPs as well.
Code:sudo ufw allow from 191.1.2.3 to any port 22
sudo ufw allow from 38.1.2.3 to any port 22
sudo ufw allow from 103.1.2.3 to any port 22
sudo ufw deny 22This command is also not working, its allowing from other ips as well. I have a VPN setup and changed to other regions and it works well with other IPs as well.