指令ufw enable ⇒ 開啟防火牆注意: 開啟後一定要記的加入 ssh 的 port ufw disable ⇒ 關閉防火牆 ufw status ⇒ 查看防火牆狀態 ufw allow ⇒ 開啟 port特定主機的訪問寫法 ⇒ sudo ufw allow proto tcp from [remote host ip] to any port [port] 這樣允許 remote host 的任意 port 連接到本機的 portufw deny ⇒ 關閉 port