Search code examples
linuxiptables

create iptables rule per process/service


is it possible to use iptables in order to permit traffic initiated by a "process", ie using the process name? I would like for example to allow everything that is initiated by ping command.


Solution

  • It looks like the owner iptables module is that what you want. First, check if it's available in Your system:

    iptables -m owner --help
    

    You can read more here: http://www.frozentux.net/iptables-tutorial/iptables-tutorial.html#OWNERMATCH