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

    Best way to keep my SG-1100 up to date?

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    14 Posts 6 Posters 1.7k 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.
    • Y
      yannb
      last edited by

      I've looked around I swear!

      Is there a thread I should subscribe to in order to get notified of new releases? Some RSS feed? A newsletter?

      Now that I got everything working, I'm not going to be logging in all that often, but I want to make sure I don't miss security updates etc.

      What the best way to stay updated? Thanks!!!

      GertjanG provelsP 2 Replies Last reply Reply Quote 0
      • A
        akuma1x
        last edited by

        I’m pretty sure the Netgate newsletter announces when there are OS updates. Otherwise, you can come check the forum a couple times a month. To be honest, there aren’t that many system updates per year.

        1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan @yannb
          last edited by Gertjan

          @yannb said in Best way to keep my SG-1100 up to date?:

          Some RSS feed?

          Login to your pfSense dashboard. Activate the RSS widget.

          983848e0-e268-438a-95df-31f9801e20a2-image.png

          Or visit the Netgate blog ones in a while.

          d85b2d30-56f8-4ff1-baf8-d2f1bbf881b3-image.png

          Or visit this forum ones in a while. The number of "announcements" is just daunting.
          The forum is a great place to learn what to d with your SG, and what not to do with it.

          Or install the cron package and add this :

          d8cf7d61-fac1-469c-9abe-961da9dab31d-image.png

          The script is :

          <?php
          
            require_once("pkg-utils.inc");
            require_once("notices.inc");
            require_once("util.inc");
          
            $msg = null;
            $pmsg = null;
            $p = 0;
          
            log_error("Starting update check");
          
            // pfSense base system check
            $system_version = get_system_pkg_version(false, false);
            if ($system_version === false) {
              printf("%s\n", 'Unable to check for updates');
              log_error("Unable to check for updates, exiting");
              exit;
            }
          
            if (!is_array($system_version) ||
              !isset($system_version['version']) ||
              !isset($system_version['installed_version'])) {
              printf("%s\n", 'Error in version information');
              log_error("Error in version information, exiting");
              exit;
            }
          
            switch ($system_version['pkg_version_compare']) {
              case '<':
                //printf("%s%s%s\n", "pfSense version ", $system_version['version'], " is available");
                $msg = "An update to pfSense version " . $system_version['version'] . " is available\n\n";
                break;
              case '=':
                //printf("%s%s%s\n", "pfSense version ", $system_version['version'], " (installed) is current");
                break;
              case '>':
                printf("%s%s%s\n", "pfSense version ", $system_version['installed_version'], " is NEWER than the latest available version ", $system_version['version']);
                $msg = "pfSense version " . $system_version['version'] . " is available (downgrade)\n\n";
                break;
              default:
                printf("%s\n", 'Error comparing installed with latest version available');
                log_error("Error comparing installed with latest version available");
                break;
            }
          
            // package check
            $package_list = get_pkg_info('all', true, true);
            $installed_packages = array_filter($package_list, function($v) {
              return (isset($v['installed']) && isset($v['name']));
            });
          
            if (empty($installed_packages)) {
              printf("%s\n", 'No packages installed');
              log_error("No packages installed, exiting");
              exit;
            }
          
            foreach ($installed_packages as $pkg) {
              if (isset($pkg['installed_version']) && isset($pkg['version'])) {
                //printf("%s%s%s\n", $pkg['shortname'], ': ', $pkg['installed_version']);
                $version_compare = pkg_version_compare($pkg['installed_version'], $pkg['version']);
                if ($version_compare != '=') {
                  $p++;
                  $pmsg .= "\n".$pkg['shortname'].': '.$pkg['installed_version'].' ==> '.$pkg['version'];
                  if ($version_compare == '>') {
                    $pmsg .= ' (downgrade)';
                  }
                  printf("%s%s%s%s%s\n", $pkg['shortname'], ': ', $pkg['installed_version'], ' ==> ', $pkg['version']);
                }
              }
            }
          
            if ($p > 0) {
              $msg = $msg . "The following updates are available and can be installed using System > Package Manager:\n" . $pmsg;
            }
          
            // check for updates to builtin packages
            exec("/usr/sbin/pkg upgrade -n | /usr/bin/sed -ne '/UPGRADED/,/^$/p'", $output, $retval);
            if (($retval == 0) && (count($output))) {
              $msg .= "\n\n" . "Some packages are part of the base system and will not show up in Package Manager. If any such updates are listed below, run `pkg upgrade` from the shell to install them:\n\n";
              array_shift($output);
              $msg .= implode("\n", array_map('ltrim', $output));
            }
          
            if (!empty($msg)) {
              log_error("Updates were found - sending email");
              echo $msg;
              notify_via_smtp($msg);
            }
          
            log_error("Update check complete");
          
          ?>
          

          The script will also warn you when pfSense packages and other used FreeBSD packages are available.

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          Y S 2 Replies Last reply Reply Quote 2
          • S
            SteveITS Rebel Alliance
            last edited by

            I don't have one to look at, but don't the LEDs indicate an update is available like on the 3100? I want to say slow blue blink is normal and an orange blink means an update is available.

            Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
            When upgrading, allow 10-15 minutes to reboot, or more depending on packages, and device or disk speed.
            Upvote 👍 helpful posts!

            1 Reply Last reply Reply Quote 1
            • Y
              yannb @Gertjan
              last edited by

              @Gertjan Perfect! Thank you! :)

              1 Reply Last reply Reply Quote 0
              • A
                akuma1x
                last edited by

                @teamits You're right, details are here:

                https://docs.netgate.com/pfsense/en/latest/solutions/sg-1100/io-ports.html#top-side

                Jeff

                Y 1 Reply Last reply Reply Quote 1
                • Y
                  yannb @akuma1x
                  last edited by

                  @akuma1x oh… Cool! I read that at the very beginning but totally forgot about it. My router is hidden in a closet, so RSS is probably still the best for me, but that's definitely good to know!!

                  Thanks!

                  1 Reply Last reply Reply Quote 0
                  • johnpozJ
                    johnpoz LAYER 8 Global Moderator
                    last edited by johnpoz

                    @Gertjan that cron would be a nice package so people could install if they want.. Or really would be nice addition to just built in features..

                    I'm on my pfsense pretty much every day ;) Screenshots for helping users, etc. So not something I need to setup ;) But yeah I could see that being very handy for many users... Maybe then we wouldn't get so many users coming here with running some version that has been EOL for like 2 years ;)

                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                    If you get confused: Listen to the Music Play
                    Please don't Chat/PM me for help, unless mod related
                    SG-4860 24.11 | Lab VMs 2.8, 24.11

                    1 Reply Last reply Reply Quote 0
                    • S
                      SteveITS Rebel Alliance @Gertjan
                      last edited by

                      @Gertjan If it's going to email about package updates you might add text to remind people to update pfSense before updating any packages. (I know you know this but those new to pfSense might not). Otherwise the implication is "these packages are updateable, go update them."

                      Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                      When upgrading, allow 10-15 minutes to reboot, or more depending on packages, and device or disk speed.
                      Upvote 👍 helpful posts!

                      1 Reply Last reply Reply Quote 0
                      • GertjanG
                        Gertjan
                        last edited by

                        The script shown above, I found it some time ago on this forum. I just pasted it here back in again.
                        And yes, if the mail sub system has been set up, you'll receive a mail with the results.

                        @teamits : true.
                        The script, as it auto explains, also lists FreeBSD 11. (current) packages which can be installed right away (manually !)
                        pfSense packages should be upgraded using the "pfSense manual" specifications.
                        What should be mentioned is that, if one chooses to not upgrade pfSense, one should say good bye to the usage of packages all together - and support, for that matter.
                        These people would be experts, anyway, to make such a decision. So, they are 'aware'.

                        Btw : the cron entry isn't really needed. The php script can be run by hand whenever you want.

                        @johnpoz : A package ? It's just one file ;)

                        No "help me" PM's please. Use the forum, the community will thank you.
                        Edit : and where are the logs ??

                        1 Reply Last reply Reply Quote 0
                        • johnpozJ
                          johnpoz LAYER 8 Global Moderator
                          last edited by

                          @Gertjan said in Best way to keep my SG-1100 up to date?:

                          t's just one file ;)

                          But you would also have to setup the cron job, etc. Just saying it would make it easier for the users if they just clicked install ;)

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.8, 24.11

                          1 Reply Last reply Reply Quote 0
                          • GertjanG
                            Gertjan
                            last edited by

                            I received this mail this morning :

                            Notifications in this message: 1
                            ================================
                            
                            23:01:07 The following updates are available and can be installed using System >
                            Package Manager:
                            
                            acme: 0.6.8_1 ==> 0.6.8_2
                            pfBlockerNG-devel: 2.2.5_33 ==> 2.2.5_34
                            
                            Some packages are part of the base system and will not show up in Package Manager.
                            If any such updates are listed below, run `pkg upgrade` from the shell to install
                            them:
                            
                            pfSense-pkg-acme: 0.6.8_1 -> 0.6.8_2 [pfSense]
                            pfSense-pkg-pfBlockerNG-devel: 2.2.5_33 -> 2.2.5_34 [pfSense]
                            

                            Not entirely correct because the "base package" pfSense-pkg-acme: 0.6.8_2 is part of the pfSense package "acme 0.6.8_2". When pfSense package "acme 0.6.8_2", the underlying "pfSense-pkg-acme: 0.6.8_2" will get installed.
                            Idem for pfSense-pkg-pfBlockerNG-devel: 2.2.5_34

                            No "help me" PM's please. Use the forum, the community will thank you.
                            Edit : and where are the logs ??

                            1 Reply Last reply Reply Quote 0
                            • provelsP
                              provels @yannb
                              last edited by

                              @yannb
                              This works.
                              https://forum.netgate.com/topic/137707/auto-update-check-checks-for-updates-to-base-system-packages-and-sends-email-alerts

                              Peder

                              MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                              BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                              1 Reply Last reply Reply Quote 0
                              • GertjanG
                                Gertjan
                                last edited by

                                That's where I copied pasted it from ;)

                                No "help me" PM's please. Use the forum, the community will thank you.
                                Edit : and where are the logs ??

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