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

    Power cycling upstream cable modem when the internet goes down

    General pfSense Questions
    7
    21
    1.6k
    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.
    • P
      pftdm007
      last edited by pftdm007

      I wonder if this has been done or even possible with pfsense. I have this Thomson DCM475 Cable modem that's generally pretty reliable, but there are the odd times when my internet connection is just flaky or much slower than normal. Sometimes the connection goes down completely.

      Of course these are caused by the cable modem. A power cycle does the job 100% of the time.

      I was wondering, with the advent of all of these IoT's, if it would be possible to buy a cheap smart power outlet, connect the modem to it, and have some sort of watchdog run on pfsense. If it detects the WAN is down, power cycle the modem.

      Only issue is I would need the smart outlet to be wifi since I no longer can run a cable from pfsense to the modem (condo building, already fished a cable but association wont let me do it again)...

      Have any of you guys done this or doing something similar?

      I know this is not a purely pfsence-centric question so this is why I asked in the "general" section.

      JKnottJ 2 Replies Last reply Reply Quote 0
      • JKnottJ
        JKnott @pftdm007
        last edited by

        @pftdm007 said in Power cycling upstream cable modem when the internet goes down:

        but there are the odd times

        What about even times? 😉

        You can certainly test a connection with a ping to some address, but that will only tell if the connection is up, not whether it's slow. Regardless, you can write a shell script to do something, but that something will likely require something beyond what pfSense is capable of, other that perhaps pinging, WoL or remote shell commands. You'll need more info about those smart outlets to go from here.

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

        1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          Is the modem still accessible? Can you reboot it remotely?

          Something PoE maybe?

          P 1 Reply Last reply Reply Quote 0
          • P
            pftdm007
            last edited by

            God bless those even times ;)

            I asked because I think most of these "smart" outlets have a small web interface and obey to certain protocols. I guess it depends on which brands and models, but I would go for a very simple one that works with either FreeBSD or Linux. They must have an API that allows to send commands remotely.

            These WIFI smart outlets are designed to be controlled by cell phones (Android or iOS) or via things like Alexa (which will never enter my home).

            If I can narrow it down to a few basic models, then I will start research from there.

            1 Reply Last reply Reply Quote 0
            • P
              pftdm007 @stephenw10
              last edited by pftdm007

              @stephenw10

              PoE would be another idea, but I think smart outlet is cheaper...

              When it goes down (perhaps once every 2 months), I simply go to the utility closet, unplug it, wait 10 seconds, then plug it back...

              If it goes down while I'm away or at night, then pfsense would send a command to do the same to the smart outlet, and other than a minute or so disruption, that'd be it.

              pfsense's WAN is connected to the modem and gets an IP thru it from my ISP. I cannot reach the modem web-interface from behind pfsense. If I try I get to the pfsense login page (because access to pfsense is allowed from LAN but not from WAN, i.e. not accessible from the internet).

              The IP WAN gets is my public (ISP) IP's.

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                You can't access the modem even before it's failed? Does it have a management interface of some kind?

                You might be able to do that by just adding a VIP on the WAN in the right subnet and an outbound NAT rule.

                Steve

                P 1 Reply Last reply Reply Quote 0
                • JKnottJ
                  JKnott @pftdm007
                  last edited by

                  @pftdm007 said in Power cycling upstream cable modem when the internet goes down:

                  Only issue is I would need the smart outlet to be wifi since I no longer can run a cable from pfsense to the modem (condo building, already fished a cable but association wont let me do it again)...

                  Where is the modem located? Mine's on a shelf in my computer room. I'm also in a condo and have no problem running interior cables. In fact, when I got my cable modem, my ISP sent out a couple of guys who spent 3 hours fishing the coax and a couple of runs of CAT5 (which I supplied) from one end of my condo to the other. They did a very nice job and even patched the drywall. Before going that route, they even considered drilling up from the garage (I'm on the first floor).

                  PfSense running on Qotom mini PC
                  i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                  UniFi AC-Lite access point

                  I haven't lost my mind. It's around here...somewhere...

                  1 Reply Last reply Reply Quote 0
                  • P
                    pftdm007 @stephenw10
                    last edited by pftdm007

                    @stephenw10

                    No I cannot access the modem because it has no IP of its own, at least that's how I see it. Not sure because I am not a networking guru as you can tell ;)

                    pfsense WAN is configured to use DHCP to get an IP. So my understanding was that pfsense requests an IP from "upstream" (the cable modem), the modem acts as a single "stupid" Ethernet to cable modem, and the DHCP request gets sent to my ISP. Isn't it how it works?

                    Like I said my public IP (confirmed by "what's my IP on google") is the same as the WAN IP found under Status > Interfaces.

                    @stephenw10 said in Power cycling upstream cable modem when the internet goes down:

                    You might be able to do that by just adding a VIP on the WAN in the right subnet and an outbound NAT rule.

                    You have lost me there....

                    @JKnott

                    The modem is located in our utility closet located inside of the condo. Without drilling holes in the walls, and we just repainted the entire place, I don't see how to fish a second cable there. GF wont let me do that... Not now anyways ;)

                    For the rare occurrences where the modem fails, the entire project should be kept as simple as possible. Like I said, it doesn't happen that often. I guess with the pandemic and everybody working from home these days, I have a bit more anomalies with my internet connection (ping time being one of them) but really this is more in the spirit of automation.

                    It happened maybe once or twice that the model crashed and I had lost the internet for several hours/days, and one time I was on a trip for a few weeks and looking at pfsense's logs, I estimate the modem had crashed 4 days before I came back home. Of course during that time, VoIP was unavailable and my VPS were complaining..

                    JKnottJ 1 Reply Last reply Reply Quote 0
                    • M
                      marvosa
                      last edited by

                      I would start addressing the root issue vs treating the symptoms. If your modem is rented, then I would get on the phone with your ISP each and every time you have an issue so it's documented and make them fix it. You don't have to tolerate an unreliable modem. If it's happening on a regular basis, request a new modem and/or a tech to assess the root cause.

                      After making multiple calls in my different houses, I've had bad modems, I've needed a signal booster, I also have a friend with similar symptoms as you... need a new line ran to his house... he was constantly power cycling both his modem and his router... and even bought a new router... until I urged him to call his ISP every time there was an issue. They finally sent out a tech to assess root cause and it turned out the company that installed his sprinkler system cut into the buried coax running to his house, which presented itself as an unreliable internet connection. After the new line was run, the instability issues went away completely.

                      Basically, don't tolerate an unreliable internet connection. If you find yourself having to power cycle your modem more than once every ~8-12 months, there's an issue somewhere that needs to be addressed... and power cycling the modem isn't going to resolve it.

                      JKnottJ 1 Reply Last reply Reply Quote 0
                      • JKnottJ
                        JKnott @pftdm007
                        last edited by

                        @pftdm007 said in Power cycling upstream cable modem when the internet goes down:

                        GF wont let me do that...

                        Ah,,, That's more like it. 😉

                        How long is it between failures? If days, then perhaps a simple timer that kills the power in the middle of the night every day will do.

                        PfSense running on Qotom mini PC
                        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                        UniFi AC-Lite access point

                        I haven't lost my mind. It's around here...somewhere...

                        P 1 Reply Last reply Reply Quote 0
                        • JKnottJ
                          JKnott @marvosa
                          last edited by

                          @marvosa said in Power cycling upstream cable modem when the internet goes down:

                          and it turned out the company that installed his sprinkler system cut into the buried coax running to his house

                          Quite so. I had a similar problem where my Internet connection and home phone, but not TV would fail. It took a lot of work on my part to prove the problem was not in my home (I have two feeds and it failed on both) and I wrote a shell script that pinged my ISPs router and recorded when it failed. The problem turned out to be a defective cable out near the street. The first guy who showed up insisted it was the cable running from my living room to my computer room (as described above) was bad and wanted to run a new cable along the baseboards, around door frames etc.. Since he couldn't explain why it wasn't the cable from the utility room, which was even older and installed by the previous cable company, that failed, I wouldn't let him do that.

                          PfSense running on Qotom mini PC
                          i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                          UniFi AC-Lite access point

                          I haven't lost my mind. It's around here...somewhere...

                          1 Reply Last reply Reply Quote 0
                          • P
                            pftdm007 @JKnott
                            last edited by pftdm007

                            @JKnott said in Power cycling upstream cable modem when the internet goes down:

                            Ah,,, That's more like it.

                            Yep

                            @JKnott said in Power cycling upstream cable modem when the internet goes down:

                            How long is it between failures?

                            Well, like I said its not that often. Last time was maybe 2 weeks ago, ping times were in the 300-400ms which is abnormally high, and some stuff wasnt working right. A modem reboot helped.

                            Before that, I think I had to reboot it back last summer. Never actually wrote down when I hard reset it, but I'm confident to say that it needs to be hard reset every 8-10 months or so. I dont think something is defective with my wiring, the modem or my ISP, I just think it is what it is.... Its a 40$ consumer grade modem.

                            JKnottJ 1 Reply Last reply Reply Quote 0
                            • JKnottJ
                              JKnott @pftdm007
                              last edited by

                              @pftdm007

                              Can you reach your modem when it fails. I know it's in bridge mode, but there may be an address that you can reach to configure the modem or check the status. On my Hitron modem, the address is 192.168.100.1.

                              PfSense running on Qotom mini PC
                              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                              UniFi AC-Lite access point

                              I haven't lost my mind. It's around here...somewhere...

                              1 Reply Last reply Reply Quote 0
                              • stephenw10S
                                stephenw10 Netgate Administrator
                                last edited by stephenw10

                                @pftdm007 said in Power cycling upstream cable modem when the internet goes down:

                                Thomson DCM475

                                Yup that. Your modem also looks to have a mgmt interface at that address if your ISP hasn't disabled it.
                                You might need to add a virtual IP on WAN to access it though. Say an IPAlias as 192.168.100.10/24. Also assuming you are not using that subnet in your internal network anywhere.

                                Try to ping it from Diag > Ping in pfSense.

                                Steve

                                JKnottJ 1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  ...though it seems the interface may well only be available it the cable connection goes down.

                                  Worth trying though. If it is available you can probably see the line stats etc.

                                  Steve

                                  1 Reply Last reply Reply Quote 0
                                  • chpalmerC
                                    chpalmer
                                    last edited by

                                    That is a fairly old cable modem. If you are renting it then ask your ISP for a replacement and just let them know it is buggy. That model actually did have a firmware bug Im not sure ever got fixed.

                                    http://192.168.1.1

                                    The only reason you would not be able to see the gui is if the ISP has it shut off from your view. I do recommend a factory reset on it since it probably has not been done in years. It will pick up its config file when it restarts and come back online. But the reset may help get some of the bugs your experiencing out of it.

                                    https://support.vmedia.ca/kb/a192/how-do-i-reset-the-thompson-technicolor-dcm475-476-.aspx

                                    Triggering snowflakes one by one..
                                    Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

                                    1 Reply Last reply Reply Quote 0
                                    • JKnottJ
                                      JKnott @stephenw10
                                      last edited by

                                      @stephenw10 said in Power cycling upstream cable modem when the internet goes down:

                                      You might need to add a virtual IP on WAN to access it though.

                                      I don't have to with my Hitron.

                                      PfSense running on Qotom mini PC
                                      i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                                      UniFi AC-Lite access point

                                      I haven't lost my mind. It's around here...somewhere...

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        Yeah, it would depend on what the modem sees it's routing table, if it has a default route even.

                                        Those devices are expected to be only modems so more likely to work as such. Routers running in 'modem mode' often end up with no default route so can only respond to traffic from their own subnet.

                                        Steve

                                        JKnottJ 1 Reply Last reply Reply Quote 0
                                        • JKnottJ
                                          JKnott @stephenw10
                                          last edited by

                                          @stephenw10

                                          I would expect a modem in bridge mode wouldn't have much of a routing table. I suspect it uses deep packet inspection, to see which packets have that address for a destination.

                                          PfSense running on Qotom mini PC
                                          i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                                          UniFi AC-Lite access point

                                          I haven't lost my mind. It's around here...somewhere...

                                          1 Reply Last reply Reply Quote 0
                                          • Y
                                            YannTKO
                                            last edited by

                                            You can setup a raspberry and use GPIO to pilot a relay.

                                            Netgate SG-3100 23.09.1
                                            Unifi UAP: 1x FlexHD + 2x nanoHD + 1x AC-IW | Unifi USW: 1x16-PoE Gen2 + 4x US-8-60W | Cloudkey Gen2 Plus
                                            1 x NUC8i7BEH 32Go - ESXI 8 (Pfsense + many VM)

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