MoinQ:

1. UFW

Contents

  1. UFW
    1. rules
    2. history

conoha 2GB

# ufw allow to any port 443

# ufw status numbered
Status: active

     To                         Action      From
     --                         ------      ----
[ 1] 22                         ALLOW IN    157.7.113.173             
[ 2] 22                         ALLOW IN    14.192.44.5               
[ 3] 22                         ALLOW IN    39.110.135.12             
[ 4] 53                         ALLOW IN    Anywhere                  
[ 5] 80                         ALLOW IN    Anywhere                  
[ 6] Anywhere                   DENY IN     45.94.68.0/24             
[ 7] 25                         ALLOW IN    Anywhere                  
[ 8] Anywhere                   DENY IN     125.228.216.16            
[ 9] 443                        ALLOW IN    Anywhere                  

$ufw allow from 39.110.135.12 to any port 22

# ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
22                         ALLOW IN    157.7.113.173             
22                         ALLOW IN    14.192.44.5               
22                         ALLOW IN    39.110.135.12             
53                         ALLOW IN    Anywhere                  
53 (v6)                    ALLOW IN    Anywhere (v6)   


現状は /etc/ufw/user.rules にある。ブートでも反映される。

UFW設定でミスして、締め出された場合にはコンソールから入るという手があるか。

簡単設定では 「DNS port を開くには packet filter を全開放する」 選択しかなかった。

この選択をやめられた。API で設定できたから。-- ToshinoriMaeno 2023-04-02 21:50:55

  22, 25, 80, 443 TCP open
  53 (UDP/TCP) open

1.1. rules

default deny

nuro IP address が変わったときにも入れるようにするには: {39.110.135.0/24 ?}

a.ns.qmail.jp から入れるようにしておけば、tssさんにお願いすればなんとかなるだろう。-- ToshinoriMaeno 2023-04-02 22:08:38

# ufw allow from 14.192.44.5 
Rule added

# ufw allow from any to any port 25
Rule added
Rule added (v6)

# ufw status
Status: active

     To                         Action      From
     --                         ------      ----
[ 1] Anywhere                   ALLOW IN    39.110.135.12             
[ 2] Anywhere                   ALLOW IN    160.16.114.69             
[ 3] 53                         ALLOW IN    Anywhere                  
[ 4] 443/tcp                    ALLOW IN    Anywhere                  
[ 5] 80/tcp                     ALLOW IN    Anywhere                  
[ 6] Anywhere                   ALLOW IN    14.192.44.5               
[ 7] 25                         ALLOW IN    Anywhere                  
[ 8] 25 (v6)                    ALLOW IN    Anywhere (v6)             

# ufw allow from 39.110.135.0/24 to any port 22
[ 8] 22                         ALLOW IN    39.110.135.0/24        

sshd Password は許さない。

1.2. history

-- ToshinoriMaeno 2023-08-02 07:37:36

To                         Action      From
--                         ------      ----
Anywhere                   ALLOW       39.110.135.12             
443                        ALLOW       Anywhere                  
53                         ALLOW       Anywhere                  
Anywhere                   DENY        182.106.191.28            
25                         ALLOW       Anywhere                  
Anywhere                   ALLOW       14.192.44.5               
Anywhere                   ALLOW       160.16.114.69             
22                         ALLOW       39.110.135.0/24

39.110.135.:allow

=.tkyc319.ap.nuro.jp:allow


CategoryDns CategoryWatch CategoryTemplate

MoinQ: VPS/ConoHa/UFW (last edited 2024-09-17 05:44:25 by ToshinoriMaeno)