l2tpvpn-docker-pi
l2tpvpn-docker-pi copied to clipboard
Add multiple accounts
Hi there how can i four different accounts?
Thanks
Here is how I did it:
(do not include < or > in the parts that you need to change; that indicates a placeholder for where you need to add your information)
- Get the docker container ID by running:
docker ps
- Start a shell connection with the docker container by running:
docker exec -it <insert container id here> /bin/bash
- Open the /etc/ppp/chap-secrets file for editing:
vim /etc/ppp/chap-secrets
- Add the user with the following format:
<insert username here> * <insert password here> *
- Save the file and exit vim
- Restart the VPN server by running:
service ipsec restart
- Disconnect from the docker image:
exit
This assumes that all users are using the same shared secret that you used when setting up the VPN which is probably not the best idea but I haven't had the time to figure out how to do that.
Ideally somebody could add a bash script that handles all this and add it to the repository. I "may" do this if I have the time.