A few months ago I was a guest on The Ubuntu Podcast, where I mentioned that I use Streisand to terminate my VPN connections. I waffled and blathered a bit about how I set it up, but in the end it comes down to this:
- Install Virtualbox on my Ubuntu server. Include the “Ext Pack”.
- Install Vagrant on my Ubuntu server.
- Clone the Streisand Github repository to my Ubuntu server.
- Enter that cloned repository, and edit the Vagrantfile as follows:
- Add the line “config.vm.boot_timeout = 65535” after the one starting “config.vm.box”.
- Change the streisand.vm.hostname line to be an appropriate hostname for my network, and add on the following line (replace “eth0” with the attached interface on your network and “192.0.2.1” with an unallocated static IP address from your network):
streisand.vm.network "public_network", bridge: "eth0", ip: "192.0.2.1", :use_dhcp_assigned_default_route => false
- Add a “routing” line, as follows (replace 192.0.2.254 with your router IP address):
streisand.vm.provision "shell", run: "always", inline: "ip route add 0.0.0.0/1 via 192.0.2.254 ; ip route add 128.0.0.0/1 via 192.0.2.254"
- Comment out the line “streisand_client_test => true”
- Amend the line “streisand_ipv4_address” to reflect the IP address you’ve put above in 4.2.
- Remove the block starting “config.vm.define streisand-client do |client|”
- Run “vagrant up” in that directory to start the virtual machine. Once it’s finished starting, there will be a folder called “Generated Docs” – open the .html file to see what credentials you must use to access the server. Follow it’s instructions.
- Once it’s completed, you should open ports on your router to the IP address you’ve specified. Typically, at least, UDP/500 and UDP/4500 for the IPsec service, UDP/636 for the OpenVPN service and TCP/4443 for the OpenConnect service.