请问如何关闭ubuntu的防火墙?
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 17
- 注册时间: 2007-01-27 11:26
- arli
- 帖子: 194
- 注册时间: 2006-11-24 11:00
- 来自: 太阳系第3行星
- 联系:
- sinoyster
- 帖子: 958
- 注册时间: 2005-10-16 13:24
- 来自: 四川成都
- 联系:
- 5451vs5451
- 帖子: 345
- 注册时间: 2006-07-14 18:56
- 来自: Apple Valley, Planet Tux, Linux System
运行这个脚本。
代码: 全选
#!/bin/bash
IPTABLES="/sbin/iptables"
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
ip6tables -L -n > /dev/null 2>&1 && {
ip6tables -P OUTPUT ACCEPT
ip6tables -P INPUT ACCEPT
ip6tables -P FORWARD ACCEPT
}
cat /proc/net/ip_tables_names | while read table; do
test "X$table" = "Xmangle" && continue
$IPTABLES -t $table -L -n | while read c chain rest; do
if test "X$c" = "XChain" ; then
$IPTABLES -t $table -F $chain
fi
done
$IPTABLES -t $table -X
done
-
- 帖子: 17
- 注册时间: 2007-01-27 11:26
-
- 帖子: 5
- 注册时间: 2008-12-17 15:08
Re:
请问是怎么关闭这个服务的,我试了好久没有成功.先谢谢!crazyman33 写了:这位说的对,确实是内核的东西,我已经通过停止服务解决了,谢谢你sinoyster 写了:iptables是内核模块删除不了滴
现查看一下你iptables的规则
sudo iptables -L
sudo iptables -t nat -L
如果都是空的就不是iptables的问题
如果有许多规则的话就清空规则并修改默认策略
sudo iptables -F
sudo iptables -t nat -F
sudo iptables -P ACCEPT
sudo iptables -t nat -P ACCEPT
-
- 帖子: 1
- 注册时间: 2008-12-18 15:16
Re: 请问如何关闭ubuntu的防火墙?
不是吧,我用sudo su root 后可以sudo apt-get remove iptables
可以卸载哦。
-
- 帖子: 12
- 注册时间: 2009-03-05 21:45
Re: 请问如何关闭ubuntu的防火墙?
可以卸载,我刚试了
-
- 帖子: 2
- 注册时间: 2010-07-14 23:05
Re: 请问如何关闭ubuntu的防火墙?
如何恢复防火墙,我用 sudo iptables remove 后机器就起不来了。后来按M进来后网络服务等没有了。不能装东西 。
W:Not using locking for read only lock file /var/lib/dpkg/lock
E:Unable to write to /var/cache/apt/
E:The package lists or status file could not be parsed or opened.
如何修复。。。
W:Not using locking for read only lock file /var/lib/dpkg/lock
E:Unable to write to /var/cache/apt/
E:The package lists or status file could not be parsed or opened.
如何修复。。。