I've followed this guide: How to block internet access for wine applications?
And created the following rules:
sudo addgroup no-internet # Create group "no-internet"
sudo adduser $USER no-internet # Add current user to no-internet
sudo iptables -I OUTPUT 1 -m owner --gid-owner no-internet -j DROP
sudo ip6tables -I OUTPUT 1 -m owner --gid-owner no-internet -j DROP # To also block IPv6 traffic
I then run the WINE app:
sg no-internet -c "wine-stable pathToApp"
But how do I make this a persistent rule so that I don't have to run the WINE app via sg no-internet -c "wine-stable pathToApp"
(i.e. even if I run the app directly) and also it will work even after reboot?
sg no-internet -c "wine-stable pathToApp"
to be the default and persistent way the particular WINE app (or any other app I setup) executes. The same thing one can do on Windows - block internet access for a particular executable and have that rule persistently saved in Windows' firewall rule set. – kat Mar 04 '20 at 17:30sg ...
like you said you wanted to persist. The problem is, it would be easier to just set up a rule in AppArmor to disallow Wine to run. (Application level filtration is done at a different layer than the Layer2/Layer3 level that Wine interacts at) – Thomas Ward Mar 04 '20 at 17:35wine
executes out of multiple locations it gets complicated to make work. I'm experimenting in a VM and will give you an update if I get a complete solution. – Thomas Ward Mar 14 '20 at 22:12