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

    How to know gateway status from the command line?

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 3 Posters 857 Views
    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.
    • D
      dims
      last edited by

      I have one of my providers' modem hang from time to time and this is observed as gateway down. I would like to trigger modem reset on such an event.

      Can I determine the status of gateway from the command line in order to write appropriate script?

      1 Reply Last reply Reply Quote 0
      • SammyWooS
        SammyWoo
        last edited by

        To reset the modem via software, the modem needs to be running to begin with, how are u going to do a reset in that situation?  I have a theory repeat hardware freeze are often due to excessive heat.

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

          What would you use to determine this?  If the modem is simply failing to pass traffic, without killing the Ethernet connection, I doubt there'd be any status to check.  What you could do is run a script that will ping your ISPs gateway and then act on failure.  However, you'd still have no way to know if it's the modem or beyond that failed.

          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
          • D
            dims
            last edited by

            Gateway status is displayed on page status_gateways.php

            Offline gateways displayed red, and online gateways displayer green.

            How to know color from the command line?

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