I'm looking for the easiest method to restrict access to my VPS's SSH using specific country IP ranges. I want to utilize UFW, but I'm a bit hesitant to dive into iptables since I'm still learning and I worry I might mess things up. I found a blog post about this, but I'm unsure if it's applicable for Ubuntu users.
4 Answers
Honestly, using IP restrictions might not give you much extra security since VPNs are really cheap nowadays. A better option might be to disable password logins completely and just use key-based authentication instead.
I skimmed the blog post you mentioned, and it looks legit! I think It's worth trying out for your server since I've had to deal with brute force attacks from some random IPs myself.
UFW is pretty user-friendly since it’s like a wrapper for nftables. Use whatever you feel comfortable with; UFW will definitely help make things easier!
In my opinion, you should only allow SSH access from the specific country that you know you’ll be connecting from—along with using fail2ban for added protection.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures