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

    Mail_package_platform_status.php - Notificador actualizaciones pfSense via mail

    Scheduled Pinned Locked Moved Español
    12 Posts 3 Posters 2.2k 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.
    • J
      javcasta
      last edited by

      Hola.

      Un output a la ejecución del script:

      [2.3.2-RELEASE][root@pfSense1.localdomain]/usr/games: /usr/local/bin/php mail_package_platform_status.php
      Notificador status package & platform via e-mail - Notifier package & platform updates via email
      pfSense1.localdomain

      The system is on the latest version. Version: 2.3.2_1

      No Upgrade platform available, no mail - No hay upgrade de plataforma disponible. No se envia mail.

      pfSense-pkg-Cron Up-to-date || pfSense-pkg-Lightsquid Up-to-date || pfSense-pkg-mailreport Up-to-date || pfSense-pkg-nmap Up-to-date || pfSense-pkg-nrpe Up-to-date || pfSense-pkg-openvpn-client-export Upgrade available to  1.3.15 - pfSense-pkg-openvpn-client-export1.3.13 to 1.3.15 || pfSense-pkg-pfBlockerNG Up-to-date || pfSense-pkg-Service_Watchdog Up-to-date || pfSense-pkg-snort Up-to-date || pfSense-pkg-squid Up-to-date || pfSense-pkg-squidGuard Up-to-date

      Updates packages availables. Sending mail - Hay updates de paquetes. Enviando mail

      Salu2

      Javier Castañón
      Técnico de comunicaciones, soporte y sistemas.

      Mi web: https://javcasta.com/

      Soporte scripting/pfSense https://javcasta.com/soporte/

      1 Reply Last reply Reply Quote 0
      • I
        iplost
        last edited by

        Happy winter solstice  ;D

        Thanks

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

          Hola.

          @iplost:

          Happy winter solstice  ;D

          Thanks

          Igualmente :)

          Salu2

          Javier Castañón
          Técnico de comunicaciones, soporte y sistemas.

          Mi web: https://javcasta.com/

          Soporte scripting/pfSense https://javcasta.com/soporte/

          1 Reply Last reply Reply Quote 0
          • I
            iplost
            last edited by

            Oye, una pregunta, se sigue usando el paquete dansguardian?  O ya es de versiones dinosaurias?

            1 Reply Last reply Reply Quote 0
            • R
              rickygm
              last edited by

              @iplost:

              Oye, una pregunta, se sigue usando el paquete dansguardian?  O ya es de versiones dinosaurias?

              si no me equivoco dansguardian ya no esta siendo mantenido por sus desarrolladores , por eso creo que pfSense no lo incluye.

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

                Hola.

                @rickygm:

                @iplost:

                Oye, una pregunta, se sigue usando el paquete dansguardian?  O ya es de versiones dinosaurias?

                si no me equivoco dansguardian ya no esta siendo mantenido por sus desarrolladores , por eso creo que pfSense no lo incluye.

                Efectivamente. Ese paquete ya no tiene soporte o es soportado (maintaned). Se le cita en el doc de pfSense en la lista de paquete removidos.

                https://doc.pfsense.org/index.php/2.3_Removed_Packages

                DansGuardian - the upstream DansGuardian package is no longer maintained.

                Salu2

                Javier Castañón
                Técnico de comunicaciones, soporte y sistemas.

                Mi web: https://javcasta.com/

                Soporte scripting/pfSense https://javcasta.com/soporte/

                1 Reply Last reply Reply Quote 0
                • R
                  rickygm
                  last edited by

                  @javcasta:

                  Hola.

                  Libero (release) un script php para notificar actualizaciones de pfSense vía e-mail.

                  Para el que le interese, lo tengo en:

                  https://www.javcasta.com/bounties/#notifier_package_plarform

                  Feliz Solsticio de Invierno ;)

                  El código.

                  
                  /*
                  #####################################################
                  #   "/usr/games/mail_package_platform_status.php"   #
                  # ------------------------------------------  #######
                  #Notificador de updates de packages & platform#
                  #               vía email                     #
                  #Notifier package & platform updates via email#
                  # --------------------------------------------#
                  # Código adaptado y modificado de:            #
                  #  Modified and adapted code from:            # 
                  # "/usr/local/www/pkg_mgr_installed.php"      #
                  # By JavCasta - PIyMenta - Javier Castañon    #
                  #     2016 --- https://javcasta.com/          #
                  #################################################
                  # Tested in - Testeado en - pfSense 2.3.2 amd64 #     
                  #################################################
                  # Happy winter solstice #
                  #########################
                  Condiciones necesarias - Neccesary conditions:
                  -----------------------
                  - Tener configurado y operativo - Having configured and operational:
                    System > Advanced > Notifications > E-Mail
                  - Crear un cron (aconsejable en el paquete cron) que ejecute cada día o cada 12 o 24 hrs:
                    Create a (recommended in the package cron) cron running every day or every 12 or 24 hrs:
                  
                    /usr/local/bin/php /usr/games/mail_package_platform_status.php 2>&1
                    
                  - Alojar fichero mail_package__platform_status.php en:
                    Host file mail_package_platform_status.php in:
                    /usr/games/
                  */
                  
                  //<title>PiyMenta - @javcasta - 2016</title>
                  // If arrives here, is a valid user.
                  require_once("pkg-utils.inc");
                  echo "Notificador status package & platform via e-mail - Notifier package & platform updates via email \n";
                  
                  //el nombre del pfSense
                  $mipfsense = gethostname();
                  echo "$mipfsense \n";
                  
                  if (is_subsystem_dirty('packagelock')) {
                  	echo "Hay paquetes instalandose o actualizandose - Settling packages or packages are being updated \n";
                  	exit;
                  }
                  
                  $laplataforma = "";
                  $system_version = get_system_pkg_version();
                  if ($system_version === false) {
                      $laplataforma = "Unable to check for updates";
                  		//exit;
                  	}
                  if (!is_array($system_version) ||
                  	    !isset($system_version['version']) ||
                  	    !isset($system_version['installed_version'])) {
                      $laplataforma = "Error in version information";
                  	}
                  $version_compare = pkg_version_compare(
                  	    $system_version['installed_version'], $system_version['version']);
                           
                  	switch ($version_compare) {
                  	case '<':
                      $laplataforma = "The system not is on the latest version";
                  		break;
                  	case '=':
                  		//print(gettext("The system is on the latest version."));
                     $laplataforma = "The system is on the latest version.";
                  		break;
                  	case '>':
                  		//print(gettext("The system is on a later version than
                  the official release."));
                     $laplataforma = "The system is on a later version than the official release.";
                  		break;
                  	default:
                  		//print(gettext( "_Error comparing installed version
                  with latest available_"));
                     $laplataforma = "Error comparing installed version with latest available.";
                  		break;
                  	}
                    $resultadoplataforma = $laplataforma." Version: ".$system_version['version'];
                    echo "\n".$resultadoplataforma."\n";
                  if (strpos($laplataforma, "The system not is on the latest version") !== false) {
                      //echo 'true';
                      $comando = "echo " . '"' . $resultadoplataforma . '"' . ' | ' . "/usr/local/bin/mail.php -s=". '"' . "$mipfsense : Upgrade platform available - Upgrade plataforma disponible" . '"';
                      shell_exec("$comando");
                      shell_exec("logger -f /var/log/system.log 'Notificado update plataforma'");
                      echo "\n Upgrade platform available. Sending mail - Hay upgrade de plataforma disponible. Enviando mail \n";
                  } else { 
                            echo "\n No Upgrade platform available, no mail - No hay upgrade de plataforma disponible. No se envia mail. \n";
                            shell_exec("logger -f /var/log/system.log 'NO hay update plataforma'");
                          }
                           
                  $estado1 = "\n";
                  //obtenemos estado de paquetes
                  $estado = get_pkg_status();
                  $estado1 .= "\n". $estado . "\n";
                  $estado1 = str_replace("
                  ", ' || ', $estado1);
                  echo "$estado1";
                  //si existe Upgrade available enviamos email
                  if (strpos($estado, "Upgrade available") !== false) {
                      //echo 'true';
                      $estado = str_replace("
                  ", ' || ', $estado);
                      $comando = "echo " . '"' . $estado . '"' . ' | ' . "/usr/local/bin/mail.php -s=". '"' . "$mipfsense : Updates availables - Updates disponibles" . '"';
                      shell_exec("$comando");
                      shell_exec("logger -f /var/log/system.log 'Notificado update paquete'");
                      echo "\n Updates packages availables. Sending mail - Hay updates de paquetes. Enviando mail \n";
                  } else { echo "\n No Updates packages, no mail - No hay updates de paquetes. No se envia mail. \n";
                          shell_exec("logger -f /var/log/system.log 'No hay update paquete'");
                          }
                  /*
                  Para msgs con Content-type: text/html usar otro script que mail.php
                  mail.php es para mail básico a ejecutar via shell 
                  */
                  echo "\n https://www.paypal.me/javcasta/5 - Feel free to Paypal me \n";
                  //################
                  
                  function get_pkg_status() {
                  	$installed_packages = array();
                  	$package_list = get_pkg_info();
                  
                  	if (!$package_list) {
                  		//print("error");
                      return "error";
                  		exit;
                  	}
                  
                  	foreach ($package_list as $pkg) {
                  		if (!isset($pkg['installed']) && !isset($pkg['broken'])) {
                  			continue;
                  		}
                  		$installed_packages[] = $pkg;
                  	}
                  
                  	$pkgtbl = "";
                  
                  	if (empty($installed_packages)) {
                  		//print ("nopkg");
                      return "nopkg";
                  		exit;
                  	}
                    
                    $pkgtbl .= "
                  ";
                  	
                  	foreach ($installed_packages as $pkg) {
                  		if (!$pkg['name']) {
                  			continue;
                  		}
                  
                  		#check package version
                  		//$txtcolor = "";
                  		$upgradeavail = false;
                  		$missing = false;
                  		$vergetstr = "";
                  
                  		if (isset($pkg['broken'])) {
                  			// package is configured, but does not exist in the system
                  			$missing = true;
                  			$status = $pkg['name']. ' ' . gettext('Package is configured, but not installed!');
                  		} else if (isset($pkg['installed_version']) && isset($pkg['version'])) {
                  			$version_compare = pkg_version_compare($pkg['installed_version'], $pkg['version']);
                  
                  			if ($version_compare == '>') {
                  				// we're running a newer version of the package
                  				$status = $pkg['name'] . ' ' . gettext('Newer than available (%s)') . ' ' . $pkg['version'];
                          
                  			} else if ($version_compare == '<') {
                  				// we're running an older version of the package
                  				$status = $pkg['name'] . ' ' . gettext("Upgrade available to ") . ' ' . $pkg['version'] . " - ";
                  				$upgradeavail = true;
                  				$vergetstr = $pkg['installed_version'] . ' to ' . $pkg['version'];
                  			} else if ($version_compare == '=') {
                  				// we're running the current version
                  				$status = $pkg['name']. ' ' . gettext('Up-to-date');
                  			} else {
                  				$status = gettext('Error comparing version');
                  			}
                  		} else {
                  			// unknown available package version
                  			$status = gettext('Unknown');
                  		}
                  
                  		if ($upgradeavail) {
                  			$pkgtbl .= $status . $pkg['name'] . $vergetstr . "
                  ";
                  		} elseif ($missing) {
                  			$pkgtbl .= $status . "
                  ";
                  		} else {
                  			$pkgtbl .= $status . "
                  ";
                  		}
                  
                  	}
                  
                  	return $pkgtbl;
                  }
                  ?>
                  
                  

                  Salu2

                  Excelente.

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

                    Hola.

                    Gracias.

                    Por cierto, una forma desde shell, de consultar todos los paquetes disponibles de pfSense para una plataforma determinada (amd64, x86, ARM)

                    pkg search -o ".*"

                    Para amd64

                    
                    [2.3.2-RELEASE][root@pfSense1.localdomain]/: pkg search -o ".*" 
                    security/pfSense-base          pfSense core files
                    security/pfSense-base-nanobsd  pfSense core files
                    security/pfSense-default-config pfSense default config
                    security/pfSense-default-config-serial pfSense default serial config
                    security/pfSense-default-config-vmware pfSense default config (vmware)
                    security/pfSense-kernel-debug  pfSense kernel-debug (pfSense)
                    security/pfSense-kernel        pfSense kernel (pfSense)
                    security/pfSense-rc            pfSense rc script
                    security/pfSense-repo          pfSense pkg repository configuration (stable)
                    net/GeoIP                      Find the country that any IP address or hostname originates from
                    net-mgmt/aggregate             Optimise a list of route prefixes to help make nice short filters
                    sysutils/apcupsd               Set of programs for controlling APC UPS
                    archivers/arc                  Create & extract files from DOS .ARC files
                    devel/argp-standalone          Standalone version of arguments parsing functions from GLIBC
                    archivers/arj                  Open source implementation of the ARJ archiver
                    net/arping                     ARP level "ping" utility
                    sysutils/ataidle               Utility to spin down ATA drives
                    devel/autoconf                 Automatically configure source code on many Un*x platforms
                    devel/autoconf-wrapper         Wrapper script for GNU autoconf
                    devel/automake                 GNU Standards-compliant Makefile generator
                    devel/automake-wrapper         Wrapper script for GNU automake
                    net/avahi-app                  Service discovery on a local network
                    sysutils/b43-fwcutter          Extracts firmware for Broadcom Wireless adapters
                    security/barnyard2             Interpreter for Snort unified2 binary output files
                    shells/bash                    The GNU Project's Bourne Again SHell
                    audio/beep                     Beeps a certain duration and pitch out of the PC Speaker
                    dns/bind-tools                 Command line tools from BIND: delv, dig, host, nslookup...
                    devel/binutils                 GNU binary tools
                    devel/bison                    Parser generator from FSF, (mostly) compatible with Yacc
                    sysutils/blinkled              blinkled
                    security/broccoli              Bro Client Communications Library
                    sysutils/bsdinstaller          BSD Installer mega-package
                    net-mgmt/bsnmp-regex           bsnmpd module allowing creation of counters from log files
                    net-mgmt/bsnmp-ucd             bsnmpd module that implements parts of UCD-SNMP-MIB
                    net/bwi-firmware-kmod          Broadcom AirForce IEEE 802.11 Firmware Kernel Module
                    dns/c-ares                     Asynchronous DNS resolver library
                    www/c-icap                     ICAP server implementation
                    www/c-icap-modules             Modules for c-icap: virus_scan and srv_url_check
                    security/ca_root_nss           Root certificate bundle from the Mozilla Project
                    archivers/cabextract           Program to extract Microsoft cabinet (.CAB) files
                    graphics/cairo                 Vector graphics library with cross-device output support
                    sysutils/check_reload_status   run various pfSense scripts on event.
                    net-mgmt/choparp               Simple proxy arp daemon
                    security/clamav                Command line virus scanner written entirely in C
                    sysutils/clog                  Circular log support for FreeBSD syslogd
                    devel/cmake-modules            Modules and Templates for CMake
                    sysutils/cpdup                 Comprehensive filesystem mirroring and backup program
                    sysutils/cpustats              cpustats
                    ftp/curl                       Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
                    security/cyrus-sasl2           RFC 2222 SASL (Simple Authentication and Security Layer)
                    net/daq                        Data Acquisition abstraction library for snort 2.9+
                    net-mgmt/darkstat              Network statistics gatherer and reporter
                    databases/db5                  Oracle Berkeley DB, revision 5.3
                    devel/dbus                     Message bus system for inter-application communication
                    devel/dbus-glib                GLib bindings for the D-BUS messaging system
                    net/dhcp6                      KAME DHCP6 client, server, and relay
                    net-mgmt/dhcp_probe            Attempts to discover DHCP and BootP servers on a network
                    sysutils/dhcpleases            read dhpcd.lease file and add it to hosts file
                    sysutils/dhcpleases6           read dhpcd6.leases file and trigger command on modification
                    devel/ding-libs                Collection of useful libraries for developers
                    sysutils/dmidecode             Tool for dumping DMI (SMBIOS) contents in human-readable format
                    dns/dnsmasq                    Lightweight DNS forwarder, DHCP, and TFTP server
                    dns/dnstop                     Captures and analyzes DNS traffic (or analyzes libpcap dump)
                    textproc/docbook               Meta-port for the different versions of the DocBook DTD
                    textproc/docbook-sgml          DocBook SGML DTD
                    textproc/docbook-xml           DocBook XML DTD
                    textproc/docbook-xsl           XSL DocBook stylesheets
                    net/dpinger                    IP device monitoring tool
                    sysutils/eventlog              Replacement of the simple syslog() API providing structure to messages
                    textproc/expat2                XML 1.0 parser written in C
                    security/expiretable           Utility to remove entries from the pf(4) table based on their age
                    net/filterdns                  filterdns
                    sysutils/filterlog             filterlog
                    sysutils/flashrom              Utility for reading, writing, verifying, and erasing flash ROM chips
                    textproc/flex                  Fast lexical analyzer generator
                    x11-fonts/fontconfig           XML-based font configuration API for X Windows
                    net/fping                      Quickly ping multiple hosts without flooding the network
                    net/freeradius2                Free RADIUS server implementation
                    print/freetype2                Free and portable TrueType font rendering engine
                    lang/gawk                      GNU version of Awk
                    lang/gcc                       GNU Compiler Collection 4.8
                    databases/gdbm                 GNU database manager
                    devel/gettext-runtime          GNU gettext runtime libraries and programs
                    devel/gettext-tools            GNU gettext development and translation tools
                    devel/git                      Distributed source code management tool
                    devel/glib20                   Some useful routines of C programming (current stable version)
                    devel/gmake                    GNU version of 'make' utility
                    devel/gmake-lite               Minimalist version of gnu make
                    math/gmp                       Free library for arbitrary precision arithmetic
                    sysutils/gnome_subr            Common startup and shutdown subroutines used by GNOME scripts
                    devel/gobject-introspection    Generate interface introspection data for GObject libraries
                    net/gogoc                      GogoCLIENT, connect to Freenet6 tunnel
                    graphics/graphviz              Graph Visualization Software from AT&T and Bell Labs
                    net-mgmt/grepcidr              Filter IP addresses matching IPv4 CIDR/network specification
                    sysutils/grub2-bhyve           Grub-emu loader for bhyve
                    archivers/gtar                 GNU version of the traditional tape archiver
                    net/haproxy                    Reliable, high performance TCP/HTTP load balancer
                    net/haproxy-devel              Reliable, high performance TCP/HTTP load balancer
                    misc/help2man                  Automatically generating simple manual pages from program output
                    net/hping                      Network auditing tool
                    sysutils/htop                  Better top(1) - interactive process viewer
                    devel/icu                      International Components for Unicode (from IBM)
                    dns/idnkit                     Library to handle internationalized domain names
                    net-mgmt/iftop                 Display bandwidth usage on an interface by host
                    net/igmpproxy                  Multicast forwarding IGMP proxy
                    print/indexinfo                Utility to regenerate the GNU info page index
                    textproc/intltool              Tools to internationalize various kinds of data files
                    benchmarks/iperf               Tool to measure maximum TCP and UDP bandwidth
                    benchmarks/iperf3              Improved tool to measure TCP and UDP bandwidth
                    sysutils/ipmitool              CLI to manage IPMI systems
                    net/isc-dhcp43-client          The ISC Dynamic Host Configuration Protocol client
                    net/isc-dhcp43-relay           The ISC Dynamic Host Configuration Protocol relay
                    net/isc-dhcp43-server          ISC Dynamic Host Configuration Protocol server
                    textproc/iso8879               Character entity sets from ISO 8879:1986 (SGML)
                    devel/jansson                  C library for encoding, decoding, and manipulating JSON data
                    graphics/jbigkit               Lossless compression for bi-level images such as scanned pages, faxes
                    graphics/jpeg-turbo            SIMD-accelerated JPEG codec which replaces libjpeg
                    devel/json-c                   JSON (JavaScript Object Notation) implementation in C
                    devel/jsoncpp                  JSON reader and writer library for C++
                    security/krb5                  Authentication system developed at MIT, successor to Kerberos IV
                    net/ladvd                      Minimal LLDP/CDP/EDP/FDP/NDP sender daemon
                    databases/ldb                  LDAP-like embedded database
                    dns/ldns                       Library for programs conforming to DNS RFCs and drafts
                    archivers/lha                  Archive files using LZSS and Huffman compression (.lzh files)
                    archivers/libarchive           Library to create and read several streaming archive formats
                    devel/libdaemon                Lightweight C library that eases the writing of UNIX daemons
                    net/libdnet                    Simple interface to low level networking routines
                    devel/libedit                  Command line editor library
                    devel/libevent2                API for executing callback functions on events or timeouts
                    devel/libffi                   Foreign Function Interface
                    x11-fonts/libfontenc           The fontenc Library
                    security/libgcrypt             General purpose crypto library based on code used in GnuPG
                    graphics/gd                    Graphics library for fast creation of images
                    security/libgpg-error          Common error values for all GnuPG components
                    devel/libhtp                   Security-aware parser for the HTTP protocol
                    converters/libiconv            Character set conversion library
                    dns/libidn                     Internationalized Domain Names command line tool
                    devel/libinotify               Kevent based inotify compatible library
                    devel/libltdl                  System independent dlopen wrapper
                    archivers/liblz4               LZ4 compression library, lossless and very fast
                    security/libmcrypt             Multi-cipher cryptographic library (used in PHP)
                    net/libnet                     C library for creating IP packets
                    net/libosip2                   Low layer of SIP implementation
                    net/libpcap                    Ubiquitous network traffic capture library
                    devel/libpci                   PCI configuration space I/O made easy
                    devel/libpdel                  Packet Design multi-purpose C library for embedded applications
                    devel/libsigsegv               Handling page faults in user mode
                    security/libsodium             Library to build higher-level cryptographic tools
                    security/libssh2               Library implementing the SSH2 protocol
                    devel/libtool                  Generic shared library support script
                    textproc/libucl                Universal configuration library parser
                    devel/libunistring             Unicode string library
                    textproc/libxml2               XML parser library for GNOME
                    textproc/libxslt               The XSLT C library for GNOME
                    textproc/libyaml               YAML 1.1 parser and emitter written in C
                    net/libzmq4                    ZeroMQ core library (Version 4)
                    www/lightsquid                 Light and fast web based squid proxy traffic analyser
                    www/lighttpd                   Secure, fast, compliant, and flexible Web Server
                    www/links                      Lynx-like text WWW browser
                    sysutils/logrotate             Daemon to rotate, compress, remove, and mail system log files
                    sysutils/lsof                  Lists information about open files (similar to fstat(1))
                    lang/lua52                     Small, compilable scripting language providing easy access to C code
                    lang/lua53                     Small, compilable scripting language providing easy access to C code
                    lang/luajit                    Just-In-Time Compiler for Lua
                    archivers/lzo2                 Portable speedy, lossless data compression library
                    devel/m4                       GNU m4
                    sysutils/minicron              very small cron
                    net/miniupnpd                  UPnP IGD implementation which uses pf/ipf
                    x11-fonts/mkfontdir            Create an index of X font files in a directory
                    x11-fonts/mkfontscale          Creates an index of scalable font files for X
                    net/mosh                       Mobile terminal that supports intermittent connectivity
                    math/mpc                       Library of complex numbers with arbitrarily high precision
                    net/mpd4                       Multi-link PPP daemon based on netgraph(4)
                    net/mpd5                       Multi-link PPP daemon based on netgraph(4)
                    math/mpfr                      Library for multiple-precision floating-point computations
                    net/mtr-nox11                  Traceroute and ping in a single network diagnostic tool
                    databases/mysql56-client       Multithreaded SQL database (client)
                    net-mgmt/nagios-plugins        Plugins for Nagios
                    editors/nano                   Nano's ANOther editor, an enhanced free Pico clone
                    devel/nasm                     General-purpose multi-platform x86 and amd64 assembler
                    net/ndpi                       NTOP-maintained superset of the popular OpenDPI library
                    www/neon                       HTTP and WebDAV client library for Unix systems
                    net-mgmt/net-snmp              Extendable SNMP implementation
                    security/nettle                Low-level cryptographic library
                    www/nginx                      Robust and small WWW server
                    security/nmap                  Port scanning utility for large networks
                    net-mgmt/nrpe-ssl              Nagios Remote Plugin Executor (SSL version)
                    devel/nspr                     Platform-neutral API for system level and libc like functions
                    security/nss                   Libraries to support development of security-enabled applications
                    net/ntopng                     Network monitoring tool with command line and web interfaces
                    net/ntp                        The Network Time Protocol Distribution
                    sysutils/nut                   Network UPS Tools
                    devel/oniguruma5               BSDL Regular Expressions library compatible with POSIX/GNU/Perl
                    emulators/open-vm-tools-nox11  Open VMware tools for FreeBSD VMware guests
                    net/openbgpd                   Free implementation of the Border Gateway Protocol, Version 4
                    net/openldap24-client          Open source LDAP client implementation
                    security/openvpn               Secure IP/Ethernet tunnel daemon
                    security/openvpn-client-export OpenVPN Client Export
                    security/p5-Authen-SASL        Perl5 module for SASL authentication
                    devel/p5-CPAN-Meta             Distribution metadata for a CPAN dist
                    security/p5-Digest-HMAC        Perl5 interface to HMAC Message-Digest Algorithms
                    lang/p5-Error                  Error/exception handling in object-oriented programming style
                    graphics/p5-GD                 Perl5 interface to Gd Graphics Library version2
                    security/p5-GSSAPI             Perl extension providing access to the GSSAPIv2 library
                    net/p5-IO-Socket-IP            Drop-in replacement for IO::Socket::INET supporting IPv4 and IPv6
                    security/p5-IO-Socket-SSL      Perl5 interface to SSL sockets
                    devel/p5-Locale-gettext        Message handling functions
                    devel/p5-Module-Build          Build and install Perl modules
                    www/p5-Mozilla-CA              Perl extension for Mozilla CA cert bundle in PEM format
                    mail/p5-Net-SMTP-SSL           SSL support for Net::SMTP
                    security/p5-Net-SSLeay         Perl5 interface to SSL
                    net/p5-Socket                  Networking constants and support functions
                    textproc/p5-XML-Parser         Perl extension interface to James Clark's XML parser, expat
                    archivers/p7zip                File archiver with high compression ratio
                    security/pam_ldap              Pam module for authenticating with LDAP
                    security/pam_mkhomedir         Create HOME with a PAM module on demand
                    devel/patch                    GNU patch utility
                    misc/pciids                    Database of all known IDs used in PCI devices
                    devel/pcre                     Perl Compatible Regular Expressions library
                    net/pecl-radius                Radius client library for PHP
                    databases/pecl-rrd             PHP bindings to rrd tool system
                    security/pecl-ssh2             PECL extension to the libssh2 library
                    net/pecl-zmq                   PHP bindings for ZeroMQ
                    lang/perl5.20                  Practical Extraction and Report Language
                    security/pfSense               Meta package to install pfSense required ports
                    sysutils/pfSense-Status_Monitoring pfSense Status Monitoring
                    sysutils/pfSense-builder       Meta package to install pfSense builder required ports
                    sysutils/pfSense-pkg-AutoConfigBackup pfSense package AutoConfigBackup
                    net/pfSense-pkg-Avahi          pfSense package Avahi
                    sysutils/pfSense-pkg-Backup    pfSense package Backup
                    sysutils/pfSense-pkg-Cron      pfSense package Cron
                    ftp/pfSense-pkg-FTP_Client_Proxy pfSense package FTP_Client_Proxy
                    net/pfSense-pkg-LADVD          pfSense package LADVD
                    www/pfSense-pkg-Lightsquid     pfSense package Lightsquid
                    sysutils/pfSense-pkg-Notes     pfSense package Notes
                    emulators/pfSense-pkg-Open-VM-Tools pfSense package Open-VM-Tools
                    net/pfSense-pkg-OpenBGPD       pfSense package OpenBGPD
                    net/pfSense-pkg-Quagga_OSPF    pfSense package Quagga_OSPF
                    sysutils/pfSense-pkg-RRD_Summary pfSense package RRD_Summary
                    sysutils/pfSense-pkg-Service_Watchdog pfSense package Service_Watchdog
                    sysutils/pfSense-pkg-Shellcmd  pfSense package Shellcmd
                    net/pfSense-pkg-Status_Traffic_Totals Traffic Totals using the vnStat database
                    sysutils/pfSense-pkg-System_Patches pfSense package System_Patches
                    sysutils/pfSense-pkg-apcupsd   pfSense package apcupsd
                    net/pfSense-pkg-arping         pfSense package arping
                    dns/pfSense-pkg-bind9          BIND DNS suite with updated DNSSEC and DNS64
                    sysutils/pfSense-pkg-blinkled  pfSense package blinkled
                    net-mgmt/pfSense-pkg-darkstat  pfSense package darkstat
                    net/pfSense-pkg-freeradius2    pfSense package freeradius2
                    sysutils/pfSense-pkg-gwled     pfSense package gwled
                    net/pfSense-pkg-haproxy        pfSense package haproxy
                    net/pfSense-pkg-haproxy-devel  pfSense package haproxy-devel
                    net-mgmt/pfSense-pkg-iftop     pfSense package iftop
                    benchmarks/pfSense-pkg-iperf   pfSense package iperf
                    mail/pfSense-pkg-mailreport    pfSense package mailreport
                    net/pfSense-pkg-mtr-nox11      pfSense package mtr-nox11
                    security/pfSense-pkg-nmap      pfSense package nmap
                    net-mgmt/pfSense-pkg-nrpe      pfSense package nrpe
                    net/pfSense-pkg-ntopng         pfSense package ntopng
                    sysutils/pfSense-pkg-nut       Network UPS Tools
                    security/pfSense-pkg-openvpn-client-export pfSense package openvpn-client-export
                    net/pfSense-pkg-pfBlockerNG    pfSense package pfBlockerNG
                    net/pfSense-pkg-routed         pfSense package routed
                    net/pfSense-pkg-siproxd        pfSense package siproxd
                    security/pfSense-pkg-snort     pfSense package snort
                    net-mgmt/pfSense-pkg-softflowd pfSense package softflowd
                    www/pfSense-pkg-squid          pfSense package squid
                    www/pfSense-pkg-squidGuard     pfSense package squidGuard
                    security/pfSense-pkg-sudo      pfSense package sudo
                    security/pfSense-pkg-suricata  pfSense package suricata
                    sysutils/pfSense-pkg-syslog-ng pfSense package syslog-ng
                    net-mgmt/pfSense-pkg-zabbix-agent pfSense package zabbix-agent
                    net-mgmt/pfSense-pkg-zabbix-proxy pfSense package zabbix-proxy
                    dns/bind-pfsense               BIND DNS suite with updated DNSSEC and DNS64
                    sysutils/pftop                 Utility for real-time display of statistics for pf
                    security/php-suhosin           PHP extension that implements high-level protections
                    devel/php-xdebug               Xdebug extension for PHP
                    lang/php56                     PHP Scripting Language
                    math/php56-bcmath              The bcmath shared extension for php
                    archivers/php56-bz2            The bz2 shared extension for php
                    textproc/php56-ctype           The ctype shared extension for php
                    ftp/php56-curl                 The curl shared extension for php
                    textproc/php56-dom             The dom shared extension for php
                    security/php56-filter          The filter shared extension for php
                    devel/php56-gettext            The gettext shared extension for php
                    security/php56-hash            The hash shared extension for php
                    devel/php56-json               The json shared extension for php
                    net/php56-ldap                 The ldap shared extension for php
                    converters/php56-mbstring      The mbstring shared extension for php
                    security/php56-mcrypt          The mcrypt shared extension for php
                    databases/php56-mysql          The mysql shared extension for php
                    databases/php56-mysqli         The mysqli shared extension for php
                    www/php56-opcache              The opcache shared extension for php
                    security/php56-openssl         The openssl shared extension for php
                    devel/php56-pcntl              The pcntl shared extension for php
                    databases/php56-pdo            The pdo shared extension for php
                    databases/php56-pdo_mysql      The pdo_mysql shared extension for php
                    databases/php56-pdo_sqlite     The pdo_sqlite shared extension for php
                    devel/php56-pfSense-module     Library for getting useful info
                    databases/php56-pgsql          The pgsql shared extension for php
                    sysutils/php56-posix           The posix shared extension for php
                    devel/php56-readline           The readline shared extension for php
                    www/php56-session              The session shared extension for php
                    devel/php56-shmop              The shmop shared extension for php
                    textproc/php56-simplexml       The simplexml shared extension for php
                    net/php56-sockets              The sockets shared extension for php
                    databases/php56-sqlite3        The sqlite3 shared extension for php
                    devel/php56-sysvmsg            The sysvmsg shared extension for php
                    devel/php56-sysvsem            The sysvsem shared extension for php
                    devel/php56-sysvshm            The sysvshm shared extension for php
                    devel/php56-tokenizer          The tokenizer shared extension for php
                    textproc/php56-xml             The xml shared extension for php
                    textproc/php56-xmlreader       The xmlreader shared extension for php
                    textproc/php56-xmlwriter       The xmlwriter shared extension for php
                    archivers/php56-zlib           The zlib shared extension for php
                    x11/pixman                     Low-level pixel manipulation library
                    ports-mgmt/pkg                 Package manager
                    devel/pkgconf                  Utility to help to configure compiler and linker flags
                    graphics/png                   Library for manipulating PNG images
                    devel/popt                     Getopt(3) like library with a number of enhancements, from Redhat
                    databases/postgresql93-client  PostgreSQL database (client)
                    devel/protobuf                 Data interchange format library
                    sysutils/pstree                List processes as a tree
                    devel/py-babel                 Collection of tools for internationalizing Python applications
                    devel/py-Jinja2                Fast and easy to use stand-alone template engine
                    textproc/py-MarkupSafe         Implements XML/HTML/XHTML Markup safe string for Python
                    devel/py-backports_abc         Backport of recent additions to the 'collections.abc' module
                    devel/py-botocore              Low-level, core functionality of boto 3
                    security/py-certifi            Mozilla SSL certificates
                    devel/py-dateutil              Extensions to the standard Python datetime module
                    textproc/py-docutils           Python Documentation Utilities
                    devel/py-enum34                Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7
                    devel/py-futures               Backport of the concurrent.futures package from Python 3.2
                    devel/py-jmespath              JSON Matching Expressions
                    net/py-libcloud                Standard client library for many popular cloud providers
                    devel/py-msgpack-python        MessagePack (de)serializer for Python
                    misc/py-progressbar            Text progressbar library for python
                    security/py-pycrypto           Python Cryptography Toolkit
                    devel/py-pytz                  World Timezone Definitions for Python
                    net/py-pyzmq                   Python bindings for ZeroMQ
                    www/py-requests                HTTP library written in Python for human beings
                    sysutils/py-salt               Distributed remote execution and configuration management system
                    devel/py-setuptools27          Python packages installer
                    devel/py-singledispatch        Provides single-dispatch generic functions
                    devel/py-six                   Python 2 and 3 compatibility utilities
                    net/py-speedtest-cli           Command line interface for testing internet bandwidth
                    www/py-tornado                 Python Web Server from FriendFeed
                    devel/py-yaml                  Python YAML parser
                    lang/python2                   The "meta-port" for version 2 of the Python interpreter
                    lang/python27                  Interpreted object-oriented programming language
                    emulators/qemu-user-static     QEMU CPU Emulator github bsd-user branch - static user targets
                    sysutils/qstats                read dhpcd.lease file and add it to hosts file
                    net/quagga                     Free RIPv1, RIPv2, OSPFv2, BGP4, IS-IS route software
                    net/radvd                      Linux/BSD IPv6 router advertisement daemon
                    net-mgmt/rate                  Traffic analysis command-line utility
                    databases/redis                Persistent key-value database with built-in net interface
                    net/relayd                     OpenBSD relay daemon
                    databases/rrdtool              Round Robin Database Tools
                    net/rsync                      Network file distribution/synchronization utility
                    devel/scons                    Build tool alternative to make
                    shells/scponly                 Tiny shell that only permits scp and sftp
                    sysutils/screen                Multi-screen window manager
                    textproc/sdocbook-xml          "Simplified" DocBook XML DTD
                    net/siproxd                    Proxy/masquerading daemon for the SIP protocol
                    sysutils/smartmontools         S.M.A.R.T. disk monitoring tools
                    security/snort                 Lightweight network intrusion detection system
                    net-mgmt/softflowd             Softflowd is flow-based network traffic analyser with export
                    databases/sqlite3              SQL database engine in a C library
                    www/squid                      HTTP Caching Proxy
                    www/squidguard                 Fast redirector for squid
                    www/squid_radius_auth          RADIUS authenticator for squid proxy 2.5 and later
                    www/squidclamav                Clamav c-icap service and redirector for Squid
                    sysutils/ssh_tunnel_shell      SSH tunnel shell
                    sysutils/sshlockout_pf         SSH lockout pf
                    security/sssd                  System Security Services Daemon
                    security/strongswan            Open Source IKEv2 IPsec-based VPN solution
                    security/sudo                  Allow others to run commands as root
                    security/suricata              High Performance Network IDS, IPS and Security Monitoring engine
                    devel/swig13                   Simplified Wrapper and Interface Generator
                    devel/swig30                   Generate wrappers for calling C/C++ code from other languages
                    sysutils/syslog-ng             Powerful syslogd replacement
                    devel/talloc                   Hierarchical pool based memory allocator
                    databases/tdb                  Trivial Database
                    devel/tevent                   Talloc based event loop library
                    graphics/tiff                  Tools and library routines for working with TIFF images
                    sysutils/tmux                  Terminal Multiplexer
                    net/trafshow                   Full screen visualization of network traffic
                    net/trafshow3                  Full screen visualization of network traffic (an ancient version)
                    devel/uclcmd                   Command line tool for working with UCL config files
                    dns/unbound                    Validating, recursive, and caching DNS resolver
                    databases/unixODBC             ODBC library suite for Unix
                    archivers/unzoo                ZOO archive extractor
                    editors/vim-lite               Improved version of the vi editor (lite package)
                    sysutils/vm-bhyve              Management system for bhyve virtual machines
                    sysutils/vmdktool              Convert VMDK files to/from raw disk images
                    net/vnstat                     Console-based network traffic monitor
                    sysutils/voucher               Voucher support
                    devel/vstr                     General purpose string library for C
                    x11-fonts/webfonts             TrueType core fonts for the Web
                    net/whois                      Marco d'Itri whois client
                    net/wol                        Tool to wake up Wake-On-LAN compliant computers
                    sysutils/wrapalixresetbutton   Utility to detect platform reset button state for use in scripting
                    sysutils/xe-guest-utilities    FreeBSD VM tools for Citrix XenServer and XCP
                    sysutils/xen-guest-tools       Xen tools within FreeBSD domU
                    security/xinetd                Replacement for inetd with better control and logging
                    textproc/xmlcatmgr             SGML and XML catalog manager
                    textproc/xmlcharent            XML character entities
                    textproc/xmlstarlet            Command Line XML Toolkit
                    devel/xorg-macros              X.Org development aclocal macros
                    x11/xproto                     X11 protocol headers
                    devel/yajl                     Portable JSON parsing and serialization library in ANSI C
                    net-mgmt/zabbix3-agent         Enterprise-class open source distributed monitoring (agent) LTS
                    net-mgmt/zabbix3-proxy         Enterprise-class open source distributed monitoring (proxy) LTS
                    archivers/zip                  Create/update ZIP files compatible with PKZIP
                    irc/znc                        Advanced IRC bouncer
                    
                    

                    Salu2

                    Javier Castañón
                    Técnico de comunicaciones, soporte y sistemas.

                    Mi web: https://javcasta.com/

                    Soporte scripting/pfSense https://javcasta.com/soporte/

                    1 Reply Last reply Reply Quote 0
                    • I
                      iplost
                      last edited by

                      Claro, depende de la plataforma donde ejecutes el comando pkg, ok por el dato

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

                        Hola

                        Mira en este post, como usa el comando pkg para obtener los paquetes de amd64 y ARM (obviamente dispone de 2 máquinas, una con plataforma amd64 y otra con ARM) y sus diferencias. Muy ilustrativo :)

                        @jimp:

                        $ ssh root@SG1000.fw.example.com 'pkg search -o ".*"' | awk '{print $1;}' | sort > armv6.list
                        $ ssh root@SG8860.fw.example.com 'pkg search -o ".*"' | awk '{print $1;}' | sort > amd64.list
                        $ diff amd64.list armv6.list | grep '^>' > not-on-amd64.txt
                        $ diff amd64.list armv6.list | grep '^<' > not-on-armv6.txt
                        $ cat not-on-amd64.txt 
                        > sysutil/pfSense-u-boot
                        $ cat not-on-armv6.txt 
                        < archivers/cabextract
                        < archivers/gtar
                        < archivers/libarchive
                        < archivers/liblz4
                        < audio/beep
                        < databases/ldb
                        < databases/mysql56-client
                        < databases/redis
                        < databases/tdb
                        < devel/argp-standalone
                        < devel/binutils
                        < devel/cmake
                        < devel/cmake-modules
                        < devel/ding-libs
                        < devel/git
                        < devel/icu
                        < devel/jansson
                        < devel/jsoncpp
                        < devel/libhtp
                        < devel/libinotify
                        < devel/libpci
                        < devel/libunistring
                        < devel/nasm
                        < devel/nspr
                        < devel/py-babel
                        < devel/py-backports_abc
                        < devel/py-botocore
                        < devel/py-dateutil
                        < devel/py-enum34
                        < devel/py-futures
                        < devel/py-Jinja2
                        < devel/py-jmespath
                        < devel/py-msgpack-python
                        < devel/py-pytz
                        < devel/py-singledispatch
                        < devel/py-six
                        < devel/py-yaml
                        < devel/swig13
                        < devel/talloc
                        < devel/tevent
                        < devel/yajl
                        < dns/bind99
                        < dns/c-ares
                        < emulators/open-vm-tools-nox11
                        < emulators/pfSense-pkg-Open-VM-Tools
                        < emulators/qemu-user-static
                        < graphics/graphviz
                        < lang/p5-Error
                        < mail/p5-Net-SMTP-SSL
                        < math/mpc
                        < math/mpfr
                        < misc/pciids
                        < misc/py-progressbar
                        < net/daq
                        < net/freeradius2
                        < net/libdnet
                        < net/libpcap
                        < net/ndpi
                        < net/ntopng
                        < net/p5-IO-Socket-IP
                        < net/p5-Socket
                        < net/pfSense-pkg-freeradius2
                        < net/pfSense-pkg-ntopng
                        < net/py-libcloud
                        < net/py-pyzmq
                        < net/rsync
                        < security/barnyard2
                        < security/broccoli
                        < security/nss
                        < security/p5-Authen-SASL
                        < security/p5-Digest-HMAC
                        < security/p5-GSSAPI
                        < security/p5-IO-Socket-SSL
                        < security/p5-Net-SSLeay
                        < security/pam_ldap
                        < security/pam_mkhomedir
                        < security/pfSense-default-config-azure
                        < security/pfSense-default-config-bhyve
                        < security/pfSense-default-config-ec2
                        < security/pfSense-default-config-ec2-csm
                        < security/pfSense-default-config-kvm
                        < security/pfSense-default-config-openstack-csm
                        < security/pfSense-default-config-serial-alix
                        < security/pfSense-default-config-vmware
                        < security/pfSense-pkg-snort
                        < security/pfSense-pkg-suricata
                        < security/py-certifi
                        < security/py-pycrypto
                        < security/snort
                        < security/sssd
                        < security/suricata
                        < shells/bash
                        < sysutils/blinkled
                        < sysutils/dmidecode
                        < sysutils/flashrom
                        < sysutils/grub2-bhyve
                        < sysutils/htop
                        < sysutils/lcdproc
                        < sysutils/lsof
                        < sysutils/pfSense-builder
                        < sysutils/pfSense-pkg-blinkled
                        < sysutils/pfSense-pkg-gwled
                        < sysutils/pfSense-pkg-LCDproc
                        < sysutils/py-salt
                        < sysutils/screen
                        < sysutils/smartmontools
                        < sysutils/u-boot-ufw
                        < sysutils/vm-bhyve
                        < sysutils/vmdktool
                        < sysutils/wrapalixresetbutton
                        < sysutils/xe-guest-utilities
                        < sysutils/xen-guest-tools
                        < textproc/flex
                        < textproc/libyaml
                        < textproc/py-docutils
                        < textproc/py-MarkupSafe
                        < textproc/xmlstarlet
                        < www/p5-Mozilla-CA
                        < www/py-requests
                        < www/py-tornado
                        < x11-fonts/libfontenc
                        < x11-fonts/mkfontdir
                        < x11-fonts/mkfontscale
                        < x11-fonts/webfonts
                        < x11/xproto
                        
                        

                        The packages that are not on ARM are mostly missing because they either do not compile or do not make sense on the platform, or they are dependencies of packages that are not there. For example, no need for VM guest tools if we know it's real hardware, not enough horsepower for snort/suricata even if they did compile.

                        To boil it down to user-facing stuff:

                        $ grep 'pfSense-pkg' not-on-armv6.txt | cut -f2- -d '/' | sort
                        pfSense-pkg-blinkled
                        pfSense-pkg-freeradius2
                        pfSense-pkg-gwled
                        pfSense-pkg-LCDproc
                        pfSense-pkg-ntopng
                        pfSense-pkg-Open-VM-Tools
                        pfSense-pkg-snort
                        pfSense-pkg-suricata
                        
                        

                        Salu2

                        Javier Castañón
                        Técnico de comunicaciones, soporte y sistemas.

                        Mi web: https://javcasta.com/

                        Soporte scripting/pfSense https://javcasta.com/soporte/

                        1 Reply Last reply Reply Quote 0
                        • I
                          iplost
                          last edited by

                          Wow! !  ;D

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