2015-11-27 17:36:03 +00:00
|
|
|
# IKEv2 VPN Server on Docker
|
2015-01-25 13:12:20 +00:00
|
|
|
|
2019-05-03 15:51:12 +00:00
|
|
|
Recipe to build [`amdavidson/vpn-server`](https://registry.hub.docker.com/u/amdavidson/vpn-server/) Docker image.
|
2015-01-25 14:36:32 +00:00
|
|
|
|
2016-04-05 15:59:51 +00:00
|
|
|
## Usage
|
2015-01-25 14:36:32 +00:00
|
|
|
|
2016-04-05 15:59:51 +00:00
|
|
|
### 1. Start the IKEv2 VPN Server
|
2015-01-25 14:36:32 +00:00
|
|
|
|
2019-06-05 04:09:21 +00:00
|
|
|
docker run --privileged -d \
|
|
|
|
--name vpn-server \
|
|
|
|
--restart=always \
|
|
|
|
-p 500:500/udp -p 4500:4500/udp \
|
|
|
|
-e "DNS=9.9.9.9" \
|
|
|
|
-e "SAFE_SSID=my home ssid" \
|
|
|
|
amdavidson/vpn-server:latest
|
2015-01-25 14:36:32 +00:00
|
|
|
|
2016-09-23 12:48:08 +00:00
|
|
|
### 2. Generate the .mobileconfig (for iOS / macOS)
|
2015-01-25 14:36:32 +00:00
|
|
|
|
2019-06-05 04:09:21 +00:00
|
|
|
docker run -it --rm \
|
|
|
|
--volumes-from vpn-server \
|
|
|
|
-e "HOST=vpn1.example.com" \
|
|
|
|
amdavidson/vpn-server:latest \
|
|
|
|
generate-mobileconfig > ikev2-vpn.mobileconfig
|
2015-01-25 14:36:32 +00:00
|
|
|
|
2019-05-03 15:51:12 +00:00
|
|
|
*Be sure to replace `vpn1.example.com` with your own domain name and resolve it to you server's IP address.
|
2016-04-05 15:59:51 +00:00
|
|
|
|
|
|
|
Transfer the generated `ikev2-vpn.mobileconfig` file to your local computer via SSH tunnel (`scp`) or any other secure methods.
|
2015-01-25 14:36:32 +00:00
|
|
|
|
2016-04-05 15:59:51 +00:00
|
|
|
## License
|
2019-05-10 16:14:25 +00:00
|
|
|
Copyright (c) 2019 Andrew Davidson
|
2019-05-10 16:14:59 +00:00
|
|
|
|
2019-05-10 16:14:25 +00:00
|
|
|
Copyright (c) 2016 Mengdi Gao
|
2019-05-10 16:14:59 +00:00
|
|
|
|
2019-05-10 16:14:25 +00:00
|
|
|
This software is licensed under the [MIT License](LICENSE).
|