Skip to content

Instantly share code, notes, and snippets.

@dexterous
Last active July 20, 2016 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dexterous/9b993d3625103df2dc09100709278321 to your computer and use it in GitHub Desktop.
Save dexterous/9b993d3625103df2dc09100709278321 to your computer and use it in GitHub Desktop.
Steps to install and configure OpenVPN client on Fedora 23
Vagrant.configure(2) do |config|
config.vm.box = "fedora/23-cloud-base"
config.vm.provider "virtualbox" do |vbox|
# Modify netmask of default NAT interface to avoid conflict with VPN
vbox.customize ["modifyvm", :id, "--natnet1", "192.168.20.0/24"]
end
config.vm.network "public_network", bridge: "wlan0"
config.vm.provision "shell", inline: <<-SHELL
dnf -yq install rsyslog
dnf -yq install openvpn
dnf -yq update
dnf -yq autoremove
mkdir /usr/lib64/openvpn/contrib
cp -R /usr/share/doc/openvpn/contrib/pull-resolv-conf /usr/lib64/openvpn/contrib/
chmod +x /usr/lib64/openvpn/contrib/pull-resolv-conf/*
cp /vagrant/my-vpn.conf /etc/openvpn
systemctl enable openvpn@my-vpn.service
SHELL
end
@dexterous
Copy link
Author

Hey @jonathanpdx, just in case you were interested. I'm probably going to convert this and some of my other Vagrantfiles (such as https://gist.github.com/dexterous/fc66a5585a46886cf995) into a repo of Packer templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment