免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4645 | 回复: 3

iptables的规则.请教高手.菜鸟问题 [复制链接]

论坛徽章:
0
发表于 2007-12-04 16:20 |显示全部楼层
如何要在LINUX让防火墙开放ftp和samba端口呢?\r\n我是这样写的\r\niptables -A INPUT -p tcp --sport ftp -j ACCEPT\r\niptables -A INPUT -p tcp --sport 546 -j ACCEPT\r\niptables -A INPUT -p tcp --sport 547 -j ACCEPT\r\n是不是需要把3个表都写满呢?\r\n我这边的环境还是有新的一张表的.是别人建的.\r\niptables -L结果是这样的\r\nChain RH-Firewall-1-INPUT (2 references)\r\ntarget     prot opt source               destination\r\nACCEPT     all  --  anywhere             anywhere\r\nACCEPT     icmp --  anywhere             anywhere            icmp any\r\nACCEPT     ipv6-crypt--  anywhere             anywhere\r\nACCEPT     ipv6-auth--  anywhere             anywhere\r\nACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:5353\r\nACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp\r\nACCEPT     udp  --  anywhere             anywhere            udp dpt:2198\r\nACCEPT     udp  --  anywhere             anywhere            udp dpt:2199\r\nACCEPT     udp  --  anywhere             anywhere            udp dpt:2200\r\nACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED\r\nACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh\r\nACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http\r\nACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:webcache\r\nACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:1099\r\nACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ftp\r\nREJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited\r\n           tcp  --  anywhere             anywhere            tcp spt:ftp\r\nACCEPT     tcp  --  anywhere             anywhere            tcp spt:ftp\r\nACCEPT     tcp  --  anywhere             anywhere            tcp spt:dhcpv6-client\r\nACCEPT     tcp  --  anywhere             anywhere            tcp spt:dhcpv6-server\r\n           tcp  --  anywhere             anywhere            tcp spt:dhcpv6-client\r\nACCEPT     tcp  --  anywhere             anywhere            tcp spt:dhcpv6-client\r\nACCEPT     tcp  --  anywhere             anywhere            tcp spt:dhcpv6-server\r\nACCEPT     udp  --  anywhere             anywhere            udp spt:dhcpv6-client\r\nACCEPT     udp  --  anywhere             anywhere            udp spt:dhcpv6-server\r\n我想请问各位大虾我要怎样改呢?

论坛徽章:
0
发表于 2007-12-05 09:37 |显示全部楼层
iptables -A INPUT -p tcp --dport ftp -j ACCEPT\r\niptables -A INPUT -p tcp --dport 445 -j ACCEPT

论坛徽章:
0
发表于 2008-04-23 11:57 |显示全部楼层
请把其它的chain都打印出来看看. \r\niptables -L -n

论坛徽章:
0
发表于 2008-05-29 10:57 |显示全部楼层
用IPTABLEA -NVXL\r\n看看你的规则
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP