Problem with fixed IP in OpenVPN (DNS)


  • Dears, good morning!

    I'm (re) implementing OpenVPN (UDP protocol, TAP mode) here and I'm having a problem with setting fixed IP for VPN clients. Clients connect only by certificate. No user, no password, nothing. These connect and access everything, as it should be (permissions and rules already configured).

    I tried to put, on the server configuration page (VPN -> OpenVPN -> Servers) in the "Advanced Configuration" -> "Custom options" box:

    ifconfig-pool-persist /var/etc/openvpn/ips_clientes.txt

    The system created the file and actually put the customers there. However, it does not correctly identify connected clients and does not appear to identify the hostname. The file appears as follows:

    *.mydomain.com, 192.168.224.2

    The same appears in "Status" -> "OpenVPN". The Common name is 'replaced' by a wildcard followed by the domain. I believe that this is what prevents me from defining an ip for each client (since he does not identify the hostname).

    I gave permission for VPN clients to use the pfSense DNS, both in the DNS resolver (Services -> DNS -> Resolve -> Access lists) and through the firewall (including, I pass the pfSense DNS in the configuration file. ovpn).

    Someone who can help me?

    Sorry for bad English.