LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   port forwarding for bit torrent (https://www.linuxquestions.org/questions/red-hat-31/port-forwarding-for-bit-torrent-4175438337/)

timl 11-22-2012 04:27 PM

port forwarding for bit torrent
 
Hi, my old FC6 box is becoming unreliable and I am moving its duties to a newer PC running Centos 6.

I have installed the Vuze bit torrent client. I have to open up access to a port to allow the client to operate. When I run "iptables -L" on the old box I see:

Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:60666
ACCEPT tcp -- anywhere anywhere tcp dpt:60666
ACCEPT tcp -- anywhere anywhere tcp dpt:irdmi

I remember using a guide at the time which supplied the commands required to achieve the above access to port 60666. I can't remember those commands. Could someone help me out please?

Thanks

Basher52 11-22-2012 04:54 PM

This is an example of what I use as forwarding a port and it seems to work.

Quote:

iptables -t nat -A PREROUTING -p tcp --dport 11802 -j DNAT --to-destination 10.1.131.21:11802
iptables -t filter -A FORWARD -p tcp -d 10.1.131.21 --dport 11802 -j ACCEPT

timl 11-23-2012 03:57 PM

Hi basher, I found the original reference and this did the trick.
/sbin/iptables -I INPUT -p tcp --destination-port 6881:6999 -j ACCEPT

Hit enter. This adds a rule to open TCP ports 6881 through 6999 in your firewall. These ports are required by bittorent and/or Azureus. Type:

/sbin/iptables-save > /etc/sysconfig/iptables

Hit enter. This saves the rule. You must also open udp port 6881 for Azureus. Type:

/sbin/iptables -I INPUT -p udp --destination-port 6881:6881 -j ACCEPT

Hit enter. This adds a rule to open UDP port 6881 in your firewall. Type:

/sbin/iptables-save > /etc/sysconfig/iptables
This is from a very old guide:

http://www.vmaxx.net/techinfo/UNIX/l...an.htm#Azureus

I found it was not as easy as that though. You have to open the port on the router also.

Thanks for taking the time to help


All times are GMT -5. The time now is 06:46 AM.