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

Change remote connections ports

Tags: None
(comma "," separated)
EuRoBoNd
Registered Member
Posts
3
Karma
0

Change remote connections ports

Tue Dec 13, 2005 1:55 pm
Hi :)
Thank you for your great bt client.
It works very well in my "home pc" but i have some issues configuring it on a LAN.
Maybe firewall is blocking incoming connection or nat is not working well.
I can change iptables settings, so:
Is there a way to change remote connections port range?
For example 6881:6999 like others bt clients?
Because of i cannot leave open ports greater then 10000

Thanks in advance and sorry for my bad english :wink:
George
Moderator
Posts
5421
Karma
1

Tue Dec 13, 2005 5:31 pm
We only use two ports (you can change them both in the settings dialog) :
- The normal port (this must absolutely be forwarded)
- UDP tracker port (only used by a minority of torrents)
EuRoBoNd
Registered Member
Posts
3
Karma
0

Tue Dec 13, 2005 8:04 pm
Thanks for your answer..

I don't understand why is it going so bad on a lan..

This is my iptables part regarding bittorrent:

iptables -P FORWARD DROP

# // BitTorrent
tracker="2710 3434 6969 3535 6500"
for pt in $tracker
do
iptables -A FORWARD -p tcp -i ppp0 --sport $pt -j ACCEPT
iptables -t nat -A PREROUTING -i ppp0 -p tcp --sport $pt -j DNAT --to-destination 192.168.0.1
done

iptables -A FORWARD -p udp -i ppp0 --dport 4444 -j ACCEPT
iptables -t nat -A PREROUTING -i ppp0 -p udp --dport 4444 -j DNAT --to-destination 192.168.0.1

iptables -A FORWARD -p tcp -i ppp0 --dport 6881 -j ACCEPT
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 6881 -j DNAT --to-destination 192.168.0.1
# // Fine

If i change Forward policy to ACCEPT things go better..
that's why i thought that ktorrent was using other ports than 6881 and 4444

Oh, forgot to say that when i run ktorrent i get those messages..
Is it Normal? (Cvs Version)
QObject::disconnect: No such signal QSocket::connected(const KResolverEntry&)
QObject::disconnect: No such signal QSocket::gotError(int)
ricce_n
Registered Member
Posts
36
Karma
0

Wed Dec 14, 2005 11:53 am
And you are 100% sure you ip is 192.168.0.1 - this is usualy the ip of the reouter.

And do you have any rules for SNAT??
For static IP:
iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to-source $ip
there $ip is your static ip

For dymanic IP:
iptables -t nat -A POSTROUTING -o ppp0 -j MASQERADE
EuRoBoNd
Registered Member
Posts
3
Karma
0

Wed Dec 14, 2005 8:19 pm
Yeah, 192.168.0.1 is my pc's IP :)
i receive a dynamic ip and i forgot to show this line of iptables rules..
iptables -t nat -A POSTROUTING -o ppp0 -j MASQERADE
Everything should be correct..
But when i ACCEPT forward connections i find more seeds and leechs sources..
Don't know what to change, i tried so many ways.
I also tried ipp2p module for iptables but nothing had changed.
thanks for your help
:wink:
bye
Micko


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]