How to connect to VPN through Proxy Server
Solution 1:
I found myself in a very similar situation more than once. If you follow IANA port assignment rules, it is as slhck says: you cannot do it without asking the administrator to allow an outgoing connection to your VPN (e.g. port 1194 UDP is the default for OpenVPN).
However, I managed to solve that problem by breaking the rules and assigning TCP port number 443 (HTTPS) to my VPN server. This worked for me because the network that I connected from did not actually proxy TCP port 443: they simply forwarded TCP:443 packets transparently -- probably to avoid the hassle of configuring an HTTPS proxy. This post here discusses HTTPS proxies, which might prevent this solution from working.
Recently I also learned that OpenVPN supports proxies, as shown in this OpenVPN howto page. I haven't tested that, but it might work.
It all depends on how strict is network security at the place you are... In the end it might just be easier (and more ethical) to just ask your client's IT folks to help you.
Please notice that using TCP for a VPN is not advised, as it introduces an extra layer of TCP overhead, as discussed in this post.
Solution 2:
It's not possible. Proxies (in companies) are basically meant to funnel all outgoing traffic through, for several reasons (policy enforcing, content caching, monitoring, etc.). Mostly, outgoing requests are only allowed via HTTP, HTTPS and maybe FTP, and even that, only on specific ports.
VPN on the other hand uses a tunneled connection, much like SSH (or SFTP, for that matter). These also use a different port than the typical ones you find for HTTP (80) and HTTPS (443).
It won't work for various reasons:
- It's very likely that the company network you are in does not allow outgoing connections on any port other than predefined ones (i.e., 80, 443), or anything that is not requested via the proxy server
- Protocols other than HTTP(S) or FTP may be forbidden
- The proxy may just be a simple HTTP proxy, with no means of forwarding any other traffic (which is what a SOCKS proxy could do)
Your only option is to get an exception rule in the company firewall to allow an outgoing connection to your VPN endpoint, using a specific port.
Solution 3:
Please specify which VPN software you are using.
Most VPNs with own client software (IPSec, PPTP, L2TP) cannot connect through proxy server. If you are using SSL-VPN, you can configure the browser to use the proxy.