CEF
If you have devices on your network that can send logs in CEF format, you can send those logs to Security Onion. To get those CEF logs into Elasticsearch, you’ll need to add the Elastic integration for CEF and then configure the Security Onion firewall to allow the remote device to send its logs.
Add the CEF integration
First, add the Elastic integration for CEF.
Note
For more information about the CEF integration, please see https://www.elastic.co/docs/reference/integrations/cef.
Go to Elastic Fleet, click the
Agent policiestab, and then click the desired policy (for exampleso-grid-nodes_general).Click the
Add integrationbutton.Search for
cefand then click on theCommon Event Format (CEF)integration.The Elastic Integration page will show an overview of the CEF Integration. Review all information on the page and then click the
Add Common Event Format (CEF)button.On the
Add Common Event Format (CEF) integrationscreen, disable the options labeledCollect CEF application logs (input: logfile)andCollect CEF application logs (input: tcp). Make sure thatCollect CEF application logs (input: udp)is enabled and then change theSyslog Hostsetting fromlocalhostto0.0.0.0. TheSyslog Portshould be set to9003by default. Click theSave and continuebutton and then clickSave and deploy changes.
Allow CEF logs through firewall
Next, allow the traffic from the CEF host through the firewall to the CEF integration port.
Note
The following instructions assume that this is the first firewall change you have made and therefore refer to customhostgroup0 and customportgroup0. If those have already been used, you can select the next available hostgroup and portgroup.
Navigate to Administration –> Configuration.
At the top of the page, click the
Optionsmenu and then enable theShow advanced settingsoption.On the left side, go to
firewall, selecthostgroups, and click thecustomhostgroup0group. On the right side, enter the IP address of the CEF host and click the checkmark to save.On the left side, go to
firewall, selectportgroups, select thecustomportgroup0group, and then clickudp. On the right side, enter your desired listener port (9003 by default) and click the checkmark to save.On the left side, go to
firewall, selectrole, and then select the node type that will receive the CEF logs. Then drill intochain–>INPUT–>hostgroups–>customhostgroup0–>portgroups. On the right side, entercustomportgroup0and click the checkmark to save.If you would like to apply the rules immediately, click the
SYNCHRONIZE GRIDbutton under theOptionsmenu at the top of the page.
CEF dashboard
Once all configuration is complete, you should be able to go to Dashboards and select the CEF dashboard to see your iptables logs.