Pfelk: cant parse the data in firewall

Created on 1 Mar 2021  路  26Comments  路  Source: pfelk/pfelk

pfsense 2.5
ubuntu 20.04
sudo tcpdump -vvv -A -i any port 5140 can see the data
but dashboard firewall cant parse it

bug

All 26 comments

pfsense 2.5
Ubuntu 20.4.2 LTS
Screenshot_20210301-151800~3

Screenshot_20210301-155916~2
Screenshot_20210301-152500

@keshif & @gokhansezen - Please check your logstash log. I suspect the issue was the result of an added grok pattern and revision to pfelk.grok (i.e. openvpn grok patterns were removed and an openvpn.grok file was created).

Logstash is likely not running as it is unable to define the openvpn grok pattern as a result of the changes noted above.

Solution:
download the openvpn.grok file and restart logstash

  • sudo wget https://raw.githubusercontent.com/pfelk/pfelk/main/etc/pfelk/patterns/openvpn.grok -P /etc/pfelk/patterns/
  • systemctl restart logstash.service

Please check back to confirm the proposed solution reminded the issue. Updates were made in the manual install instructions and script.

Hi a3ilson,

Facing same issue, above fix didn't worked for me.

(pfSense 2.5.0 & ubuntu 20.04), it was working before updating with script v20.3a.

Awe shucks... can you run the error script and provide the associated log?

error.pfelk.log

Thanks for your quick response.
PFA.

error.pfelk.log

Thanks for your quick response.
PFA.

Thanks! Found the issue..will fix here in a few

Redownload the openvpn.grok and restart logstash.

馃悰 The issue or error:

,

馃敡 The fix:
Amended Line 42 of openvpn.grok from:

OPENVPN_MGT(%{OPENVPN_MGT_CLIENT}|%{OPENVPN_MGT_CMD})

to:

OPENVPN_MGT (%{OPENVPN_MGT_CLIENT}|%{OPENVPN_MGT_CMD})

added a space between OPENVPN_MGT and the applied GROK

updated openvpn.grok and restart logstash. Still no logs displayed in Discovery > firewall, suricata, dhcp (none).
error.pfelk.log

updated openvpn.grok and restart logstash. Still no logs displayed in Discovery > firewall, suricata, dhcp (none).
error.pfelk.log

Thanks @EverWin42O !

Had another typo (e.g. OEPNVPN_OTHER vs OPENVPN_OTHER on line 52).

Reload openvpn.grok and restart Logstash.

It's the same with me :(

Updated, Didn't worked.
error.pfelk.log

Updated, Didn't worked.
error.pfelk.log

No errors were noted...I would recommend purging (deleting) your indices then check to see if they are recreated and the document counts increase (logs).

Tried deleting; it got created after reboot with yellow mark. Still no data.

DHCPD DHCP(%{DHCPD_DISCOVER}|%{DHCPD_DUPLICATE}|%{DHCPD_OFF>
Screenshot_20210301-212715

@EverWin42O - I rebuilt my instance (loaded a snapshot of Ubuntu and installed pfelk)... everything appears to be working. Can you check to see if Logstash is logging any of your logs (this would be denoted within the index [i.e. document count])

DHCPD DHCP(%{DHCPD_DISCOVER}|%{DHCPD_DUPLICATE}|%{DHCPD_OFF>
Screenshot_20210301-212715

@gokhansezen - please elaborate and/or provide context

@EverWin42O - what are you running (pfSense or OPNsense) and what version?

pfsense 2.5.0

@EverWin42O - Let's give this a try:

Within pfSense try changing the output of your syslog (i.e. from BSD to Syslog or vice versa). The format was recently troubleshoot (#246) and was testing/working. However, if nothing is being logged and no errors are present, this would be the most logical issue.

  1. Change pfSense logging output

    • Does problem still exist?

Yes, Tried that switching BSD to Syslog and vice versa.
Tried clean installation and auto script.
clean ubuntu install and doing manual installation.

Yes, Tried that switching BSD to Syslog and vice versa.
Tried clean installation and auto script.
clean ubuntu install and doing manual installation.

Alright, let me know if it works out. If you still have the same results, I'd be curious to your logging and could further troubleshoot/assist. Just provide a sanitized (amend IPs as needed/desired) by providing a sample of logs via tcpdump (sudo tcpdump -vvv -A -i any port 5140)

Thank you so much for your support. Finally it started working. auto script worked perfectly. pfsense BSD log works.

@gokhansezen & @keshif - After updating the openvpn.grok file, let me know if you still have the same issue.

@EverWin42O - thanks for troubleshooting and providing the necessary logs to identify and correct.

firewall and ubound started working !
Thanks

Many many thanks @a3ilson
Now automated install script running is perfectly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kingtat picture kingtat  路  6Comments

InvokerFury picture InvokerFury  路  20Comments

ledge39 picture ledge39  路  7Comments

mango1122 picture mango1122  路  3Comments

bNg91 picture bNg91  路  30Comments