Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have to use a proxy to access the internet. I want create a VPN server that will connect through this proxy. It makes it easier to setup on devices. Here is a grid:

# # # # # #         # # # # # #         # # # # # # # # #
#         #   VPN   # VPN     #    ?    # HTTP/HTTPS    #         # # # # # # #
#  client # ------\ # server  # ------\ # proxy         # -------\#  internet #
#         # ------/ #         # ------/ # both          # -------/#           #
#         #         #         #         # 127.0.0.1:8087#         # # # # # # #
# # # # # #         # # # # # #         # # # # # # # # #

I want to use a Raspberry pi with OpenVPN for the server. The proxy is a python script that should be ran on the server. It's called Goagent. The proxy is so i can access the whole internet.

My question is: Does adding http-proxy in the openvpn server config file work with HTTPS addresses as well? Or am I getting it all wrong?

share|improve this question
    
The problem is that while OpenVPN does use SSL to encrypt its sessions, it does not use HTTPS - these are separate things. So the proxy server would have to let arbitrary protocols (ie ones other than HTTP and HTTPS) through, often using SOCKS. If the proxy server is there for security purposes, it is unlikely to permit this. Perhaps look at OpenVPN-AS? –  Paul Feb 6 at 4:33

1 Answer 1

up vote 0 down vote accepted

The http-proxy directive is used when between your VPN client and your VPN server there is a proxy (either http or https) which is not your case (and to respond to the comment it works on both TCP and SSL, with the catch that the OpenVPN connection has to be of tcp protocol).

In your drawing your Proxy is after the VPN connection.

In this case I'd say you would need to: 1) Setup a normal VPN connection between client and server 2) Push a route on the client so the client can see the Proxy in your image. This can be either a host route (for the specific IP) or a default route. You could need to do masquerading for the client IPs aswell if the proxy doesn't have the VPN network in its accessible routing table. And of course the server needs to have IP forwarding enabled. 3) Now either: 3a) On the client you can set up the proxy configuration of the applications your are using (ie. the browser) to point to the proxy IP/Port where to pass from 3b) You can do on the VPN server some transparent proxying and redirect all the traffic to the proxy machine (for example like in this article)

This way actually the VPN software doesn't know anything about the proxy. It will just make traffic pass between the first two blocks in your drawing. Then the VPN server will forward the packets to the proxy in one of the two ways.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.