I'm struggling with iptables. I want to block ALL outgoing traffic except for a single piece of software that runs under the a specific user account.
Chain OUTPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- anywhere anywhere owner UID match test 2 DROP all -- anywhere anywhere
This doesn't work. The test user can ping from the command prompt but for example browsing with Firefox doesn't work.
If I add an extra rule for the user that my software is running under (I think that user is a service account? It was created by the software on install) I'm not a Linux expert) I have the same problem. Looking at the application logs it appears the software is unable to access the Internet.
When I add a accept all anywhere anywhere rule everything is working (both for my normal test user and the software user account). I've also tried creating a new normal desktop user and that has the same problem. Ping OK but no internet access through a browser. I get the feeling the user running the software isn't actually the one initiating the connection.
What am I doing wrong?