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

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
crazyman33
帖子: 17
注册时间: 2007-01-27 11:26

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

#1

帖子 crazyman33 » 2007-02-06 10:55

RT
头像
arli
帖子: 194
注册时间: 2006-11-24 11:00
来自: 太阳系第3行星
联系:

#2

帖子 arli » 2007-02-06 11:10

默认情况下ubuntu 无firewall,除非你自己安装了,怎么装的就怎么删呗。。
如果是已启用的自备的iptables 删了就行了

sudo apt-get remove iptables

不记得apt-get 要移除是不是 remove 吧,有些日子没用ubuntu了
要爱护linux 就象爱护我们的庄稼地一样
头像
sinoyster
帖子: 958
注册时间: 2005-10-16 13:24
来自: 四川成都
联系:

#3

帖子 sinoyster » 2007-02-06 11:22

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
Thank you Ubuntu Team!!!!
I still can't belive this is free...
头像
5451vs5451
帖子: 345
注册时间: 2006-07-14 18:56
来自: Apple Valley, Planet Tux, Linux System

#4

帖子 5451vs5451 » 2007-02-06 11:32

运行这个脚本。

代码: 全选

#!/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
crazyman33
帖子: 17
注册时间: 2007-01-27 11:26

#5

帖子 crazyman33 » 2007-02-06 11:35

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
这位说的对,确实是内核的东西,我已经通过停止服务解决了,谢谢你
zcw0623
帖子: 5
注册时间: 2008-12-17 15:08

Re:

#6

帖子 zcw0623 » 2008-12-22 10:52

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
这位说的对,确实是内核的东西,我已经通过停止服务解决了,谢谢你
请问是怎么关闭这个服务的,我试了好久没有成功.先谢谢!
appledream
帖子: 1
注册时间: 2008-12-18 15:16

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

#7

帖子 appledream » 2008-12-22 22:20

:em02
不是吧,我用sudo su root 后可以sudo apt-get remove iptables
可以卸载哦。
chaotianlang
帖子: 12
注册时间: 2009-03-05 21:45

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

#8

帖子 chaotianlang » 2010-03-01 2:16

可以卸载,我刚试了
foreveryy
帖子: 2
注册时间: 2010-07-14 23:05

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

#9

帖子 foreveryy » 2010-07-14 23:11

如何恢复防火墙,我用 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.

如何修复。。。
回复