Chinaunix首页 | 论坛 | 博客
  • 博客访问: 929629
  • 博文数量: 358
  • 博客积分: 8185
  • 博客等级: 中将
  • 技术积分: 3751
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 16:27
个人简介

The views and opinions expressed all for my own,only for study and test, not reflect the views of Any Company and its affiliates.

文章分类

全部博文(358)

文章存档

2012年(8)

2011年(18)

2010年(50)

2009年(218)

2008年(64)

我的朋友

分类: LINUX

2009-05-05 16:10:14

linux 下修改防火墙配置需要修改 /etc/sysconfig/iptables 这个文件,如果要开放哪个端口,在里面添加一条
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT
就可以了,其中 1521 是要开放的端口号,然后重新启动linux的防火墙服务。
停止/启动防火墙服务的命令:
用root登录后,执行
service iptables stop   --停止
service iptables start  --启动
(service命令位于/sbin)
防火墙规则只有在 iptables 服务运行的时候才能被激活。要手工启动服务,使用以下命令:
/sbin/service iptables restart
要确保它在系统引导时启动,使用以下命令:
/sbin/chkconfig --level 345 iptables on
ipchains 服务不能和 iptables 服务同时运行。要确定 ipchains 服务被禁用,执行以下命令:
/sbin/chkconfig --level 345 ipchains off
阅读(498) | 评论(0) | 转发(0) |
0

上一篇:Appache启动

下一篇:Apache服务器

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