我是 Ubuntu 的新手。我想关闭防火墙并确保它已关闭并想关闭 iptables。
iptables:
Installed: 1.4.21-1ubuntu1
Candidate: 1.4.21-1ubuntu1
Version table:
*** 1.4.21-1ubuntu1 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destinat
Run Code Online (Sandbox Code Playgroud)
Rin*_*ind 25
sudo ufw status
Status: inactive
Run Code Online (Sandbox Code Playgroud)
您可以关闭和打开它...
sudo ufw disable
sudo ufw enable
Run Code Online (Sandbox Code Playgroud)
默认情况下它是禁用的。
您可以检查是否有活动的 iptables 规则:
sudo iptables -L
Run Code Online (Sandbox Code Playgroud)
您的输出在target prot opt source destination
header 和 next之间没有线Chain
,表明没有规则处于活动状态。
If you have iptables
active this will cancel it
sudo iptables -X
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo iptables -t mangle -F
sudo iptables -t mangle -X
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
Run Code Online (Sandbox Code Playgroud)
If you want a graphical method:
sudo apt-get install gufw
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
53560 次 |
最近记录: |