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

    Auto-Reconnect to Cable modem after connection drop

    General pfSense Questions
    4
    8
    4.8k
    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.
    • yuljkY
      yuljk
      last edited by

      Hi guys, I've had a search on this problem but didn't manage to get much information.

      I'm looking for a way for Pfsense to automatically renew it's lease on the WAN interface from my cable modem automatically in the event that my internet connection drops and then comes back up.

      At the moment, I have to login to the web interface and click 'renew' for my WAN interface to renew the lease in the event that this happens.  This isn't particularly convenient if I'm 60 miles away from home.

      I've read a thread about a guy who came up with a bash script which automtically restarts his Comcast modem.. perhaps something along those lines may help.

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • M
        mhab12
        last edited by

        What version of pfSense are you running?  I have seen this issue on one of the 1.2.3 release candidates, but there was a known issue with the DHCP client that has since been corrected.  What if you just forced the DHCP client to auto-renew every 15 minutes or something?

        1 Reply Last reply Reply Quote 0
        • yuljkY
          yuljk
          last edited by

          Hi, I'm running 1.2.3-RELEASE.  How would I go about auto-renewing the DHCP lease on the WAN interface?

          Cheers for the help

          1 Reply Last reply Reply Quote 0
          • T
            The Printer Elf
            last edited by

            Same problem here, but running 1.2.2.
            Would it be possible to implement a script that auto-renews if the connection drops below a certain level of activity (say 2kb/s) for longer than 15 mins?
            I'm suggesting this as a monitor because it's very easy to spot on the RRD charts if the connection is down because the scale is +/- 150b/s, and if there's no-one using the connection (heaven forbid!) then it doesn't matter that an auto-renew is happening every 15 mins!

            1 Reply Last reply Reply Quote 0
            • J
              j0ris
              last edited by

              If all you want is to auto-renew your DHCP every 15 minutes, then I'd just create a cron job:

              crontab -e
              

              and enter something like

              0,15,30,45 * * * /sbin/dhclient rl0
              
              

              where rl0 is your WAN interface

              1 Reply Last reply Reply Quote 0
              • yuljkY
                yuljk
                last edited by

                Cheers for the reply.

                I have downloaded my config.xml and added the following to the section

                <minute>/5</minute>
                <hour>
                </hour>
                <mday></mday>
                <month>
                </month>
                <wday>*</wday>
                <who>root</who>
                <command></command>0,15,30,45 * * * /sbin/dhclient vr1

                (vr1 being my WAN interface)
                I then uploaded the modified config and rebooted pfsense.

                Does this look ok?

                Thanks

                1 Reply Last reply Reply Quote 0
                • J
                  j0ris
                  last edited by

                  Then it should be:

                  		 <minute>0,15,30,45</minute>
                  			<hour>*</hour>
                  			<mday>*</mday>
                  			<month>*</month>
                  			<wday>*</wday>
                  			<who>root</who>
                  			<command></command>/sbin/dhclient vr1 
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • yuljkY
                    yuljk
                    last edited by

                    Thanks for the reply, I have ammended config.xml.

                    Cheers

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