Answer the question
In order to leave comments, you need to log in
How to redirect outgoing requests of a specific application to a proxy?
There is a small NodeJs service that accepts requests and sends a webhook to a third-party service and returns a response.
The third-party service is hosted on AWS and blocked addresses periodically come across. And as a solution, is it possible to redirect requests of this particular backend to a proxy? Without rewriting the backend itself.
I feel that it is possible to do this with iptables, but I can not think of how.
Answer the question
In order to leave comments, you need to log in
There is an owner module for iptables that allows you to filter by the owner of a running process.
I see it this way. Run your application as a separate user, the line for iptables will be something like:
Found the description of the module:
https://www.frozentux.net/iptables-tutorial/iptabl...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question