Is it possible to allow all traffic for a specific program in
iptables? Otherwise using
nmap and a strict
iptables configuration at the same time seems impossible.
Using iptables, you can't tell to allow all the traffic from a specific program but you can tell to allow the traffic sent from an application running from a particular user.
This rule tells the kernel to reject packets sent to the local TCP port 992 unless they're sent by one of root's processes.
The module owner should be the solution IMHO, too. But making the binary run as SUID may not be useful (even if it would not be SUID root). Instead making it run as SGID and using