mirror of
https://github.com/pivpn/pivpn.git
synced 2025-04-24 08:10:10 +00:00
- When suggesting to use Pi-hole, use the VPN server IP instead of the LAN IP to allow
DNS resolution even if the user does not route the local network through the tunnel. - Format listCONF in a similar way as listOVPN - Specifically look for a free octet in the last word of clients.txt and not just any word. Necessary otherwhise public keys starting with a number will match against an octet. Example: if line is 'name 5abcdefgh 4', then looking for ' 5' will match but '5$' will not (correctly). - 'pivpn -c' will show the Connected Clients List for WireGuard too
This commit is contained in:
parent
05b189486d
commit
d17d381049
6 changed files with 58 additions and 12 deletions
|
@ -79,9 +79,9 @@ echo "::: Client Keys generated"
|
|||
|
||||
# Find an unused number for the last octet of the client IP
|
||||
for i in {2..254}; do
|
||||
if ! grep -q " $i" configs/clients.txt; then
|
||||
if ! grep -q " $i$" configs/clients.txt; then
|
||||
COUNT="$i"
|
||||
echo "${CLIENT_NAME} $(date +%s) ${COUNT}" >> configs/clients.txt
|
||||
echo "${CLIENT_NAME} $(<keys/${CLIENT_NAME}_pub) $(date +%s) ${COUNT}" >> configs/clients.txt
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue