Answer the question
In order to leave comments, you need to log in
How to force OpenVPN to use a proxy?
Good evening, I have a VPN server on Ubuntu 20.10, everything is up by auto script ( https://github.com/angristan/openvpn-install ) - works great! For a regular VPN, I used this particular script for more than two years. Now there is a need to force the VPN server to drive traffic through my HTTP proxies (I can SOCKS5), and so, I found something in Google, entered my proxy - but the VPN stopped hiding IP, there is just a tunnel, I returned the config to the second version - the same as regular VPN, no proxy IP at the output.
port 1111
proto tcp
dev tun
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 1.0.0.1"
push "dhcp-option DNS 1.1.1.1"
push "redirect-gateway def1 bypass-dhcp"
dh none
ecdh-curve prime256v1
tls-crypt tls-crypt.key
crl-verify crl.pem
ca ca.crt
cert server_x6KXQxl2PFzX74qe.crt
key server_x6KXQxl2PFzX74qe.key
auth SHA256
cipher AES-128-GCM
ncp-ciphers AES-128-GCM
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
client-config-dir /etc/openvpn/ccd
status /var/log/openvpn/status.log
verb 3
port 1111
proto tcp
dev tun
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 1.0.0.1"
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option PROXY_HTTP 82.xxx.xxx.xxx 3251"
push "redirect-gateway def1 bypass-dhcp"
dh none
ecdh-curve prime256v1
tls-crypt tls-crypt.key
crl-verify crl.pem
ca ca.crt
cert server_x6KXQxl2PFzX74qe.crt
key server_x6KXQxl2PFzX74qe.key
auth SHA256
cipher AES-128-GCM
ncp-ciphers AES-128-GCM
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
client-config-dir /etc/openvpn/ccd
status /var/log/openvpn/status.log
verb 3
Answer the question
In order to leave comments, you need to log in
https://forums.openvpn.net/viewtopic.php?t=15299
there was already such a question.
what you can try:
1) add HTTPS_PROXY in addition to HTTP_PROXY
2) make a transparent proxy on the VPN server side via iptables
3) set the proxy in the settings on the client side
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question