Skip to content

FBI advisory on FortiGate (FortiBleed): what to check in your config

Firewall audit · OPNsense · how-to

How to audit an OPNsense firewall config: ten things to check

The ten most severe checks the review runs on an OPNsense export, each with the setting or line it reads. The lines come from a made-up insecure sample file, so you can find the same setting in your own export.

Ten things to check

  1. A pass rule allows any source to any destination

    CriticalFirewall

    A pass rule allows any source to reach any destination, so the firewall does not restrict where that traffic goes.

    <rule uuid="3c4d5e6f-7081-4923-8b4c-5d6e7f8a9b03"> line 166 of insecure.xml

  2. Web interface served over HTTP

    HighAdmin

    The web interface is served over plain HTTP, so admin passwords and session cookies cross the network unencrypted.

    <protocol>http</protocol> line 41 of insecure.xml

  3. NAT port forward with source = any

    HighNAT

    A port forward accepts connections from any source address, so the forwarded service is open to the whole internet.

    <rule uuid="4c1d2e0a-7b3f-4d6e-9a51-0f3b2c1d4e01"> line 114 of insecure.xml

  4. SNMPv2c uses the public community

    HighSNMP

    SNMP uses the default community string "public", which anyone on the network can guess to read the device's configuration data.

    <rocommunity>public</rocommunity> line 108 of insecure.xml

  5. SSH root login allowed

    HighSSH

    SSH allows direct root login, so an attacker who guesses or steals the root credential gets full control in one step.

    <permitrootlogin>1</permitrootlogin> line 59 of insecure.xml

  6. SSH password auth permitted

    HighSSH

    SSH accepts password logins, so an admin account can be attacked by password guessing.

    <passwordauth>1</passwordauth> line 58 of insecure.xml

  7. Console without password

    HighConsole

    The local console does not ask for a password, so anyone with physical or out-of-band access gets a root menu.

    The setting it reads: system: no <disableconsolemenu> (console menu not password protected)

  8. LDAP auth without TLS

    HighAuth

    An LDAP authentication server is used without TLS, so admin passwords are sent to the directory in clear text.

    In the Auth settings of the export; the reader cites no single line for this check.

  9. Captive portal login served over HTTP

    HighCaptive portal

    The captive portal login page is served over plain HTTP, so user passwords cross the network unencrypted.

    In the Captive portal settings of the export; the reader cites no single line for this check.

  10. IDS/Suricata disabled

    HighIDS

    The intrusion detection service (Suricata) is turned off, so no traffic is checked against threat signatures.

    In the IDS settings of the export; the reader cites no single line for this check.

How to export the file

How long it takes: About 5 minutes; about 10 with the API, to create the key and delete it afterwards.

  1. System → Configuration → Backups → Download: leave "Do not backup RRD data." ticked and "Encrypt this configuration file." unticked → Download configuration, and upload the config-<host>-<date>.xml it saves

  2. Or, with a smaller privilege: System → Configuration → History → under "Backups (compare)", leave the newest saved configuration selected in the left list → the download icon ("Download this backup"), and upload the config-<host>-<time>.xml it saves. The list fills once OPNsense holds two or more saved configurations

Every step, the command-line route, and the errors you may meet: the OPNsense export guide.

What the export does not show

  • Hit counts, so unused rules are not found
  • Alias contents: a rule that uses an alias is not expanded
  • Logs and live states: this is the configuration and nothing else
  • Whether the rules end with a logged deny: not checked yet

Live sessions, logs and running hosts are not in a configuration export, so no finding comes from them.

The rest of the review

The review runs 27 checks on an OPNsense export. All of them, with the part of the export each reads: OPNsense firewall audit from the config file. The same items across every firewall: the firewall audit checklist.