Ubuntu - block internet access to all applications except chosen few
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.
Related videos on Youtube
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, 2022Comments
-
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):
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?
-
Adam almost 5 yearsDepending on what's more important, Little Snitch does this nicely, on a Mac though obdev.at/products/littlesnitch/index.html
-
-
drjors about 7 yearsKinda curious why I was downvoted when I even linked to Douane which is another solution...
-
Webeng about 7 yearsI didn't downvote it, I will download the application and see how it works! :)
-
drjors about 7 years@Webeng didn't say you did, just a global 'broadcast' to what i've observed :P
-
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 almost 4 years@Webeng Have you tried it?
-
Paul over 2 yearsFrom the Douane website: " Warning: unfortunately the project is suffering of a kernel freeze bug that can break your machine!"