<?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[My little contribution to pfsense users dyndns update for static ip]]></title><description><![CDATA[<p dir="auto">well here's my little hack to make pfsense update my dyndns account using pfsense dyndns client while using static ip at my wan interface. i think most people would use this cause dual wan configuration needs to use static ips for wans.<br />
this is an ugly hack for now will try to clean it later.</p>
<p dir="auto">make this getip.sh</p>
<pre><code>
#!/bin/sh
# get ip from using dyndns.org website
# by ivanjong 
#

fetch  -q -T 15 -o /tmp/tempIP http://checkip.dyndns.org:8245 
grep IP /tmp/tempIP | cut -f6 -d " " | cut -f1 -d "&lt;" &gt; /tmp/tempwan 
oldip=`cat /var/db/wan_ip`
length=`wc -m /var/db/wan_ip | cut -f7 -d " "`
if [ `grep -c "$oldip" /tmp/tempwan` != 0 ] &amp;&amp; [ $(("$length"-`wc -m /tmp/tempwan | cut -f7 -d " "`)) = 0 ]
then
       #echo "same"
       # not updating
else 
       #echo "not same"
       cp /tmp/tempwan /var/db/wan_ip
       rm /tmp/tempwan
       /etc/./rc.newwanip
fi

</code></pre>
<p dir="auto">and add a cronjob for this file to run every much as u wan</p>
<p dir="auto">then find /etc/inc/interface.inc</p>
<p dir="auto">edit line no. 1474 to</p>
<pre><code>
/* static WAN IP address */
if(file_exists("/var/db/wan_ip")){
         $curwanip = file_get_contents("/var/db/wan_ip");
         }else{
                $curwanip = $wancfg['ipaddr'];        
                }  
         return $curwanip; 
}

</code></pre>
<p dir="auto">wat this does is it fetch http://checkip.dyndns.org:8245  from this website<br />
then format it so it displays the real ip of your wan and the changes in interfaces.inc is to point the wan ip for static ip to real ip of the interface to the real wan ip.</p>
<p dir="auto">note: it's only a hack for now so no waranties that it will work for u. i am only trying to help those using static ip to make full use of their pfsense box. if any prob pls do reply here. any questions do reply here too. hope i did help someone with this.</p>
<p dir="auto">oh ya i just did this a while ago so i havent much time to time the problem that might arise from this hack. i'm still testing now and will fix if anything if broken later.</p>
]]></description><link>https://forum.netgate.com/topic/3026/my-little-contribution-to-pfsense-users-dyndns-update-for-static-ip</link><generator>RSS for Node</generator><lastBuildDate>Sat, 17 Oct 2026 05:47:05 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/3026.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 05 Jan 2007 20:56:43 GMT</pubDate><ttl>60</ttl></channel></rss>