LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-27-2012, 11:35 AM   #1
tech_soul8
Member
 
Registered: Aug 2011
Posts: 75

Rep: Reputation: Disabled
Allow torrent traffic


Hello folks

This is my iptables configuration:

*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:0]
:firewall-eth0-INPUT - [0:0]
-A INPUT -j firewall-eth0-INPUT
-A FORWARD -j firewall-eth0-INPUT
-A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -p icmp -m state --state NEW -m icmp --icmp-type any -j ACCEPT
-A OUTPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT
-A OUTPUT -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT
-A OUTPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A OUTPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A OUTPUT -p tcp -m state --state NEW -m tcp --dport 110 -j ACCEPT
-A OUTPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
-A OUTPUT -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT
-A OUTPUT -p tcp -m state --state NEW -s 192.168.200.17 -d 192.168.200.30 -m tcp --dport 23 -j ACCEPT
-A OUTPUT -j LOG --log-prefix "fw-eth0-out-rejected"
-A OUTPUT -j DROP
-A firewall-eth0-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A firewall-eth0-INPUT -i lo -j ACCEPT
-A firewall-eth0-INPUT -s 192.168.200.16/28 -p icmp -m icmp --icmp-type any -j ACCEPT
-A firewall-eth0-INPUT -j DROP
COMMIT

I have Vuze torrent client installed. I want to allow torrent traffic so I can download torrents without changing (setting all to allow) my iptables configuration. The problem is when I check my log file I see blocked torrent traffic but it always comes from different source and destination TCP/UDP ports.

Is there a way I can solve this? Are there some port ranges Vuze is using or something like that?
 
Old 08-27-2012, 12:36 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
What ports did YOU set for vuze ?
the default 6881 tcp/udp
some isp's do "mess" with that
ports in the 50,000 to 65,535 range have been advised

use the vuze GUI to set what ports to use
then use your distros GUI to set the tcp and udp ports
 
Old 08-27-2012, 12:41 PM   #3
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
You need to allow incomming and outcomming UDP and TCP connections for ports configured in Vuze in Options / Connection. By default it uses random port, so you need to change it.
Code:
iptables -A INPUT -p tcp -m state --state NEW --dport port_number_here -j ACCEPT
iptables -A INPUT -p udp -m state --state NEW --dport port_number_here -j ACCEPT
iptables -A OUTPUT -p tcp -m state --state NEW --sport port_number_here -j ACCEPT
iptables -A OUTPUT -p udp -m state --state NEW --sport port_number_here -j ACCEPT
Check also other list of ports used by Vuze.
 
Old 08-27-2012, 01:27 PM   #4
tech_soul8
Member
 
Registered: Aug 2011
Posts: 75

Original Poster
Rep: Reputation: Disabled
Thanks guys!

Vuze now is automaticaly set up to use port 47983 for incoming connections. So I added TCP/UDP rules for 47983 port and now it is ok.
But this is a little bit confusing to me. Why I need to create rule in my OUTPUT chain with source port 47983 when Vuze is using this port for incoming not outgoing connections? Hm...
 
Old 08-28-2012, 04:58 AM   #5
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Quote:
Originally Posted by tech_soul8 View Post
... Vuze is using this port for incoming not outgoing connections
Like in other P2P programs it needs to initiate connection to remote clients, to download data and send search questions for files you want to download, as well listen for incomming connection to deliver data to others and get answers on search. They also exchange other data, more or less necessary, to achieve the goal for which they were created. These P2P applications act as client and as server.
 
Old 08-28-2012, 07:14 AM   #6
tech_soul8
Member
 
Registered: Aug 2011
Posts: 75

Original Poster
Rep: Reputation: Disabled
Thanks...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Should traffic control root qdsic & child class limit traffic? Washington Ratso Linux - Networking 0 02-23-2011 07:16 PM
KTorrent stalled on foo.torrent but bittorrent under XP does fine on foo.torrent. stf92 Linux - Newbie 2 12-19-2010 03:18 AM
LXer: Torrent Search - Torrent searching application for the Gnome desktop environment LXer Syndicated Linux News 0 08-18-2010 08:20 AM
Proxying download traffic in Transmission bit torrent client vockleya Linux - Software 2 01-25-2010 09:35 AM
Traffic shaping (limiting outgoing bandwidth of all TCP-traffic except FTP/HTTP) ffkodd Linux - Networking 3 10-25-2008 12:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration