I have numerous CentOS VPS's I have to manage. However, I have a completely dynamic IP that changes 2-3 times a week. My IP Address always starts with 71., and always has. Is there a way to allow SSH Logins from IPs starting with 71 only? The other numbers are completely random.
Thank you
Easiest way to do it, to put a rule to iptables. For your proposes it should be like this:
-A INPUT -s 71.0.0.0/8 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -i eth0 -j DROP
You should change eth0 to your interface.
But in that case, you should open all ports used required for software on VPS.
P.S. iptables installed by default only on CentOS 6, on CentOS 7 you should configure firewalld or install iptables from repository.