N
N
nathanael2019-06-18 17:45:05
linux
nathanael, 2019-06-18 17:45:05

How to force Squid to drive traffic through openvpn connection?

I need to set up a proxy server so that individual applications can send traffic through it.
In turn, this proxy (squid) should use a vpn connection (openvpn), but it should not replace the default routes.
I see it like this: I start the VPN client, connect (but the Internet does NOT go through the VPN), after connecting, the vpn client starts squid (via a script).
After that, I can run some program and specify the address and port of the squid in the proxy settings.
Maybe I need another proxy server (not all programs support http-proxy, but for example only socks).
During the search, I found the tcp_outgoing_address squid option (which transmits the VPN tunnel device address).
I commented out the redirect-gateway option in the VPN config.
But the proxy still doesn't work as intended.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
ky0, 2019-06-18
@ky0

You want weird. A common way to direct traffic into a VPN tunnel is to add routes for specific subnets or default routes. If the problem is that the vpn is needed only for the proxy, and next to it there are some other services that should go through the Internet - move the proxy to a separate virtual machine / container.

T
taliano, 2019-06-19
@taliano

You can raise another squid on the other side and send traffic to it as on cache_peer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question