We use an openvpn tunnel to access the internal APIs, but the openvpn doesn't allow us to connect to any external sites which is a bit of an issue when I need to call external APIs in my service. Ideally I want to turn on the openvpn but instead of routing everything through it, I only want a socks5 port as a tunnel, and then I can programmatically control my service to call the internal APIs via the socks5 port and the external APIs via the internet directly. How would I be able to do it? I am working on an ubuntu 18.04 server.
Asked
Active
Viewed 1,168 times
1
-
What would the socks5 proxy be for? Why not just configure OpenVPN to route only the traffic you want, and not all traffic? – Michael Hampton Jun 12 '20 at 17:06
-
"only the traffic you want" - that's the difficult part, since the service I am running is really a Node.js app, if I route all Node.js traffic through OpenVPN then I lose the access to the external APIs. @MichaelHampton – Aero Windwalker Jun 12 '20 at 17:33
-
You could route only traffic for the internal API server. – Michael Hampton Jun 12 '20 at 17:35
-
How do I do that? @MichaelHampton – Aero Windwalker Jun 12 '20 at 17:36