Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
*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?
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
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...
... 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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.