<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Update DNS on every VPN connection]]></title><description><![CDATA[<p dir="auto">I have an ALLOW rule based on FQDN Aliases for our dyndns addresses<br />
https://192.168.8.1/firewall_aliases_edit.php?id=0</p>
<p dir="auto">Works fine.</p>
<p dir="auto">But sometimes the pfsense DNS is <strong>not up to date</strong> with the remote hostname IP. They have to wait for the DNS to update or someting.</p>
<p dir="auto">So when a user connects to open VPN and his IP is not right, they are not allowed through as per our Alias rules</p>
<p dir="auto">I would like to trigger a DNS update to certain DNS server (the dyndns servers)  for our hostnames <strong>everytime</strong> an openvpn connection is started.</p>
<p dir="auto">Is this possible?</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.netgate.com/topic/180378/update-dns-on-every-vpn-connection</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 04:03:05 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/180378.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 25 May 2023 18:13:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Update DNS on every VPN connection on Tue, 30 May 2023 12:45:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wastapi">@<bdi>Wastapi</bdi></a> said in <a href="/post/1107444">Update DNS on every VPN connection</a>:</p>
<blockquote>
<p dir="auto">@Bob-Dig<br />
Where is it defined to be 5 minutes? URL please</p>
</blockquote>
<p dir="auto">It is called "Aliases Hostnames Resolve Interval", you find it in     System - Advanced - Firewall &amp; NAT.</p>
]]></description><link>https://forum.netgate.com/post/1107773</link><guid isPermaLink="true">https://forum.netgate.com/post/1107773</guid><dc:creator><![CDATA[Bob.Dig]]></dc:creator><pubDate>Tue, 30 May 2023 12:45:01 GMT</pubDate></item><item><title><![CDATA[Reply to Update DNS on every VPN connection on Tue, 30 May 2023 12:01:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gertjan">@<bdi>Gertjan</bdi></a></p>
<p dir="auto">Thank you for your reply, but I may have been misunderstood.</p>
<p dir="auto">The problem is not the Host WAN not being update. The issue is the host not resolving the employees dyndns to the right IP.</p>
<p dir="auto">When you run rc.dyndns.org, you're telling dyndns to update your hostname with your current IP.</p>
<p dir="auto">What I want is for the host to update it's local DNS cache so it has all the employees hostname resolving to the correct IP as per DynDNS DNS.</p>
<p dir="auto">I am really talking about this<br />
https://192.168.8.1/firewall_aliases_edit.php?id=0</p>
]]></description><link>https://forum.netgate.com/post/1107761</link><guid isPermaLink="true">https://forum.netgate.com/post/1107761</guid><dc:creator><![CDATA[Wastapi]]></dc:creator><pubDate>Tue, 30 May 2023 12:01:28 GMT</pubDate></item><item><title><![CDATA[Reply to Update DNS on every VPN connection on Tue, 30 May 2023 11:43:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wastapi">@<bdi>Wastapi</bdi></a> said in <a href="/post/1107441">Update DNS on every VPN connection</a>:</p>
<blockquote>
<p dir="auto">Any clue how to hook to the Open VPN process to trigger a DNS update?</p>
</blockquote>
<p dir="auto">Probably not needed.</p>
<p dir="auto">At the begin, there is the gateway monitor action :<br />
System &gt; Routing &gt; Gateways and edit any gateway to see if "Gateway Action" is checked.<br />
The check is : every xx msec a ping is send to the upstream gateway.<br />
If pings stop to come back, the gateway is reset =&gt; the interface is recent.<br />
When reset, many things happen.<br />
One of the action is : all the "Dynamic DNS"  are run. That is : the stored (previous) IP is compared with Services &gt; Dynamic DNS &gt; Check IP Services <a href="http://http://checkip.dyndns.org/" target="_blank" rel="noopener noreferrer nofollow ugc">http://http://checkip.dyndns.org/</a> and if different, an IP change is presumed and the DNS dynamic update kicks in.</p>
<p dir="auto">During all this, your OpenVPN won't work, because the uplink WAN was changing it's IP, so even if you had an IP - and not a host name, it wouldn't work anyway, as the IP is now not valid any more - points to some one else.<br />
This "if WAN IP changed, then dyndns update it" will be done rather quickly - 10 or less seconds ? Typically less.</p>
<p dir="auto">Something you can't change on your side : DNS master to slave syncing time. If "dyndns.org" takes xxx seconds to do so, then that is the time you have to wait.<br />
If you need faster : that's possible.<br />
Example : get a domain name, your own.<br />
Set up your own 'master' DNS, by using bind (named) - activate the dyndns, that is : RFC 2136.<br />
Now, you control nearly everything.<br />
Because DNS rules tell you that you have to have 2 name servers (not less), this boils down to : what I use : one "big iron", my main dedicated server with all the sites, mails, DNS, etc etc, and one small VPS 'else where' that plays the salve DNS server.</p>
<p dir="auto">My home.my-domaine.tld now points to my WAN IP.<br />
If it changes .... the WAN will go down and up : the new IP will get updated in seconds, the host name "home.my-domaine.tld" will be updated a couple of seconds later.</p>
<p dir="auto">So : no need to do dyndns stuff when a OpenVPN user connects.<br />
dyndns stuff happens when the WAN interface comes up.<br />
The WAN interface will go down-up if a new connection has to be initiated.</p>
<p dir="auto">Something as "the ISP just assigns you a new IPv4 without letting you know it"  scheme does not exist.<br />
It's more a pppoe that times out, the client - pfSense, renews the connection, and this will trigger a dyndns event.<br />
The DHCP pfsense client renews the lease. If it can't, it will discover a new lease, and in any case : dyndns will get triggered.<br />
Etc.</p>
<p dir="auto">Btw : there is a force dyndns run every ... day ? :</p>
<p dir="auto"><img src="/assets/uploads/files/1685445805205-7426fad3-045b-4182-8efe-be4a9d2a096a-image.png" alt="7426fad3-045b-4182-8efe-be4a9d2a096a-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">It will just compare the current WAN IP with what http://checkip.dyndns.org/ tells it.<br />
Something would be really bad if this test actually changed the host name.</p>
]]></description><link>https://forum.netgate.com/post/1107753</link><guid isPermaLink="true">https://forum.netgate.com/post/1107753</guid><dc:creator><![CDATA[Gertjan]]></dc:creator><pubDate>Tue, 30 May 2023 11:43:56 GMT</pubDate></item><item><title><![CDATA[Reply to Update DNS on every VPN connection on Sun, 28 May 2023 16:10:53 GMT]]></title><description><![CDATA[<p dir="auto">@Bob-Dig<br />
Where is it defined to be 5 minutes? URL please</p>
]]></description><link>https://forum.netgate.com/post/1107444</link><guid isPermaLink="true">https://forum.netgate.com/post/1107444</guid><dc:creator><![CDATA[Wastapi]]></dc:creator><pubDate>Sun, 28 May 2023 16:10:53 GMT</pubDate></item><item><title><![CDATA[Reply to Update DNS on every VPN connection on Sun, 28 May 2023 16:03:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wastapi">@<bdi>Wastapi</bdi></a> It is done every 5 minutes, if this ain't enough, lower the value...</p>
]]></description><link>https://forum.netgate.com/post/1107443</link><guid isPermaLink="true">https://forum.netgate.com/post/1107443</guid><dc:creator><![CDATA[Bob.Dig]]></dc:creator><pubDate>Sun, 28 May 2023 16:03:32 GMT</pubDate></item><item><title><![CDATA[Reply to Update DNS on every VPN connection on Sun, 28 May 2023 15:44:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/viragomann">@<bdi>viragomann</bdi></a> Thanks for your reply.</p>
<p dir="auto">The DNS is on dyndns.org. No control over the TTL.<br />
Also, the employee IPs are dynamic... So we never know when they change.<br />
Also the employees could be on the road and have an IP from their cell phone, which change quite often. It is updated in dyndns DNS quite fast by the DNS update on the employee computer.</p>
<p dir="auto">But the pfsense DNS is slow to resolve to those host names.<br />
My ideal would be that the Open VPN process resolve the a few hostnames upon new connection request. this would make it work all the time.</p>
<p dir="auto">Any clue how to hook to the Open VPN process to trigger a DNS update?</p>
<p dir="auto">Thank you</p>
]]></description><link>https://forum.netgate.com/post/1107441</link><guid isPermaLink="true">https://forum.netgate.com/post/1107441</guid><dc:creator><![CDATA[Wastapi]]></dc:creator><pubDate>Sun, 28 May 2023 15:44:53 GMT</pubDate></item><item><title><![CDATA[Reply to Update DNS on every VPN connection on Thu, 25 May 2023 19:04:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wastapi">@<bdi>Wastapi</bdi></a> said in <a href="/post/1106871">Update DNS on every VPN connection</a>:</p>
<blockquote>
<p dir="auto">They have to wait for the DNS to update or someting.</p>
</blockquote>
<p dir="auto">How long?</p>
<p dir="auto">What is the TTL of the host name?<br />
Basically you should set a short TTL like 60 - 120 seconds, so that you only have a short gap.</p>
<p dir="auto">A good advice is also to let the IP renewing be done in the night hours if possible.</p>
]]></description><link>https://forum.netgate.com/post/1106886</link><guid isPermaLink="true">https://forum.netgate.com/post/1106886</guid><dc:creator><![CDATA[viragomann]]></dc:creator><pubDate>Thu, 25 May 2023 19:04:15 GMT</pubDate></item></channel></rss>