This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Allowing KTorrent bind to priveleged ports

Tags: None
(comma "," separated)
xppblbl
Registered Member
Posts
2
Karma
0
I am behind the firewall blocking any ports higher than 1023. I do not want to run ktorrent as root. I tried to solve the problem by telling ktorrent to listen on port 997 and giving it CAP_NET_BIND_SERVICE capability (setcap cap_net_bind_service=+ep ktorrent), but the program tells "KTorrent is unable to accept connections because the TCP ports 997 is already in use by another program.", though i am pretty sure port 997 is not in use. By the way, setting the SUID bit did not help either (though i would not like this solution anyway). Any ideas how to solve this?

KTorrent version 4.1.0, linux version openSUSE 11.4, kernel 2.6.37.6-0.11-desktop 32bit.
User avatar
google01103
Manager
Posts
6668
Karma
25
did you try opening the ports using Yast?
security -> firewall -> allowed services -> advance


OpenSuse Leap 42.1 x64, Plasma 5.x

George
Moderator
Posts
5421
Karma
1
xppblbl wrote:I am behind the firewall blocking any ports higher than 1023. I do not want to run ktorrent as root. I tried to solve the problem by telling ktorrent to listen on port 997 and giving it CAP_NET_BIND_SERVICE capability (setcap cap_net_bind_service=+ep ktorrent), but the program tells "KTorrent is unable to accept connections because the TCP ports 997 is already in use by another program.", though i am pretty sure port 997 is not in use. By the way, setting the SUID bit did not help either (though i would not like this solution anyway). Any ideas how to solve this?

KTorrent version 4.1.0, linux version openSUSE 11.4, kernel 2.6.37.6-0.11-desktop 32bit.


setcap 'cap_net_bind_service=+ep' /usr/bin/ktorrent

And then starting up ktorrent and setting the port to 881 seems to work on ubuntu. netstat -ltpn confirms I'm running on port 881.
xppblbl
Registered Member
Posts
2
Karma
0
Sorry for a period of silence.

google01103: of course, appropriate port is opened in firewall, the problem in not here.

George: maybe it is some openSUSE or local bug then.
xppblbl:/usr/bin # netstat -tulpn | grep ktorrent
udp 0 0 0.0.0.0:6881 0.0.0.0:* 17486/ktorrent
udp 0 0 :::6881 :::* 17486/ktorrent


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]