What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

rtorrent, how to open port?

Alessio

Occasional Visitor
Hello, I'm using ( with satisfaction ) Merlin's firmware 376.47, and I've installed rtorrent using
Code:
opkg install rtorrent-easy-install

I'm not able to open the ports used by rtorrent...

here is my /etc/rtorrent/rtorrent.conf

Code:
max_uploads = 8
session = /opt/etc/rtorrent/session
schedule = watch_directory,5,5,load_start=/opt/etc/rtorrent/watchdir/*.torrent
schedule = untied_directory,5,5,stop_untied=
schedule = low_diskspace,5,60,close_low_diskspace=100M
bind = 0.0.0.0
[B]port_range = 51777-51787[/B]
check_hash = yes
use_udp_trackers = yes
encryption = allow_incoming,enable_retry,prefer_plaintext
dht = auto
dht_port = 6881
peer_exchange = yes
scgi_local = /opt/var/rpc.socket
encoding_list = UTF-8
max_uploads_global = 32
max_downloads_global = 64
download_rate = 2048
upload_rate = 150
directory = /mnt/asusdisk/torrents

I've tried to use iptabels using /jffs/scripts/firewall-start
Code:
# Add ports for rtorrent
# 6881 udp (for DHT)
iptables -I INPUT 1 -p udp --dport 6881 -j ACCEPT

# 51777-51787 tcp
iptables -I INPUT 1 -p tcp --syn --dport 51777:51787 -j ACCEPT

finally here is my System Log - Port Forwarding
Code:
Destination     Proto. Port range  Redirect to     Local port  Chain
ALL             TCP    51777:51787 192.168.1.1     51777:51787 VSERVER        
ALL             UDP    51777:51787 192.168.1.1     51777:51787 VSERVER

where am I doing wrong?

Thanks
 
Hello, I'm using ( with satisfaction ) Merlin's firmware 376.47, and I've installed rtorrent using
Code:
opkg install rtorrent-easy-install

I'm not able to open the ports used by rtorrent...

here is my /etc/rtorrent/rtorrent.conf

Code:
max_uploads = 8
session = /opt/etc/rtorrent/session
schedule = watch_directory,5,5,load_start=/opt/etc/rtorrent/watchdir/*.torrent
schedule = untied_directory,5,5,stop_untied=
schedule = low_diskspace,5,60,close_low_diskspace=100M
bind = 0.0.0.0
[B]port_range = 51777-51787[/B]
check_hash = yes
use_udp_trackers = yes
encryption = allow_incoming,enable_retry,prefer_plaintext
dht = auto
dht_port = 6881
peer_exchange = yes
scgi_local = /opt/var/rpc.socket
encoding_list = UTF-8
max_uploads_global = 32
max_downloads_global = 64
download_rate = 2048
upload_rate = 150
directory = /mnt/asusdisk/torrents

I've tried to use iptabels using /jffs/scripts/firewall-start
Code:
# Add ports for rtorrent
# 6881 udp (for DHT)
iptables -I INPUT 1 -p udp --dport 6881 -j ACCEPT

# 51777-51787 tcp
iptables -I INPUT 1 -p tcp --syn --dport 51777:51787 -j ACCEPT

finally here is my System Log - Port Forwarding
Code:
Destination     Proto. Port range  Redirect to     Local port  Chain
ALL             TCP    51777:51787 192.168.1.1     51777:51787 VSERVER        
ALL             UDP    51777:51787 192.168.1.1     51777:51787 VSERVER

where am I doing wrong?

Thanks

FIrst thing that I notice is you are having a conflict here. You cannot have the port opened in the INPUT chain while also forwarding it in the VSERVER chain. Remove the forwards.
 
MAke sure your rules do get applied:

Code:
iptables -L INPUT -v

If they are, make sure your modem is bridged and not set as a router.

Note that the port tester will only be able to test 6881. The other ports are not used by default, they are only used as needed, so they won't show as open until they actually are in use.

Make sure you are testing 6881 over UDP and not TCP.
 
Here is the output of
Code:
iptables -L INPUT -v
Code:
admin@RT-AC66U:/tmp/home/root# iptables -L INPUT -v
Chain INPUT (policy ACCEPT 2112 packets, 265K bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpts:51777:51787 flags:FIN,SYN,RST,ACK/SYN 
  482  118K ACCEPT     udp  --  any    any     anywhere             anywhere            udp dpt:6881

I tried to check udpport 6881 and it is open
PORT STATE SERVICE
6881/udp open|filtered unknown
6882/udp closed unknown
6883/udp closed unknown

I'm also going to check my modem, i'm not sure that it is bridged.

thanks very much for your help.
 
Ops, my modem probably is not wel configured: inside my modem wan settings, I see that it is using PPPoE, here I have the option " Bridging ", shuold I use it?
 
Then I'm not sure why you think there's a problem. Your firewall rule is working fine and your modem isn't interfering, you can see the packet count for it is 482 packets passed so far, and even your test does say that the port is open. It looks all good to me.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top