How can I prevent a particular program from using the internet?

How can I prevent a particular program from using the internet in the Workstation?

Thanks for help.

You can use firejail

From the command line

firejail –net=none some_app

In custom firejail profile:

net none

1 Like

Thank you for your answer.
I want to prevent keepassxc from being able to establish an internet connection, But keepassxc must be able to save the database file. I am not sure if firejail is the right solution.

is there no firewall in the gateway which can prevent keepassxc for internet connection?

Free Support for Whonix ™ also applies.

tbh I’m not that familiar with keepassx. Does it need networking in general? If it does not make any connections on its own, there is nothing to block. You could also just clone the VM, remove the network interface and use the clone just for password storage. Or if the VM needs to be online you need to take a closer look at the firewall config, firejail or maybe apparmor. If in doubt, you could/should always make a backup/snapshot prior to testing.


Thanks for your Answer, this was helpful.