Hi , i don't have a configuration example but it would be basic shell scripting.
Some high level info... you need to
1. Configure your vpn server with something like
script-security 2
learn-address /path/to/executable-script
Note: not sure here if you should use learn-address config option, there are other options too ... you'll have to ask about that from somebody else.
2. Configure your bind/named server to allow ddns for the zone you want , here's an excellent guide for ubuntu/debian
https://dnns.no/dynamic-dns-with-bind-and-nsupdate.html
When a client connects to your vpn server , three positional parameters are sent to your script
add client-vpn-ip client-username/client-cert-common-name
this can be parsed with any scripting/programming language , bash probably being the simpler one , and use nsupdate to update your dns zone
Some basic starting point
#!/bin/bash
DNS_SERVER="localhost"
DDNS_KEY="/path/to/ddns.key"
DNS_ZONE="domain.tld"
DNS_IP="$2"
DNS_NAME="$3"
DNS_TTL="300"
nsupdate -k "${DDNS_KEY}" -v <(cat <<EOF
server ${DNS_SERVER}
zone ${DNS_ZONE}
update add ${DNS_NAME}.${DNS_ZONE} ${DNS_TTL} A ${DNS_IP}
show
send
EOF
)