How can I restrict applications on having Internet access?












2















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















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












2








2








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










share|improve this question
















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







ubuntu






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 16 '11 at 9:22









Lekensteyn

4,54121942




4,54121942










asked Apr 16 '11 at 9:03









farhad daiefarhad daie

1112




1112













  • 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



















  • 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

















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





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





it is very much possible with a good firewall.

– kaykay
Apr 16 '11 at 11:51










2 Answers
2






active

oldest

votes


















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































    0














    You can use firejail. It runs the application in sandbox where you control if the application could see the network or the file system. Example:



    firejail --net=none firefox


    This will execute Firefox browser without internet access.
    Note that the firejail distribution in the Ubuntu repo is outdated - better download its latest LTS version from the firejail home page.



    Additional information about firejail usage - here.






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f271584%2fhow-can-i-restrict-applications-on-having-internet-access%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      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




























        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


























          2












          2








          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













          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












          share|improve this answer



          share|improve this answer










          answered Apr 16 '11 at 11:21









          msdinmsdin

          1212




          1212

























              0














              You can use firejail. It runs the application in sandbox where you control if the application could see the network or the file system. Example:



              firejail --net=none firefox


              This will execute Firefox browser without internet access.
              Note that the firejail distribution in the Ubuntu repo is outdated - better download its latest LTS version from the firejail home page.



              Additional information about firejail usage - here.






              share|improve this answer




























                0














                You can use firejail. It runs the application in sandbox where you control if the application could see the network or the file system. Example:



                firejail --net=none firefox


                This will execute Firefox browser without internet access.
                Note that the firejail distribution in the Ubuntu repo is outdated - better download its latest LTS version from the firejail home page.



                Additional information about firejail usage - here.






                share|improve this answer


























                  0












                  0








                  0







                  You can use firejail. It runs the application in sandbox where you control if the application could see the network or the file system. Example:



                  firejail --net=none firefox


                  This will execute Firefox browser without internet access.
                  Note that the firejail distribution in the Ubuntu repo is outdated - better download its latest LTS version from the firejail home page.



                  Additional information about firejail usage - here.






                  share|improve this answer













                  You can use firejail. It runs the application in sandbox where you control if the application could see the network or the file system. Example:



                  firejail --net=none firefox


                  This will execute Firefox browser without internet access.
                  Note that the firejail distribution in the Ubuntu repo is outdated - better download its latest LTS version from the firejail home page.



                  Additional information about firejail usage - here.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 26 at 12:17









                  Dimitar IIDimitar II

                  1013




                  1013






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f271584%2fhow-can-i-restrict-applications-on-having-internet-access%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                      Mangá

                      Eduardo VII do Reino Unido