免费注册 查看新帖 |

Chinaunix

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

[网络管理] iptables问题求解 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-06 06:55 |只看该作者 |倒序浏览
CentOS5下用BT下载文件问题?

E文太烂,帮忙给解释下这是什么意思?

iptables -I INPUT -p tcp --dport <your_port_number> -j ACCEPT
iptables -I INPUT -p udp --dport <your_port_number> -j ACCEPT

<your_port_number> is the port number you have used for port forwarding (Avoid 6881-6999, any from 49125-65535 is fine)

Once you've established the port is open you need to make the change persist through a reboot

create a file /etc/init.d/iptables_azureus and add the lines below
(sleep 220
/sbin/iptables -I INPUT -p tcp --dport <your_port_number> -j ACCEPT
/sbin/iptables -I INPUT -p udp --dport <your_port_number> -j ACCEPT ) &

The (sleep 220 is there to make the script wait a few minutes to allow subsequent firewall configuration scripts to run. 220 seconds is a large value and you may choose to configure a lower value. The key is that the opening of the azureus port is not countermanded by the firewall initialisation which runs later. At the end is a ) & which allows the script to let the rest of the boot continue, while the script waits.

chmod +x /etc/init.d/iptables_azureus make the file executable
update-rc.d iptables_azureus start 51 S . links the file into the startup sequence

是不是让我创建/etc/init.d/iptables_azureus这个文件,并加入:
sleep 220
/sbin/iptables -I INPUT -p tcp --dport <your_port_number> -j ACCEPT
/sbin/iptables -I INPUT -p udp --dport <your_port_number> -j ACCEPT
那么your_port_number我到底该添多少?6881行吗?

chmod +x /etc/init.d/iptables_azureus make the file executable是把iptables_azureus变为可执行文件吧。

update-rc.d iptables_azureus start 51 S . links the file into the startup sequence这个是让iptables_azureus在系统启动是自动运行吧。那么他是怎么实现的呢?
我运行
#update-rc.d iptables_azureus start 51 S
#command not found
正确命令应该是什么阿 ?
如果我在启动后执行:
# iptables -I INPUT -p udp --dport 6881 -j ACCEPT
# iptables -I INPUT -p tcp --dport 6881 -j ACCEPT
是不是一样可以起到上面的作用阿 ?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP