Re: using iptables to track network activity of a specific program
Evidently, there used to be a way via "--cmd-owner name", but it got removed because it broke. I think you have to do as you suggested.
There seems to be plenty of confusing stuff using search engine terms: iptables "--cmd-owner" removed
Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.