Building my own VPC

Posted by Miguel Lopes on Sat, Oct 8, 2016
In Networking, Virtualization,

At home I have about 5 computers which I have repurposed to serve a few virtual machines and a backup server as well as a VPN server to be able to connect back to access the services I have at home. This setup has been useful but as time goes by the old hardware starts failing, on summers the heat generated by the computers becomes uncomfortable as well as the cost of the electricity to keep everything running and cold.

About a month ago I came across a deal on a dedicated server that made me rethink my homelab. I could migrate the great majority of the services and reduce the electricity bill and maintenance costs. I decided to go ahead and make a virtual private cloud in order to have my homelab in just one server and with a reduced cost.

So I did, I rented the server and has it had a few options on virtualization I thought I would try them to seem if they would meet my needs and requirements. For access to the server I wanted to maintain a similar setup to the homelab, having just a single port open for the VPN and everything else blocked. At first I tried VMware ESXI, but the first problem I came across was connecting to the server. The best way would be the official client which was windows only and so I crossed it from my list, I don’t want to have to use wine or have to connect to a windows machine to be able to manage the server. The second option was Proxmox, which was a Debian 7 with Proxmox on top of it. I tried to have an idea of how I would configure it per my requirements but it required changes on some scripts that could be overwritten with updates, and so I crossed Proxmox from my list and decided to build VPC from scratch.

I installed CentOS along with everything required to run my KVM guests, and started by creating the VPN and the networks that would support my private cloud. I defined 3 networks, one that was dedicated to the VPN (without internet access), so I could manage the VPS’s. Another one that would host a NAT to give internet access to the VMs and a third one that would allow IPv6 access to some VMs that would require external access. So now I have a host with only one exposed port on IPv4 and a couple of guests which have web services on IPv6 these services are accessed through a second server to be able to connect to them with IPv4.

This in comparison with the VPC available on Amazon seems to be a lot more affordable has it doesn’t have their bandwidth costs, which can become a bit dangerous, and at 16€/month beats their price.

comments powered by Disqus