Skip to content

Commit 477dfa5

Browse files
Merge pull request #111916 from yelevin/yelevin/connect-cef
Step 1 of the process of connecting CEF logs to Azure Sentinel
2 parents fab8f29 + 0f9e80a commit 477dfa5

File tree

2 files changed

+98
-17
lines changed

2 files changed

+98
-17
lines changed

articles/sentinel/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
- name: CEF-based solutions
8888
href: connect-common-event-format.md
8989
items:
90-
- name: STEP 1 Deploy the agent
90+
- name: STEP 1 Deploy the log forwarder
9191
href: connect-cef-agent.md
9292
- name: STEP 2 Configure your security solution
9393
href: connect-cef-solution-config.md
Lines changed: 97 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Deploy the agent to connect CEF data to Azure Sentinel Preview| Microsoft Docs
2+
title: Deploy the log forwarder to connect CEF data to Azure Sentinel | Microsoft Docs
33
description: Learn how to deploy the agent to connect CEF data to Azure Sentinel.
44
services: sentinel
55
documentationcenter: na
@@ -13,36 +13,117 @@ ms.devlang: na
1313
ms.topic: conceptual
1414
ms.tgt_pltfrm: na
1515
ms.workload: na
16-
ms.date: 11/26/2019
16+
ms.date: 04/19/2020
1717
ms.author: yelevin
1818

1919
---
20-
# Step 1: Deploy the agent
20+
# Step 1: Deploy the log forwarder
2121

2222

23-
In this step, you need to select the Linux machine that will act as a proxy between Azure Sentinel and your security solution. You will have to run a script on the proxy machine that:
24-
- Installs the Log Analytics agent and configures it as needed to listen for Syslog messages.
25-
- Configures the Syslog daemon to listen to Syslog messages using TCP port 514 and then forwards only the CEF messages to the Log Analytics agent using TCP port 25226.
26-
- Sets the Syslog agent to collect the data and send it securely to Azure Sentinel, where it is parsed and enriched.
23+
In this step, you will designate and configure the Linux machine that will forward the logs from your security solution to your Azure Sentinel workspace. This machine can be a physical or virtual machine in your on-premises environment, an Azure VM, or a VM in another cloud. Using the link provided, you will run a script on the designated machine that performs the following tasks:
24+
- Installs the Log Analytics agent for Linux (also known as the OMS agent) and configures it for the following purposes:
25+
- listening for CEF messages from the built-in Linux Syslog daemon on TCP port 25226
26+
- sending the messages securely over TLS to your Azure Sentinel workspace, where they are parsed and enriched
27+
28+
- Configures the built-in Linux Syslog daemon (rsyslog.d/syslog-ng) for the following purposes:
29+
- listening for Syslog messages from your security solutions on TCP port 514
30+
- forwarding only the messages it identifies as CEF to the Log Analytics agent on localhost using TCP port 25226
2731

28-
## Deploy the agent
32+
## Prerequisites
33+
34+
- You must have elevated permissions (sudo) on your designated Linux machine.
35+
- You must have python installed on the Linux machine.<br>Use the `python -version` command to check.
36+
- The Linux machine must not be connected to any Azure workspaces before you install the Log Analytics agent.
37+
38+
## Run the deployment script
2939

30-
1. In the Azure Sentinel portal, click **Data connectors** and select **Common Event Format (CEF)** and then **Open connector page**.
40+
1. From the Azure Sentinel navigation menu, click **Data connectors**. From the list of connectors, click the **Common Event Format (CEF)** tile, and then the **Open connector page** button on the lower right.
3141

32-
1. Under **Install and configure the Syslog agent**, select your machine type, either Azure, other cloud, or on-premises.
33-
> [!NOTE]
34-
> Because the script in the next step installs the Log Analytics agent and connects the machine to your Azure Sentinel workspace, make sure this machine is not connected to any other workspace.
35-
1. You must have elevated permissions (sudo) on your machine. Make sure that you have Python on your machine using the following command: `python –version`
42+
1. Under **1.2 Install the CEF collector on the Linux machine**, copy the link provided under **Run the following script to install and apply the CEF collector**, or from the text below:
43+
44+
`sudo wget https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/DataConnectors/CEF/cef_installer.py&&sudo python cef_installer.py [WorkspaceID] [Workspace Primary Key]`
3645

37-
1. Run the following script on your proxy machine.
38-
`sudo wget https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/DataConnectors/CEF/cef_installer.py&&sudo python cef_installer.py [WorkspaceID] [Workspace Primary Key]`
3946
1. While the script is running, check to make sure you don't get any error or warning messages.
4047

4148
Continue to [STEP 2: Configure your security solution to forward CEF messages](connect-cef-solution-config.md) .
4249

50+
## Deployment script explained
51+
52+
The following is a command-by-command description of the actions of the deployment script.
53+
54+
Choose a syslog daemon to see the appropriate description.
55+
56+
# [rsyslog daemon](#tab/rsyslog)
57+
58+
1. **Downloading and installing the Log Analytics agent:**
59+
60+
- Downloads the installation script for the Log Analytics (OMS) Linux agent<br>
61+
`wget https://raw.githubusercontent.com/Microsoft/OMS-Agent-for-Linux/master/installer/scripts/onboard_agent.sh`
62+
63+
- Installs the Log Analytics agent<br>
64+
`sh onboard_agent.sh -w [workspaceID] -s [Primary Key] -d opinsights.azure.com`
65+
66+
1. **Configuring the Syslog daemon:**
67+
68+
1. Opens port 514 for TCP communication using the syslog configuration file `/etc/rsyslog.conf`.
69+
70+
1. Configures the daemon to forward CEF messages to the Log Analytics agent on TCP port 25226, by inserting a special configuration file `security-config-omsagent.conf` into the syslog daemon directory `/etc/rsyslog.d/`.
71+
72+
Contents of the `security-config-omsagent.conf` file:
73+
74+
:rawmsg, regex, "CEF\|ASA" ~
75+
*.* @@127.0.0.1:25226
76+
77+
1. **Restarting the Syslog daemon**
78+
79+
`service rsyslog restart`
80+
81+
1. **Setting the Log Analytics agent configuration to listen on port 25226 and forward CEF messages to Azure Sentinel**
82+
83+
1. Downloads the configuration from the Log Analytics agent GitHub repository<br>
84+
`wget -o /etc/opt/microsoft/omsagent/[workspaceID]/conf/omsagent.d/security_events.conf https://raw.githubusercontent.com/microsoft/OMS-Agent-for-Linux/master/installer/conf/omsagent.d/security_events.conf`
85+
86+
87+
1. Restarts the Log Analytics agent<br>
88+
`/opt/microsoft/omsagent/bin/service_control restart [workspaceID]`
89+
90+
# [syslog-ng daemon](#tab/syslogng)
91+
92+
1. **Downloading and installing the Log Analytics agent:**
93+
94+
- Downloads the installation script for the Log Analytics (OMS) Linux agent<br>`wget https://raw.githubusercontent.com/Microsoft/OMS-Agent-for-Linux/master/installer/scripts/onboard_agent.sh`
95+
96+
- Installs the Log Analytics agent<br>`sh onboard_agent.sh -w [workspaceID] -s [Primary Key] -d opinsights.azure.com`
97+
98+
1. **Configuring the Syslog daemon:**
99+
100+
1. Opens port 514 for TCP communication using the syslog configuration file `/etc/syslog-ng/syslog-ng.conf`.
101+
102+
1. Configures the daemon to forward CEF messages to the Log Analytics agent on TCP port 25226, by inserting a special configuration file `security-config-omsagent.conf` into the syslog daemon directory `/etc/syslog-ng/conf.d/`.
103+
104+
Contents of the `security-config-omsagent.conf` file:
105+
106+
filter f_oms_filter {match(\"CEF\|ASA\" ) ;};
107+
destination oms_destination {tcp(\"127.0.0.1\" port("25226"));};
108+
log {source(s_src);filter(f_oms_filter);destination(oms_destination);};
109+
110+
1. **Restarting the Syslog daemon**
111+
112+
`service syslog-ng restart`
113+
114+
1. **Setting the Log Analytics agent configuration to listen on port 25226 and forward CEF messages to Azure Sentinel**
115+
116+
1. Downloads the configuration from the Log Analytics agent GitHub repository<br>
117+
`wget -o /etc/opt/microsoft/omsagent/[workspaceID]/conf/omsagent.d/security_events.conf https://raw.githubusercontent.com/microsoft/OMS-Agent-for-Linux/master/installer/conf/omsagent.d/security_events.conf`
118+
119+
120+
1. Restarts the Log Analytics agent<br>
121+
`/opt/microsoft/omsagent/bin/service_control restart [workspaceID]`
122+
123+
---
43124

44125
## Next steps
45-
In this document, you learned how to connect CEF appliances to Azure Sentinel. To learn more about Azure Sentinel, see the following articles:
126+
In this document, you learned how to deploy the Log Analytics agent to connect CEF appliances to Azure Sentinel. To learn more about Azure Sentinel, see the following articles:
46127
- Learn how to [get visibility into your data, and potential threats](quickstart-get-visibility.md).
47128
- Get started [detecting threats with Azure Sentinel](tutorial-detect-threats.md).
48129

0 commit comments

Comments
 (0)