Monday, May 6, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1201  / 3 Years ago, tue, june 22, 2021, 6:05:29

As soon as I go online via my portable 3G hotspot, all running programs happily start pulling updates (e.g. Gwibber, Thunderbird, Update Manager...) and eat into my traffic quota. Is there a way to activate a network connection, but only tell specific programs about it (e.g. Firefox, if I just want to quickly look something up)? Note that I'm not looking for bandwidth limiting, I just want to prevent the automatic "ooh, I'm online, let's get some data" behavior.



EDIT: I have already received two useful answers, however, I'd still like to add some clarification: what does NetworkManager do to tell running programs they're now online? I assume it's some sort of DBus message. Can I prevent that from being sent?


More From » network-manager

 Answers
3

One of the ways that I would do that is using a Firewall. Ubuntu comes with it own Firewall UFW. You might want to install the GUI version, just to make it easier. To install it, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:



sudo apt-get install gufw


Once it finishes, just type gufw at the terminal prompt, and with the application opens, click on Edit, and then Add Rule.



enter image description here



When that window opens, choose Deny --> Out --> Application -->, and then choose the application that you want. For command line control over the Firewall, see UFW



enter image description here



If you want to block e.g. DropBox, you can block the entire Dropbox network IP allocation listed in ARIN, as seen in the image below.



enter image description here



And you can see that it keeps saying connecting..



enter image description here


[#30780] Thursday, June 24, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tatoethin

Total Points: 377
Total Questions: 110
Total Answers: 98

Location: Saudi Arabia
Member since Sat, Aug 20, 2022
2 Years ago
;