OPNsense Forum

Archive => 17.7 Legacy Series => Topic started by: think124 on December 16, 2017, 06:28:43 pm

Title: [SOLVED] Using Dynamic DNS for OpenVPN server
Post by: think124 on December 16, 2017, 06:28:43 pm
Hi there,
i have setup a working OpenVPN server by following the documentation online.  I was wondering if it is possible for the server to be setup so the client connects to a dynamic DNS hostname since the router WAN address could change.  I have dynamic DNS working on OPNsense but I didn't see any options to tie that to the OpenVPN configuration.

Thanks
Title: Re: Using Dynamic DNS for OpenVPN server
Post by: think124 on December 16, 2017, 06:58:21 pm
I edited the .ovpn config file that is generated by OPNsense to reference the dynamic DNS address instead of the hard coded IP address.  This seems to work, but not sure if there is a more elegant way to do this?
Title: Re: Using Dynamic DNS for OpenVPN server
Post by: miroco on December 17, 2017, 01:31:13 pm
Hi think24,


If I got you right, you can do that under VPN -> OpenVPN -> Client Export -> Host Name Resolution - > Dynamic DNS: YourDynamicDns.com

Then you export your client (.ovpn) file.


miroco
Title: Re: Using Dynamic DNS for OpenVPN server
Post by: Gargamel on December 17, 2017, 04:05:32 pm
Thats how i do it.
Setup a DynDNS in services, and then pointed my openvpn client config to that dyndns.
Title: Re: Using Dynamic DNS for OpenVPN server
Post by: think124 on December 18, 2017, 04:03:01 am
Thanks, I'll try that!