UFW Essentials: Common Firewall Rules and Commands DigitalOcean

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

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