分页: 1 / 1

请问如何关闭ubuntu的防火墙?

发表于 : 2007-02-06 10:55
crazyman33
RT

发表于 : 2007-02-06 11:10
arli
默认情况下ubuntu 无firewall,除非你自己安装了,怎么装的就怎么删呗。。
如果是已启用的自备的iptables 删了就行了

sudo apt-get remove iptables

不记得apt-get 要移除是不是 remove 吧,有些日子没用ubuntu了

发表于 : 2007-02-06 11:22
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

发表于 : 2007-02-06 11:32
5451vs5451
运行这个脚本。

代码: 全选

#!/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

发表于 : 2007-02-06 11:35
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
这位说的对,确实是内核的东西,我已经通过停止服务解决了,谢谢你

Re:

发表于 : 2008-12-22 10:52
zcw0623
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
这位说的对,确实是内核的东西,我已经通过停止服务解决了,谢谢你
请问是怎么关闭这个服务的,我试了好久没有成功.先谢谢!

Re: 请问如何关闭ubuntu的防火墙?

发表于 : 2008-12-22 22:20
appledream
:em02
不是吧,我用sudo su root 后可以sudo apt-get remove iptables
可以卸载哦。

Re: 请问如何关闭ubuntu的防火墙?

发表于 : 2010-03-01 2:16
chaotianlang
可以卸载,我刚试了

Re: 请问如何关闭ubuntu的防火墙?

发表于 : 2010-07-14 23:11
foreveryy
如何恢复防火墙,我用 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.

如何修复。。。