Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do I restrict programs from accessing the Internet in Ubuntu. Not by port, but by application.

share|improve this question
I don't think that's possible, unless each application runs under a different User ID, in that case you can drop the packets by userID. –  Lekensteyn Apr 16 '11 at 9:11
it is very much possible with a good firewall. –  kaykay Apr 16 '11 at 11:51

2 Answers 2

I believe what you are looking for is referred to as an "application based firewall". Googling for that doesn't turn up anything currently useful for Ubuntu (or Linux in general). There used to be one called TuxGuardian but it appears to have been abandoned back in 2006 (don't attempt to use it).

However, it is possible to block applications from accessing the network by using AppArmor and creating profiles for the application(s) you want to block. Note that I'm not aware of any "user-friendly" GUIs for configuring AppArmor on Ubuntu - its strictly a text editor and command line operation so if you're new to Linux you may want to avoid this.

Here is the Ubuntu community page for AppArmor to get you started.

Here are the rules you are going to want to use in your profile(s).

share|improve this answer

you require a good firewall. In almost all good firewall softwares you can block any specific software to access the network.

share|improve this answer
define all good firewall softwares... Your answer is too vague –  Adonis K. Oct 16 '12 at 19:44
i think for that purpose there is a search engine called Google. I am trying to help here to give the right direction. which firewall or specific software suit to any individual i can not describe it all. –  kaykay Nov 26 '12 at 3:21
I'm sure you either don't understand that he is asking it for Ubuntu or you never bothered searching the topic because there is no such firewall in linux distros that can block the internet access on specified applications. –  Adonis K. Nov 27 '12 at 20:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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