diff --git a/README.md b/README.md index 495a293..2e82042 100644 --- a/README.md +++ b/README.md @@ -74,9 +74,19 @@ is rooted. The topology used is `net30`, because it works on the widest range of OS. `p2p`, for instance, does not work on Windows. -The TCP by default server uses `192.168.255.0/25` and the UDP server uses -`192.168.255.128/25`. You can override subnet (three octets, for now you can't override mask) by `SUBNET` variable. -For example `docker run -d --privileged -p 1194:1194/udp -p 443:443/tcp -e SUBNET=192.168.13 jpetazzo/dockvpn` +The TCP server uses `192.168.255.0/25` and the UDP server uses +`192.168.255.128/25`. However, you can change these subnets by +setting the `SUBNET` environment variable. Note that at the moment, +you can only specify the first three octets of the subnet, and +the TCP and UDP servers will use the lower /25 and upper /25 +subnets respectively. + +For instance, you can do: + +```bash +docker run -d --privileged -p 1194:1194/udp -p 443:443/tcp \ + -e SUBNET=192.168.13 jpetazzo/dockvpn +``` The client profile specifies `redirect-gateway def1`, meaning that after establishing the VPN connection, all traffic will go through the VPN. diff --git a/bin/run b/bin/run index 9ba1f08..13f5fad 100755 --- a/bin/run +++ b/bin/run @@ -1,6 +1,7 @@ #!/bin/sh -VPN_SUBNET="${SUBNET:-192.168.255}" # You can override subnet of VPN +# The subnet can be overridden with an environment variable +VPN_SUBNET="${SUBNET:-192.168.255}" set -e