last day (15 days later) » 

15:16
2
A: Unable to download torrent in Transmission after updating firewall

mook765Your port 51413 appears closed because you didn't allow incoming connetions, you only allowed outgoing connections. The guide you followed is wrong in this point. Delete the rules related to port 51413. To do that run sudo ufw status numbered and then delete the four related rules with sudo u...

Thanks. It's working now. But just to be clear, do I add separate rules for tcp and udp like in the earlier mentioned guide or just that one ufw allow will do? At the moment I added just the ufw allow
now it's now uploading after download finishes. Do I ask a separate question?
This simple command will add rules for UPD and TCP. That Transmission is not uploading is normally not a problem, I have that often. Mostly the reason is that there are just no interested peers, and that is nothing you can change with the settings in your machine. Observe that first to get experience.
If i disable ufw I am able to upload and get quite a good number for peers on some of the torrents (popular movies actually).
@spaceout I see, Transmission attempts to use outgoing connections with random port numbers. Try to add another rule sudo ufw allow out transmission-gtk, this should allow outgoing connections on any port only for transmission. Don't forget to reload ufw after adding the rule and check if this helps. This are the obstacles of a restrictive firewall...
When I first entered ufw allow out transmission-gtk I got the error: could not find a profile matching transmission-gtk. So I created ufw app profile as instructed in this link askubuntu.com/questions/409013/… title=a BitTorrent Client description=Transmission is an open source cross-platform BitTorrent client. ports=51413 -------- After which i was able to add sudo ufw allow out transmission Still it's not uploading.
15:16
@spaceout Try sudo ufw allow out app transmission, be aware of case sensitivity, you must use the app-name you specified in /etc/ufw/applications.d. If this does not work use the extended format described in man ufw which is ufw allow from 192.168.0.0/24 to any app <name>, you will have to check your local IP-adress for the correct value, in this example it is the IP-range from 192.168.0.0 to 192.168.0.255. You could also restrict to a single IP-adress. Upvoted your question because you are not lazy to research.
@spaceout It appears that it is not going to work, at least not with the restrictive defaults you set. With files in /etc/ufw/applications.d we can manage only incoming connections. The only way is to reset ufw to defaults sudo ufw reset and add the rule for incoming connections ` sudo ufw allow 51413`. Not everything is possible with ufw, For more complicated setups you will have to use iptables.
Looks like it. If I first disable ufw and start seeding torrents, the established peer connections persist after enabling ufw and no new connection is established. However, if I enable ufw before I start seeding, then no seeding happens at all.
ok. After reading this -> help.ubuntu.com/community/DoINeedAFirewall -> post I felt I should establish one but it looks like it's more complicated then I thought. BDW Thanks a lot for your input
Maybe I'll learn abit about the iptables and try to apply it, see if I'll manage.
@spaceout I'm going to try out more, but it will take time, at the moment I have some torrents running with qbittorrent, so it will take some time.The main point is connectivity, so it is the best if we can have incoming and outgoing connections. At the moment I see peers that I'm seeding to which are connected via incoming connection. Tthe data-flow goes in both direction as soon as the connection is establish. Incoming connection just means that the connection is initialized from outside.
@spaceout An outcoing connection is initialized from your machine. It is similar to phone calls, somebody calls you (incoming) and as soon as you accept the call you can speak and listen.
Ok. That means the problem is, transmission is not able to initialize outgoing connection?
15:35
Because you restricted incoming and outgoing connections with your default settings in ufw following the guide with sudo ufw default deny incoming && sudo ufw default deny outgoing. you will have to explicitely allow outgoing connections for each application. On some ports you allowed outgoing connections, but not on the ports trasmission want to use.
@spaceout The problem here is that transmission seem to use random ports, so we would have to allow all ports for outgoing connections. At least for this application, I tried to do that, but not successful yet.
@spaceout I will try more later on and let you know if I get something nice.
ok. Let me know if I should post result of any command
 
5 hours later…
21:09
@spaceout As far as I understand and as far as I tested things out, we can use ufw to allow or deny connetions (in/out) and specify used IP-protcols. But we can not define which applications are allowed to access the ports, ufw is not a application level firewall like firewalls for Windows. If you want to use ufw further on, I'd recommend to reset ufw to defaults.
Use `"sudo ufw reset" this will disable ufw and reset ufw to defaults, allow all outgoing, deny all incoming connections. Enable ufw again and add the rule for transmission, "sudo ufw allow 51413" to allow incoming connections on the port. I recommend to reboot the machine as iptables rules get cluttered without a reboot.
This way you have a bit more security than just with unconfigured iptables, as iptables will allow any traffic through any ports by default. With ufw configured described above you block all incoming connections exept to the ports you define with ufw, that's better than nothing. If you leave ufw configured following the guide you used you will probably have more problems with other applications.
I found some interesting links you should look at: askubuntu.com/questions/917575/… askubuntu.com/questions/45072/… askubuntu.com/questions/97158/… Hope this helps you a bit...
I myself use iptables with default configuration, trusting the built in firewall in my router. The router blocks all incoming connections, only the forwarded ports are a hole. But I have a single machine, no local network and such things, so for me it is ok.

  last day (15 days later) »