- 论坛徽章:
- 0
|
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
是不是一样可以起到上面的作用阿 ? |
|