When I am at slow and/or paid networks (i.e. in public transport wifi of while tethering) I want to browse as fast as possible, so I don't want Ubuntu to download software updates, torrents, etc.

There are many apps that monitor or limit applications, but I can't find an app that works like the 'disable background usage' or 'disable while not on wifi or while roaming' like Android has. I would be great to have an app that disables/limit certain applications when the wifi network is considered as a slow/expensive network.


Just create a firewall profile that blocks everything except http and dns and set your update mirror to one that only accepts the ftp protocol:

  1. Firewall configuration:

    apt-get install gufw

Now go to the dash, and type firewall and click the sole icon remaining and you'll see:

Firewall public

Begin warning: From now on, until you see End warning, you will not have access to the Internet!

  • Take the "public" profile (or another one you're currently now using) and set everything to "reject" (as in the picture above)
  • Click the + below "rules" and click on the "Simple" tab and fill out the screen as follows:

DNS traffic

and press Add

Then fill out the screen as follows:

HTTP traffic

and press Add, then Close

End Warning

Your rules section should now look like this:

Minimal rules

  1. Mirror config

In the Netherlands, there is only one mirror that supports ftp only: Ftpserv-tudelft-nl, for all other countries, look here for the full list and choose your own.

Now go to the dash again and type Software Updater and again, click the sole icon available, click Settings, the "Ubuntu Software" tab, "Download from:" and choose Other, take the country of your choice and the server of your choice:


And voilà: you can only surf the Internet and nothing else can happen any more!

No updates, no email, no Skype, no FTP, no HTTPS, no nothing! Only DNS look-ups and web surfing If you would like to have more then the absolute minimal available, have a look at IANA assigned port numbers and add any other protocol numbers you would need.

To revert back to normal use: just open the firewall in the dash again, Click on Public and then click on Home and you're back to where you were!

  • Don't thank me! ;-) If you like my answer, just click the little grey under the "0" now turning it into beautiful green. If you do not like my answer, click on the little grey down-arrow below the 0, and if you really like my answer, click on the little grey checkmark and the little up-arrow... If you have any further questions, go to askubuntu.com/questions/ask – Fabby Feb 19 '15 at 13:49
  • Graag gedaan! ;-) – Fabby Feb 19 '15 at 16:00
  • Dankjewel! ;-). The only thing I'm missing is the ability to select a default firewall zone for each network. I'm using KDE and I just saw a 'Firewall-zone' select box in my network manager, but I can't select anything. I'll look for more information and keep you posted. – Stephan Vierkant Feb 19 '15 at 16:03
  • Unfortunately, there is no integration: askubuntu.com/questions/406073/… – Stephan Vierkant Feb 19 '15 at 16:13
  • AskUbuntu General room? Chat??? – Fabby Feb 19 '15 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.