揮発性のメモ2

http://d.hatena.ne.jp/iww/

hoge

ufw

状態表示

numbered を付けると通し番号も出る(deleteとかで使う)

# ufw status
Status: inactive
# ufw status numbered
Status: active

     To                         Action      From
     --                         ------      ----
[ 1] 8228                       ALLOW IN    Anywhere
[ 2] 80                         ALLOW IN    Anywhere
[ 3] 443                        ALLOW IN    Anywhere
[ 4] 53                         ALLOW IN    192.168.0.0/16
[ 5] 9080                       ALLOW IN    192.168.0.0/16
[ 6] 8080                       ALLOW IN    192.168.0.0/16

有効化/無効化

# ufw enable
Firewall is active and enabled on system startup
# ufw disable
Firewall stopped and disabled on system startup

設定の追加

ポート80を許可

# ufw allow 80

192.168.0.0/16からanyへ、ポート8080を許可

# ufw allow from 192.168.0.0/16 to any port 8080

設定の削除

3番の設定を削除

# ufw delete 3

qiita.com
manpages.ubuntu.com