[UFW Essentials: Common Firewall Rules and Commands DigitalOcean](https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands)

192.168.1.0/24のみSSH接続を許可する.

$ sudo ufw allow from 192.168.1.0/24 to any port 22