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

    Suricata stoppt Listener/Logging auf WAN

    Scheduled Pinned Locked Moved Deutsch
    6 Posts 2 Posters 517 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.
    • cyruzC
      cyruz
      last edited by

      Moin zusammen,

      habe eine frische pfSense (2.4.4p3 / FreeBSD 11.2-RELEASE-p10) Installation auf einer APU.4C4 mit 4 GB RAM. Habe Suricata 4.1.4_4 über den PackageManager installiert und auf Interface WAN (PPPoE T-Offline GF), LAN & OPT1 lauschen lassen. Erst im Legacy Mode ca. 1 Woche mit den ET & Snort Community Rules ohne Blocking, um zu schauen was im Netz alles so vor sich geht; suppress gepflegt etc...
      3273b1f0-0c51-4335-b9e8-76cc05c0628b-image.png

      Nach ca. einer Woche habe ich dann auf den Inline Modus umgeschaltet und auf dem WAN Interface per SID-Mgmt einige Rulesets zum droppen gesetzt. Klappte Anfangs gut, hörte dann einfach auf. Keine Hinweise in den Logs ... hörte einfach auf. Sowohl http als auch alert log wurde ab einem bestimmten Zeitpunkt nicht mehr fortgeschrieben, Rulesets ignoriert. LAN & OPT1 funktionierten weiter (!)

      e970bf73-8982-465b-a7b4-1c57a12d3d69-image.png

      Das alertlog auf Interface WAN war nur wenige MB groß. Loggrößen erweitert, Flowstream Daten des WAN nach oben korrigiert. Appliance neugestartet ... weiterhin keine Funktion. LAN & OPT1 laufen weiter ...

      Neuinstallation ... Diesmal nur ET Ruleset aktiviert, dropsid mit einigen Rulesets aktiv ... 48 h laufen lassen -> keine Probleme. Ordentlich Hits auf dem WAN Interface, Rulesets werden korrekt umgesetzt. Bis heute morgen um ca. 08:05 Uhr, als ich die Snort GPL Regelwerke erstmal nur heruntergeladen habe (noch nicht zugewiesen !)
      73128f8e-0e51-4ea6-a81a-8e0651075a55-image.png

      Wieder hört Suricata auf dem WAN Interface auf zu arbeiten. Während ich sonst im Minuten-/Sekundentakt Hits zu verzeichnen hatte, kommt nun Nichts mehr.

      Folgende Logs Auszüge:

      sid_changes
      +++++++++++++++++++++++
      Starting auto SID management for WAN
      Start Time: 2019-07-08 08:05:39
      Processing drop_sid list: dropsid-wan.conf
      Parsed 478 potential SIDs to match from the provided list of tokens.
      Found 478 matching SIDs in the active rules.
      Changed action for 478 SIDs to 'drop'.
      End Time: 2019-07-08 08:05:40
      +++++++++++++++++++++++

      suricata_log
      +++++++++++++++++++++++
      8/7/2019 -- 08:06:00 - <Notice> -- This is Suricata version 4.1.4 RELEASE
      8/7/2019 -- 08:06:00 - <Info> -- CPUs/cores online: 4
      8/7/2019 -- 08:06:00 - <Info> -- HTTP memcap: 67108864
      8/7/2019 -- 08:06:01 - <Notice> -- using flow hash instead of active packets
      8/7/2019 -- 08:06:01 - <Info> -- Netmap: Setting IPS mode
      8/7/2019 -- 08:06:01 - <Info> -- fast output device (regular) initialized: alerts.log
      8/7/2019 -- 08:06:01 - <Info> -- http-log output device (regular) initialized: http.log
      8/7/2019 -- 08:06:01 - <Info> -- stats output device (regular) initialized: stats.log
      8/7/2019 -- 08:06:39 - <Info> -- 1 rule files processed. 20280 rules successfully loaded, 0 rules failed
      8/7/2019 -- 08:06:39 - <Info> -- Threshold config parsed: 0 rule(s) found
      8/7/2019 -- 08:06:41 - <Info> -- 20283 signatures processed. 1272 are IP-only rules, 6340 are inspecting packet payload, 14761 inspect application layer, 103 are decoder event only
      8/7/2019 -- 08:07:59 - <Info> -- Using 2 live device(s).
      8/7/2019 -- 08:07:59 - <Notice> -- all 6 packet processing threads, 2 management threads initialized, engine started.
      +++++++++++++++++++++++

      http_log
      529e4519-ba53-40a6-bec3-99f48a7f1674-image.png
      Anmerkung: Ich habe seit 08:05:50 definitiv http angesprochen !

      alert_log
      d59fc97f-bbb1-46d2-bdb7-e4aa96af3286-image.png

      system_general_log
      Jul 8 07:03:33 pfSense php-fpm[89487]: /index.php: Successful login for user 'admin' from: 192.168.5.101 (Local Database)
      Jul 8 08:05:27 pfSense check_reload_status: Syncing firewall
      Jul 8 08:05:34 pfSense php: [Suricata] Emerging Threats Open rules are up to date...
      Jul 8 08:05:34 pfSense php: [Suricata] There is a new set of Snort GPLv2 Community Rules posted. Downloading community-rules.tar.gz...
      Jul 8 08:05:37 pfSense php: [Suricata] Snort GPLv2 Community Rules file update downloaded successfully.
      Jul 8 08:05:38 pfSense php: [Suricata] Updating rules configuration for: WAN ...
      Jul 8 08:05:40 pfSense php: [Suricata] Enabling any flowbit-required rules for: WAN...
      Jul 8 08:05:41 pfSense php: [Suricata] Building new sid-msg.map file for WAN...
      Jul 8 08:05:42 pfSense php: [Suricata] Updating rules configuration for: LAN ...
      Jul 8 08:05:44 pfSense php: [Suricata] Enabling any flowbit-required rules for: LAN...
      Jul 8 08:05:45 pfSense php: [Suricata] Building new sid-msg.map file for LAN...
      Jul 8 08:05:46 pfSense php: [Suricata] Updating rules configuration for: OPT1 ...
      Jul 8 08:05:48 pfSense php: [Suricata] Enabling any flowbit-required rules for: OPT1...
      Jul 8 08:05:49 pfSense php: [Suricata] Building new sid-msg.map file for OPT1...
      Jul 8 08:05:50 pfSense SuricataStartup[86314]: Suricata STOP for WAN(40976_pppoe0)...
      Jul 8 08:05:51 pfSense kernel: pppoe0: promiscuous mode disabled
      Jul 8 08:05:53 pfSense SuricataStartup[93455]: Suricata STOP for LAN(28281_igb1)...
      Jul 8 08:05:53 pfSense check_reload_status: Linkup starting igb1
      Jul 8 08:05:53 pfSense kernel: igb1: link state changed to DOWN
      Jul 8 08:05:54 pfSense php-fpm[70550]: /rc.linkup: Hotplug event detected for LAN(lan) static IP (192.168.5.1 )
      Jul 8 08:05:54 pfSense check_reload_status: Reloading filter
      Jul 8 08:05:55 pfSense xinetd[64136]: Starting reconfiguration
      Jul 8 08:05:55 pfSense xinetd[64136]: Swapping defaults
      Jul 8 08:05:55 pfSense xinetd[64136]: readjusting service 19000-tcp
      Jul 8 08:05:55 pfSense xinetd[64136]: Reconfigured: new=0 old=1 dropped=0 (services)
      Jul 8 08:05:56 pfSense SuricataStartup[5085]: Suricata STOP for OPT1(50114_igb2)...
      Jul 8 08:05:56 pfSense check_reload_status: Linkup starting igb2
      Jul 8 08:05:56 pfSense kernel: igb2: link state changed to DOWN
      Jul 8 08:05:56 pfSense kernel: igb2.179: link state changed to DOWN
      Jul 8 08:05:56 pfSense check_reload_status: Linkup starting igb2.179
      Jul 8 08:05:57 pfSense kernel: igb1: link state changed to UP
      Jul 8 08:05:57 pfSense check_reload_status: Linkup starting igb1
      Jul 8 08:05:57 pfSense php-fpm[8708]: /rc.linkup: Linkup detected on disabled interface...Ignoring
      Jul 8 08:05:57 pfSense php-fpm[40740]: /rc.linkup: Hotplug event detected for OPT1(opt1) static IP (172.20.20.1 )
      Jul 8 08:05:57 pfSense check_reload_status: Reloading filter
      Jul 8 08:05:58 pfSense php-fpm[8708]: /rc.linkup: Hotplug event detected for LAN(lan) static IP (192.168.5.1 )
      Jul 8 08:05:58 pfSense check_reload_status: rc.newwanip starting igb1
      Jul 8 08:05:59 pfSense xinetd[64136]: Starting reconfiguration
      Jul 8 08:05:59 pfSense xinetd[64136]: Swapping defaults
      Jul 8 08:05:59 pfSense xinetd[64136]: readjusting service 19000-tcp
      Jul 8 08:05:59 pfSense xinetd[64136]: Reconfigured: new=0 old=1 dropped=0 (services)
      Jul 8 08:05:59 pfSense php-fpm[40740]: /rc.newwanip: rc.newwanip: Info: starting on igb1.
      Jul 8 08:05:59 pfSense php-fpm[40740]: /rc.newwanip: rc.newwanip: on (IP address: 192.168.5.1) (interface: LAN[lan]) (real interface: igb1).
      Jul 8 08:05:59 pfSense dhcpleases: /etc/hosts changed size from original!
      Jul 8 08:05:59 pfSense check_reload_status: Reloading filter
      Jul 8 08:05:59 pfSense php: [Suricata] Suricata has restarted with your new set of rules...
      Jul 8 08:05:59 pfSense php: [Suricata] The Rules update has finished.
      Jul 8 08:06:00 pfSense kernel: igb2: link state changed to UP
      Jul 8 08:06:00 pfSense kernel: igb2.179: link state changed to UP
      Jul 8 08:06:00 pfSense check_reload_status: Linkup starting igb2
      Jul 8 08:06:00 pfSense check_reload_status: Syncing firewall
      Jul 8 08:06:00 pfSense check_reload_status: Linkup starting igb2.179
      Jul 8 08:06:00 pfSense SuricataStartup[23322]: Suricata START for WAN(40976_pppoe0)...
      Jul 8 08:06:01 pfSense php-fpm[89487]: /rc.linkup: Hotplug event detected for OPT1(opt1) static IP (172.20.20.1 )
      Jul 8 08:06:01 pfSense check_reload_status: rc.newwanip starting igb2
      Jul 8 08:06:01 pfSense php-fpm[70550]: /rc.linkup: Linkup detected on disabled interface...Ignoring
      Jul 8 08:06:02 pfSense php-fpm[89487]: /rc.newwanip: rc.newwanip: Info: starting on igb2.
      Jul 8 08:06:02 pfSense php-fpm[89487]: /rc.newwanip: rc.newwanip: on (IP address: 172.20.20.1) (interface: OPT1[opt1]) (real interface: igb2).
      Jul 8 08:06:02 pfSense dhcpleases: /etc/hosts changed size from original!
      Jul 8 08:06:02 pfSense SuricataStartup[27683]: Suricata START for LAN(28281_igb1)...
      Jul 8 08:06:03 pfSense SuricataStartup[29572]: Suricata START for OPT1(50114_igb2)...
      Jul 8 08:07:58 pfSense check_reload_status: Linkup starting igb1
      Jul 8 08:07:58 pfSense kernel: igb1: link state changed to DOWN
      Jul 8 08:07:59 pfSense php-fpm[70550]: /rc.linkup: Hotplug event detected for LAN(lan) static IP (192.168.5.1 )
      Jul 8 08:07:59 pfSense kernel: 079.552579 [ 254] generic_find_num_desc called, in tx 1024 rx 1024
      Jul 8 08:07:59 pfSense kernel: 079.559144 [ 262] generic_find_num_queues called, in txq 0 rxq 0
      Jul 8 08:07:59 pfSense kernel: 079.565405 [ 760] generic_netmap_dtor Restored native NA 0
      Jul 8 08:07:59 pfSense kernel: pppoe0: permanently promiscuous mode enabled
      Jul 8 08:07:59 pfSense kernel: 079.579879 [ 254] generic_find_num_desc called, in tx 1024 rx 1024
      Jul 8 08:07:59 pfSense kernel: 079.586583 [ 262] generic_find_num_queues called, in txq 0 rxq 0
      Jul 8 08:07:59 pfSense kernel: 079.592814 [ 760] generic_netmap_dtor Restored native NA 0
      Jul 8 08:07:59 pfSense kernel: 079.599966 [ 254] generic_find_num_desc called, in tx 1024 rx 1024
      Jul 8 08:07:59 pfSense check_reload_status: Reloading filter
      Jul 8 08:07:59 pfSense kernel: 079.607066 [ 262] generic_find_num_queues called, in txq 0 rxq 0

      Ich wäre sehr dankbar für ein paar Hinweise / Ratschläge, da ich nicht mehr weiß, wie ich das ohne Re-Install & und Restore der Config aus BackUp fixen kann, was auf Dauer nervt. Wenn noch etwas fehlt, bitte gerne Bescheid geben. Ich reiche das dann nach.

      Besten Dank im voraus
      cyruz

      1 Reply Last reply Reply Quote 0
      • JeGrJ
        JeGr LAYER 8 Moderator
        last edited by

        Bei Surricata ggf. den Loglevel erhöhen wenn möglich und die Snort Regeln mal anwenden und dann nochmal ins Log schauen. Bist du sicher, dass die Snort Regeln (wieder) Surricata kompatibel sind? IMHO waren sie das mal nicht...

        Aber prinzipiell komisch dass es schon beim runterladen zu Problemen kommt. Was sagt denn RAM und Table Size? Wie ist in den adv. settings denn der "Firewall Maximum Table Entries" bei Firewall/NAT?
        Evtl bei genug RAM den hier noch etwas aufblasen, gerade bei umfangreicheren Listen/Tabellen.

        Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

        If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

        1 Reply Last reply Reply Quote 0
        • cyruzC
          cyruz
          last edited by

          Moin,

          [...]
          Bist du sicher, dass die Snort Regeln (wieder) Surricata kompatibel sind? IMHO waren sie das mal nicht...
          [...]

          Öhm ... wenn du mich so fragst - nein !. Jedoch verleiten diverse Tutorials zur Nutzung dieser Rulesets. Da ist höchstens die Rede von Inkompatibilitäten einzelner, Snort-spezifischer Rules -> ...ok, gebongt. Aber nicht so, dass es einem gleich die Installation abschießt.

          [...]
          Aber prinzipiell komisch dass es schon beim runterladen zu Problemen kommt.
          [...]

          Meine Rede ...

          [...]
          Was sagt denn RAM und Table Size?
          [...]

          RAM ist unter Volldampf der Sense bei ~43%; Table Size von 400.000 auf 4.000.000

          Same shit ... hatte testweise Suricata nochmal neu aufgesetzt und die Rules auf dem WAN-Interface aktiv geschaltet. Folgender Log-Auszug

          c3f0aee5-f228-461f-bb25-34d47c1d939f-image.png

          Anschließend die ca. 35 Rules aus dem Ruleset entfernt -> gleiche parsing errors erneut

          1 Reply Last reply Reply Quote 0
          • JeGrJ
            JeGr LAYER 8 Moderator
            last edited by

            35? Das Log spricht doch nur von 18 die nicht geladen wurden wegen Fehler?

            Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

            If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

            1 Reply Last reply Reply Quote 0
            • cyruzC
              cyruz
              last edited by

              habe alle im Log aufgeführten SIDs aus dem Ruleset genommen, wollte ich damit sagen. Anschließend Suricata auf dem Interface neugestartet ... same shit. Auch wenn ich das Ruleset komplett deaktiviere und löschen, anschließend Appliance komplett durchstarte ... same shit

              1 Reply Last reply Reply Quote 0
              • cyruzC
                cyruz
                last edited by cyruz

                (Behelfs-) Lösung:

                komplette Neuinstallation der pfSense und Suricata läuft nun im Legacy-Blocking Mode, statt Inline-IPS.

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