Chinaunix首页 | 论坛 | 博客
  • 博客访问: 93093
  • 博文数量: 33
  • 博客积分: 1088
  • 博客等级: 少尉
  • 技术积分: 365
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-30 13:59
文章分类

全部博文(33)

文章存档

2011年(18)

2010年(9)

2009年(6)

分类: LINUX

2011-02-11 18:37:20

debian安装ufw防火墙需要使用不稳定版本的源,比如:

deb http://mirrors.163.com/debian sid main non-free contrib



deb-src sid main non-free contrib

安装方法

aptitude update



aptitude install ufw

使用方法及简单规则设定办法

ufw default deny



ufw allow|deny from ip to ip port port



ufw enable

防火墙状态查询

ufw status

遇到一次比较奇怪的状况:防火墙开启后,只能外部访问服务器,服务器不能访问外部网络了,经过测试发现是由于防火墙为不稳定版的,它一些依赖包没有安装上,然后对系统进行一次upgrade后,问题解决。

测试方法:

# /lib/ufw/ufw-init restart





FATAL: Could not load /lib/modules/2.6.18-194.8.1.el5.028stab070.5/modules.dep: No such file or directory



FATAL: Could not load /lib/modules/2.6.18-194.8.1.el5.028stab070.5/modules.dep: No such file or directory



FATAL: Could not load /lib/modules/2.6.18-194.8.1.el5.028stab070.5/modules.dep: No such file or directory



FATAL: Could not load /lib/modules/2.6.18-194.8.1.el5.028stab070.5/modules.dep: No such file or directory



FATAL: Could not load /lib/modules/2.6.18-194.8.1.el5.028stab070.5/modules.dep: No such file or directory



FATAL: Could not load /lib/modules/2.6.18-194.8.1.el5.028stab070.5/modules.dep: No such file or directory



iptables-restore: line 66 failed



FATAL: Could not load /lib/modules/2.6.18-194.8.1.el5.028stab070.5/modules.dep: No such file or directory



FATAL: Could not load /lib/modules/2.6.18-194.8.1.el5.028stab070.5/modules.dep: No such file or directory



iptables-restore: line 30 failed



error: "Operation not permitted" setting key "net.ipv6.conf.all.accept_redirects"



error: "Operation not permitted" setting key "net.ipv6.conf.default.accept_redirects"



error: "Operation not permitted" setting key "net.ipv4.icmp_echo_ignore_broadcasts"



error: "Operation not permitted" setting key "net.ipv4.icmp_ignore_bogus_error_responses"



error: "Operation not permitted" setting key "net.ipv4.icmp_echo_ignore_all"





Problem running '/etc/ufw/before.rules'



Problem running '/etc/ufw/after.rules'

解决办法:

aptitude safe-upgrade

阅读(3221) | 评论(0) | 转发(0) |
0

上一篇:apache_proxy配置

下一篇:SecureCRT掉线设置

给主人留下些什么吧!~~