Skip to content

Instantly share code, notes, and snippets.

@aliasmee
Last active September 18, 2019 02:56
Show Gist options
  • Save aliasmee/d06255b246d51c64110edc2ef8b14e01 to your computer and use it in GitHub Desktop.
Save aliasmee/d06255b246d51c64110edc2ef8b14e01 to your computer and use it in GitHub Desktop.
step by step install ikev2 vpn
### Install Docker REF: https://docs.docker.com/install/linux/docker-ce/ubuntu/
VPN HOST: 35.222.170.153
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
### Install IKEv2 vpn
```bash
sudo su
docker pull hanyifeng/alpine-ikev2-vpn
docker run --restart=always -itd --privileged -v /lib/modules:/lib/modules -e HOST_IP=35.222.170.153 -e VPNUSER=jack -e VPNPASS="jack&opsAdmin" -p 500:500/udp -p 4500:4500/udp --name=ikev2-vpn hanyifeng/alpine-ikev2-vpn
docker exec -it ikev2-vpn sh /usr/bin/vpn
```
### Notes:
* Please open port 500/UDP、4500/UDP at the firewall.
* Please run command as root !!!
DONE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment