How do you whitelist an IP address with just one line command?
Sophia Terry
I've been searching how to whitelist a IP address (ex. 123.123.321.1) with Ubuntu 12.04. But everyone seems to give long elaborate answers. Is there just 1 simple command to whitelist an IP address? I want to whitelist an IP address so it can connect via SSH port 22. Also would this solution work with other linux flavors like centos?
1 Answer
sudo ufw allow in from 123.123.321.1 to any port 22 CentOS doesn't use ufw. You'll have to use iptables.