create iptables rule per process/service

cateof picture cateof · Nov 30, 2010 · Viewed 33.7k times · Source

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.

Answer

barti_ddu picture barti_ddu · Nov 30, 2010

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