免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 2244 | 回复: 14
打印 上一主题 下一主题

web服务器的iptables问题。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-07-24 20:16 |只看该作者 |倒序浏览
默认安装fedora的apache除了80还开了一个443的https,如何关掉?我在setup里面的service没找到,如何关掉?用chkconfig也没找到。
我的iptables里面的规则是
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere            icmp any
ACCEPT     ipv6-crypt--  anywhere             anywhere
ACCEPT     ipv6-auth--  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:https
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
我想删掉那条关于https的,用以下命令
$ iptables -D INPUT --dport 443 -j DROP
结果老是这样
iptables v1.2.9: Unknown arg `--dport'
Try `iptables -h' or 'iptables --help' for more information.的结果,不知道该怎么办。
如果把--dport变成-dport就说Bad argument `443'
Try `iptables -h' or 'iptables --help' for more information.
大家帮我解释一下好吗?

论坛徽章:
0
2 [报告]
发表于 2004-07-24 21:02 |只看该作者

web服务器的iptables问题。

自己顶啦,斑竹帮忙啊

论坛徽章:
0
3 [报告]
发表于 2004-07-24 23:44 |只看该作者

web服务器的iptables问题。

可以考虑停掉iptables服务,然后自己写。

论坛徽章:
0
4 [报告]
发表于 2004-07-25 03:51 |只看该作者

web服务器的iptables问题。

直接编辑/etc/sysconfig/iptables
把https那一行注释掉即可,然后重新启动iptables 服务
sudo /sbin/serverice iptables restart

论坛徽章:
0
5 [报告]
发表于 2004-07-25 07:19 |只看该作者

web服务器的iptables问题。

那是mod_ssl,在apache的配置文件中/etc/httpd/conf/httpd.conf
<IfDefine SSL>;
Listen 80
Listen 443

在这里把443#掉,当然这只是治标不治本。
至于你用iptables DROP掉443,也可以
iptables -A INPUT -s 0.0.0.0/0 -p tcp -d 172.16.10.254(web服务器的IP)--dport 443 -j DROP

论坛徽章:
0
6 [报告]
发表于 2004-07-25 11:32 |只看该作者

web服务器的iptables问题。

iptables -A INPUT -s 0.0.0.0/0 -p tcp -d 172.16.10.254(web服务器的IP)--dport 443 -j DROP 这句话的意思是新建一条链对与任何地方对web服务器的IP的443端口的连接都丢掉。是吗?
可是我想删除
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
这条链为什么用 $ iptables -D INPUT --dport 443 -j DROP 这个就老出现我上面所说的错误呢?
在线等…………

论坛徽章:
0
7 [报告]
发表于 2004-07-25 11:40 |只看该作者

web服务器的iptables问题。

那行应该是redhat的可视化防火墙工具生成的语句吧。你插入一个楼上老兄说的链把443丢掉就可以了。http的service又不是系统的service你用chkconfig哪里有

论坛徽章:
0
8 [报告]
发表于 2004-07-25 11:46 |只看该作者

web服务器的iptables问题。

那我如果想删除呢,应该怎么写那个语句?
$ iptables -D INPUT --dport 443 -j DROP 为什么错呢?
那我该怎么管理https,httpd,ftpd这样的服务啊,请大家不吝指教

论坛徽章:
0
9 [报告]
发表于 2004-07-25 19:14 |只看该作者

web服务器的iptables问题。

dinginginginging,谁告诉我呀
另外我的服务器为什么要开一个21端口呢,我没开ftp 服务器,从我的防火墙看也没开,却总能看见21端口。

论坛徽章:
0
10 [报告]
发表于 2004-07-25 19:17 |只看该作者

web服务器的iptables问题。

那就是开了
ntsysv --level 1235
然后把vsftp的对号去掉
然后service xinetd restart
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP