Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Schedule Forced dynDNS Update?

    DHCP and DNS
    4
    6
    3.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User
      last edited by

      Hi all,

      I switched to VDSL 100Mbit which means I have to install a dedicated router in front of my pfSense box while the WAN interface of pfSense gets its IP now from the DHCP server of the front router.

      Obviously this WAN IP does not change at all. But the external public IP of the router changes every 24hrs. After a change my pfSense does not recon the IP change and thus is not updating my dynDNS entry. So my OpenVPN connections are getting lost  :-\

      I use afraid.org for dynDNS purposes which runs fine with pfSense. Unfortunately the new router does not support afraid.org.

      Is there an other way to force pfSense to update the IP regularly?

      Or do I have to switch my dynDNS provider- in this case which one is available free of charge?

      Thanks!

      Greetings

      Christian

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User
        last edited by

        Hi all!

        I kind of solved this issue by adding an crontab entry to one of my 24/7 Linux servers on my LAN.

        
        3,8,13,18,23,28,33,38,43,48,53,58 * * * * sleep 34 ; wget --no-check-certificate -O - https://freedns.afraid.org/dynamic/update.php?xxxxxxxxxxxxxxxxxxxxxx= >> /tmp/freedns_host_mooo_com.log 2>&1 &
        
        1 Reply Last reply Reply Quote 0
        • D
          doktornotor Banned
          last edited by

          Have a strange feeling you'll get yourself banned very soon for abusing their service. Why are you running this every 5 minutes when the IP changes once a day?  ::)

          1 Reply Last reply Reply Quote 0
          • A
            ashima LAYER 8
            last edited by

            Hi Knebb,

            For Dynamic DNS,

            In Services –> Dynamic DNS

            Service type : custom
            Interface to Monitor : WAN
            Interface to send update from: WAN
            Update URL :  https://freedns.afraid.org/dynamic/update.php?xxxxxxxxxxxxxxxxxxxxxx=

            Probably you have to pass username,password and ip=%IP% along the update URL (Check afraid.org for that)
            Save and force update.

            I think this would automatically update. I am not sure about the frequency. You can write the cron job to update every 12h.

            Good Luck and have a nice day,
            Ashima

            1 Reply Last reply Reply Quote 0
            • ?
              A Former User
              last edited by

              @doktornotor:

              Have a strange feeling you'll get yourself banned very soon for abusing their service. Why are you running this every 5 minutes when the IP changes once a day?  ::)

              Well, as I do not know the next reset of my connection because this !"§$"$%& Telekom router does not offer scheduled reset I can only guess when the connection is reset. For this I have to update the freeDNS providres automatically.

              But you are right, I now wrapped up a Bash script which tests my external IP before updating the entry.
              See here:

              
              #!/bin/bash
              ip=`dig +short myip.opendns.com @resolver1.opendns.com`
              ip_old=`dig host.mooo.com| grep -A1 ANSWER| grep IN|cut -f 5`
              
              if [ "$ip" == "$ip_old" ] ; then
                                      exit
              fi
              
              wget --no-check-certificate -O - https://freedns.afraid.org/dynamic/update.php?xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >> /tmp/freedns_host_mooo_com.log 2>&1 &
              
              

              This script is now scheduled to run every 5 minutes. There should not be any abuse now…

              @ashima: well, re-read my described issue above. Your post does not help at all. I can not monitor my WAN as it is a private IP address. Sorry.

              GReetings

              Christian

              1 Reply Last reply Reply Quote 0
              • K
                kejianshi
                last edited by

                At freedns.afraid.org under dynamic dns there is a link you can click to get a cron entry.

                I copied that and replace "wget -O -" with just "fetch" and pasted it into the command box for pfsense cron entries

                No dashes and no -O

                Waited 5 minutes and it updated.

                p.s.  The reason he set it for every 5 minutes is because thats what freedns.afraid.org recommends

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.