View Full Version : question about iptables/-m owner..


OneOfOne
any idea on how to make -m owner work for the input chain?

from man iptables :
owner
This module attempts to match various characteristics of the packet creator, for locally-generated packets. It is only
valid in the OUTPUT chain, and even this some packets (such as ICMP ping responses) may have no owner, and hence never
match.

--uid-owner userid
Matches if the packet was created by a process with the given effective user id.

--gid-owner groupid
Matches if the packet was created by a process with the given effective group id.

--pid-owner processid
Matches if the packet was created by a process with the given process id.

--sid-owner sessionid
Matches if the packet was created by a process in the given session group.

--cmd-owner name
Matches if the packet was created by a process with the given command name. (this option is present only if
iptables was compiled under a kernel supporting this feature)
like : if (portX == openedBy(progY)) {allow incoming;}

peace

safrout
and why don't u post it in Tips & Tricks thread ya 3am One

OneOfOne
well, i dunno if it's concedered a tip since it works for only OUTPUT chain..
here's a patch to make it work for the input chain but i didnt try it yet : http://www.netfilter.org/documentation/pomlist/pom-extra.html#owner-socketlookup

peace