-
-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't assign static IP for a client. #189
Comments
Adding startup logs: openvpn-dockovpn-1 | + [[ ! -d /opt/Dockovpn_data/pki ]] |
Hi! We will address this issue in one of our future releases, to pin static ip to clients |
I'm already using static ips for clients with this container, you can follow this guide basically:
the only issue I have is that the logs do not print the correct ip that was assigned to the client
I also modified the scripts to mass generate the client files and create the needed static ip files in the correct folder |
Further more with the discussion, if you encounter client error of "net30", that means the server is currently using topology of net30. By using the method mentioned by @LivingWithHippos , you should also make sure you enforce the topology of using "subnet". Thus to summarize it up, you should add two lines in your server.conf:
otherwise, you should set the ifconfig-push in the net30 style:
|
I'm running DockoVPN in persistent configuration via docker-compose. I needed to create a client with static IP, so i created client via genclient.sh inside the container. After that i created a volume for ipp.txt file and filled it with client id and desired IP address. But server seems to ignore the ipp.txt and still dynamically allocates IP address for this client.
My docker-compose file:
version: '3'
services:
dockovpn:
image: alekslitvinenk/openvpn:latest
restart: always
entrypoint: /bin/bash
command:
- -c
- |
set -ex
if [[ ! -d /opt/Dockovpn_data/pki ]]; then
echo "Generate dh params"
cd /opt/Dockovpn_data
easyrsa init-pki
easyrsa gen-dh
cp pki/dh.pem /etc/openvpn
fi
cd /opt/Dockovpn
/usr/bin/dumb-init ./start.sh
cap_add:
- NET_ADMIN
environment:
- HOST_ADDR=serv_ip
ports:
- 1194:1194/udp
volumes:
- ./openvpn_conf:/opt/Dockovpn_data
- ./openvpn_ipp/ipp.txt:/opt/Dockovpn/ipp.txt
My ipp.txt file:
Client_id,ip_addr
After running the container content of ipp.txt changing to this:
Client_id,ip_addr, - container adds an extra comma at the end of line
Can anyone help me?
The text was updated successfully, but these errors were encountered: