alternate
By:
alternate

Can I use a VPN to "give" my home-based, dedicated server my Digital Ocean IP?

April 26, 2015 877 views
VPN WordPress Ubuntu

Is it possible to connect my physical, dedicated server to a Digital Ocean Droplet over VPN so that I can be "running" on a clean IP? I have a fast Comcast residential line, which causes problems with outbound, transactional emails when I try to run a dedicated web server. I switched to Bluehost a year ago, but I am sick of them and can't afford to pay more than the $30 / mo. I am already paying. I run about a dozen, low-traffic WordPress websites and REALLY like the speed that a dedicated server affords.

This morning I successfully set up a Dropbox running Ubuntu 12 64-bit and quickly installed OpenVPN, which I was able to tunnel into from my main Windows machine, so I know at least that much works. I just don't know where to go from here...

1 Answer

You could let your home server dial-in as a HTTP(S) client, and include a Authentication token in a HTTP(S) reguest header (Auth token: Think fx. JWT with AES encryption), so the the server knows that it is your home server that is knocking on the door; maybe also use IP address range filtering. If you main reverse proxy server at Digitalocean needs to do some expensive processing it could ask your home server to do the heavy lifting, and send the response back. This of cource requires that you have good upload and download bitrate, fx 60Mbit/s / 60 Mbit/s.

You could fx. use first Varnish and after that nginx for static files like HTML, js, css, and pictures. Nginx should be configured as a reverse proxy server for dynamic content, which goes to the home server. If the connection to the home server goes down for some reason, nginx should respond with a 500 Internal Server Error, and in your server logs something like "Backend server connection is down." should be added together with date and time.

JWT (JSON Web Tokens): http://jwt.io/ , https://developer.atlassian.com/static/connect/docs/latest/concepts/understanding-jwt.html

Have another answer? Share your knowledge.