Reference: https://www.cyberciti.biz/faq/ufw-allow-incoming-ssh-connections-from-a-specific-ip-address-subnet-on-ubuntu-debian/ https://askubuntu.com/questions/996340/how-to-restrict-ssh-and-ftp-to-certain-ip-address sudo ufw allow from 192.168.1.100 to any port 22