Tuesday, July 04, 2023

Re: Block network access completely for certain programs

On 04/07/2023 16:08, rat1@danwin1210.de wrote:
> How do I block the network access completely for a certain program with a
> blacklist or whitelist, whitelist prefered, with OpenBSD's pf(4)? My pdf
> reader, music player, video player, vim and much more shouldnt have access
> to networking at all. I remember it being possible with the Windows
> firewall program to choose a certain program to be completely
> networking-less. Is this possible with OpenBSD too? I couldnt find
> anything in the man pages or in the FAQ regarding this issue.

pf.conf(5) has option for user

    user user
             This rule only applies to packets of sockets owned by the
             specified user.  For outgoing connections initiated from the
             firewall, this is the user that opened the connection.  For
             incoming connections to the firewall itself, this is the user
             that listens on the destination port.
...


G

No comments:

Post a Comment