Skip to content

A tiny Alpine based docker image to quickly setup an L2TP over IPsec VPN client w/ PSK.

License

Notifications You must be signed in to change notification settings

Kencove/l2tp-ipsec-vpn-client

 
 

Repository files navigation

l2tp-ipsec-vpn-client

  1. VPN Server Address
  2. Pre Shared Key
  3. Username
  4. Password

Kencove

  • added the internal network 192.168/16 with a test to the csi-db for api calls

Run

Setup environment variables for your credentials and config:

export VPN_SERVER_IPV4='1.2.3.4'
export VPN_PSK='my pre shared key'
export VPN_USERNAME='[email protected]'
export VPN_PASSWORD='mypass'
export VPN_CHECK_IP='1.2.3.4' # internal server addr

Now run it (you can daemonize of course after debugging):

docker run --rm -it --privileged --net=host \
           -v /lib/modules:/lib/modules:ro \
           -e VPN_SERVER_IPV4 \
           -e VPN_PSK \
           -e VPN_USERNAME \
           -e VPN_PASSWORD \
              kencove/l2tp-ipsec-vpn-client

TODO

  • ipsec connection works
  • xl2tpd ppp0 device creates
  • Can forward traffic through tunnel from host
  • Pass in credentials as environment variables
  • Dynamically template out the default config files with sed on start
  • Update to use libreswan instead of strongswan
  • See if this can work without privileged and net=host modes to be more portable

References

About

A tiny Alpine based docker image to quickly setup an L2TP over IPsec VPN client w/ PSK.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 81.2%
  • Dockerfile 18.8%