Ubuntu - block internet access to all applications except chosen few

11,623

gufw and other default-shipped firewalls aren't designed to filter by application - gufw is an uncomplicated GUI frontend to ufw, and isn't designed to filter on the application level, it's simply an uncomplicated front-end for setting up basic filtering rules based on IP, port, etc.

What you're looking for goes beyond the standard firewall-in-linux rulesets which ufw and gufw can accomodate. There are several suggested methods (the linked one is group-based controls, so you have to add applications you want to access the 'net to a specific group), but there's also other applications such as Douane, which may do this at the application layer as well.

Share:
11,623

Related videos on Youtube

Webeng
Author by

Webeng

<?php require('life_config.php');//obtaining $alive value $sql = "UPDATE my_life SET drink=:drink, passion=:passion, lifestyle=:lifestyle, ongoing=:ongoing WHERE :alive"; $stmt = $conn->prepare(sql); $stmt->bindParam(':drink', 'Green Tea'); $stmt->bindParam(':passion', 'web development'); $stmt->bindParam(':lifestyle', 'two days of jiujitsu rolling / week'); $stmt->bindParam(':onging', 'research'); $stmt->bindParam(':alive', $alive); $stmt->execute();//Life update complete ?>

Updated on September 18, 2022

Comments

  • Webeng
    Webeng over 1 year

    I have been looking for a way to block all my applications from accessing the internet except for 1 or 2 chosen applications.

    I looked into Uncomplicated Firewall (ufw) and its respective Gui (gufw):

    enter image description here

    but gufw doesn't seem to have the option to block specific programs from accessing the internet (which windows firewall does with outbound rules).

    QUESTION: Does anyone know how I might be able to get that done?

  • drjors
    drjors about 7 years
    Kinda curious why I was downvoted when I even linked to Douane which is another solution...
  • Webeng
    Webeng about 7 years
    I didn't downvote it, I will download the application and see how it works! :)
  • drjors
    drjors about 7 years
    @Webeng didn't say you did, just a global 'broadcast' to what i've observed :P
  • darksoulsong
    darksoulsong almost 4 years
    @ThomasWard It looks like the Douane has a freeze bug, which is terrible. The site is not clear if this issue has been solved or not. Do you know if this is still happening?
  • darksoulsong
    darksoulsong almost 4 years
    @Webeng Have you tried it?
  • Paul
    Paul over 2 years
    From the Douane website: " Warning: unfortunately the project is suffering of a kernel freeze bug that can break your machine!"