Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:16.04

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y upgrade \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install strongswan iptables uuid-runtime ndppd openssl \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install strongswan strongswan-plugin-farp strongswan-plugin-dhcp iptables uuid-runtime ndppd openssl \
&& rm -rf /var/lib/apt/lists/* # cache busted 20160406.1

RUN rm /etc/ipsec.secrets
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# IKEv2 VPN Server on Docker

Recipe to build [`gaomd/ikev2-vpn-server`](https://registry.hub.docker.com/u/gaomd/ikev2-vpn-server/) Docker image.
Recipe to build, clone this repo and run `docker build . -t "testing/ikev2-vpn-server"`

## Usage

### 1. Start the IKEv2 VPN Server
#### For using iTunes Home Sharing / Plex Shareing connect directly to your LAN network

docker run --privileged -d --name ikev2-vpn-server --restart=always -p 500:500/udp -p 4500:4500/udp gaomd/ikev2-vpn-server:0.3.0
### 1. Start the IKEv2 VPN Server (the -p options are outdated for utalizing Bonjour, bridge directly to LAN)

docker run --privileged -d --name ikev2-vpn-server --restart=always -p 500:500/udp -p 4500:4500/udp testing/ikev2-vpn-server:latest

### 2. Generate the .mobileconfig (for iOS / macOS)

docker run --privileged -i -t --rm --volumes-from ikev2-vpn-server -e "HOST=vpn1.example.com" gaomd/ikev2-vpn-server:0.3.0 generate-mobileconfig > ikev2-vpn.mobileconfig
docker run --privileged -i -t --rm --volumes-from ikev2-vpn-server -e "HOST=vpn1.example.com" testing/ikev2-vpn-server:latest generate-mobileconfig > ikev2-vpn.mobileconfig

*Be sure to replace `vpn1.example.com` with your own domain name and resolve it to you server's IP address. Simply put an IP address is supported as well (and enjoy an even faster handshake speed).*

Expand Down
3 changes: 2 additions & 1 deletion etc/ipsec.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ conn rw
# end ref
leftfirewall=yes
right=%any
rightsourceip=10.8.0.0/16,fd6a:6ce3:c8d8:7caa::/64
rightsourceip=%dhcp
auto=add
esp=aes256-sha256-modp2048