亚欧色一区w666天堂,色情一区二区三区免费看,少妇特黄A片一区二区三区,亚洲人成网站999久久久综合,国产av熟女一区二区三区

  • 發布文章
  • 消息中心
點贊
收藏
評論
分享
原創

ufw 開機狀態還是處于inactive問題

2024-03-04 03:21:29
251
0

解決ufw和netfilter同時存在ufw無法激活的問題

開機后,發現ufw一直處于inactive,查看 ufw狀態, 本機也安裝了docker,經過網上搜索和本地確認是
netfilter-persistent這服務導致的。

$ sudo service --status-all |grep netfilter
 [ + ]  netfilter-persistent
$ sudo ufw status

Status: inactive

確認ufw eanble 配置開啟

# /etc/ufw/ufw.conf
#

# Set to yes to start on boot. If setting this remotely, be sure to add a rule
# to allow your remote connection before starting ufw. Eg: 'ufw allow 22/tcp'
ENABLED=yes

# Please use the 'ufw' command to set the loglevel. Eg: 'ufw logging medium'.
# See 'man ufw' for details.
LOGLEVEL=low

編輯ufw.service配置文件

/lib/systemd/system/ufw.service文件中增加 After=netfilter-persistent.service字段:

[Unit]
Description=Uncomplicated firewall
Documentation=man:ufw(8)
DefaultDependencies=no
Before=network.target
After=netfilter-persistent.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/lib/ufw/ufw-init start quiet
ExecStop=/lib/ufw/ufw-init stop

[Install]
WantedBy=multi-user.target

重啟

$ sudo reboot
0條評論
作者已關閉評論
張****龍
18文章數
0粉絲數
張****龍
18 文章 | 0 粉絲
張****龍
18文章數
0粉絲數
張****龍
18 文章 | 0 粉絲
原創

ufw 開機狀態還是處于inactive問題

2024-03-04 03:21:29
251
0

解決ufw和netfilter同時存在ufw無法激活的問題

開機后,發現ufw一直處于inactive,查看 ufw狀態, 本機也安裝了docker,經過網上搜索和本地確認是
netfilter-persistent這服務導致的。

$ sudo service --status-all |grep netfilter
 [ + ]  netfilter-persistent
$ sudo ufw status

Status: inactive

確認ufw eanble 配置開啟

# /etc/ufw/ufw.conf
#

# Set to yes to start on boot. If setting this remotely, be sure to add a rule
# to allow your remote connection before starting ufw. Eg: 'ufw allow 22/tcp'
ENABLED=yes

# Please use the 'ufw' command to set the loglevel. Eg: 'ufw logging medium'.
# See 'man ufw' for details.
LOGLEVEL=low

編輯ufw.service配置文件

/lib/systemd/system/ufw.service文件中增加 After=netfilter-persistent.service字段:

[Unit]
Description=Uncomplicated firewall
Documentation=man:ufw(8)
DefaultDependencies=no
Before=network.target
After=netfilter-persistent.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/lib/ufw/ufw-init start quiet
ExecStop=/lib/ufw/ufw-init stop

[Install]
WantedBy=multi-user.target

重啟

$ sudo reboot
文章來自個人專欄
文章 | 訂閱
0條評論
作者已關閉評論
作者已關閉評論
0
0