I want to inspect and modify the http requests from one process sent to another. For that I have a proxy running on localhost port 8080/tcp. The process owner is root, and the application it sends to runs on localhost port 50000/tcp. The process spawns new sub-processes, that's why I'm chosing the above route. I can't use
--pid-owner. How would the iptables command for this look like?
Or phrased differently:
- There is one process p2, that communicates using HTTP with another process p1.
- p2 and p1 run on localhost
- p1 runs on 50000/tcp
- p2 -> p1
- Run the traffic through a proxy.
- Proxy also runs on localhost.
- Port 8080/tcp.
- p2 -> proxy -> p1
- I don't have the option to specify a proxy in p2.
- Everything runs on localhost