ePO can forward received threat events directly to a
syslog server, which is defined in ePO as a Registered Server. This article guides you through setting up a
syslog environment for use in testing.
NOTE: This article isn't intended for troubleshooting issues when forwarding events to an existing
syslog server. Instead, the aim is to help in setting up a simple, free
syslog environment for testing and evaluation purposes.
Prerequisites
Before you begin, you must have ePO 5.9.0 or later installed.
The following software is needed:
- A hypervisor capable of running the virtual machine, such as VMWare Player or VirtualBox.
- Bitnami Elk Stack: A bundled implementation of three syslog components, delivered as a virtual machine (VM).
NOTE: At the time of writing this article (July 2023), the current version of Bitnami is 8.8.2-0.
- Deploying and configuring the Bitnami ELK VM:
Download and deploy the VM:
- Download the Bitnami Elk Stack VM, and deploy it in your environment.
- Power on the VM.
- On the logon screen, the username and randomly generated password for the default Kibana user is displayed. Make a note of the password, as it's needed later (unless you decide to change it during the installation).
- By default, the IP address is set via DHCP. Make a note of the IP address that's displayed on the logon screen.
- Log on to the VM using the default username bitnami. The password is bitnami.
- You're prompted to choose a new password for the bitnami user. Choose a secure password.
Optional steps:
Although you don't need to perform these steps, they can make things simpler if you need to edit or troubleshoot the
syslog VM.
Optional step 1 - Enable root logon and
ssh access
- To enable root logon, run the following command and press Enter, and confirm a new secure password:
sudo passwd root
- To enable ssh, run the following commands:
sudo rm -f /etc/ssh/sshd_not_to_be_run
sudo systemctl enable ssh
sudo systemctl start ssh
- Enable root ssh access:
- Edit /etc/ssh/sshd_config:
sudo nano /etc/ssh/sshd_config
- Locate the line that starts with PermitRootLogin.
- Change no to yes. The final line should read as follows:
PermitRootLogin yes
- Locate the line that starts with PasswordAuthentication, and change no to yes.
- Locate the line that starts with ChallengeResponseAuthentication, and again change no to yes.
- Save the file.
- To restart the ssh server, run the following command:
sudo systemctl restart ssh
Optional step 2 - Change the host name
The default host name for the VM is
debian.
- Edit /etc/hostname, and update it with the required host name.
- Edit /etc/hosts, and update it with the required host name for the 127.0.0.1 entries.
- To restart the VM and apply the changes, run the following command:
sudo shutdown -r now
- Create a self-signed certificate:
To use a
syslog receiver with ePO, it's required to use TCP and TLS. For this article, we create and use a self-signed certificate.
- Log back into the VM using the bitnami user.
- Run the following commands:
sudo mkdir /opt/bitnami/logstash/ssl
cd /opt/bitnami/logstash/ssl
sudo openssl req -x509 -days 3650 -nodes -newkey rsa:2048 -keyout logstash-remote.key -out logstash-remote.crt
- When prompted, enter the details for the certificate. Set the common name to the fully qualified domain name (FQDN) of the VM.
- To change the permissions on the key file and allow logstash to read it, type the following command:
sudo chmod 644 logstash-remote.key
- Configure the syslog receiver (logstash):
- Edit the file /opt/bitnami/logstash/pipeline/logstash.conf.
- Edit the tcp section as follows:
ssl_cert => "/opt/bitnami/logstash/ssl/logstash-remote.crt"
ssl_key => "/opt/bitnami/logstash/ssl/logstash-remote.key"
- Edit the output section as follows:
output {
elasticsearch {
hosts => ["127.0.0.1:9200"]
document_id => "%{LOGSTASH_CHECKSUM}"
index => "eposyslog-%{+YYYY.MM.dd}"
}
}
- Save the file.
- Edit the nftables firewall config file to allow inbound connections to port 6514:
sudo nano /etc/nftables.conf
- Locate the line that starts with tcp dport and add 6514 to the list of ports. The final line should read as follows:
tcp dport { 22, 80, 443, 6514 } accept
- Save the file.
- Run the following command to restart the firewall:
sudo systemctl restart nftables.service
Optional step 3 - Modify the default user's password
- As mentioned previously, when you install the VM, it's configured with a random password for the default user account. If you want to change the password, run the following command:
sudo /opt/bitnami/apache2/bin/htpasswd -c /opt/bitnami/kibana/config/password user
- Enter a new password when prompted.
- To restart logstash, type the following command:
sudo /opt/bitnami/ctlscript.sh restart logstash
Completing the install:
Finally, run the following command to restart the VM once again:
sudo shutdown -r now
You now have a functioning
syslog server that ePO can use.
- Configure ePO to use the new server:
- Log on to the ePO console.
- Navigate to Menu, Configuration, Registered Servers.
- Click New Server.
- From the Server type menu on the Description page, select Syslog Server.
- Specify a unique name and any details, and then click Next.
- From the Registered Server Builder page, configure the following settings:
- Server name - Enter the IP address of the syslog server.
- TCP port number - Enter 6514.
- Enable event forwarding - This option enables event forwarding from the Agent Handler to this syslog server.
- Click Test Connection. This action verifies the connection to your syslog server. You now see the following message:
Syslog connection success
- Click Save.
- You can now access the syslog server using a web browser.
- Enter the IP address noted in Step A into the browser URL.
- You're prompted to log on. Use the default user for the username and the random password noted in step A.
NOTE: If you've reset the password in optional step 3, make sure that you use that password, and not the random one noted at the start.
The Elastic homepage is displayed with the Start by adding integrations dialog box.
- Click the Explore on my own link.
- Click the menu icon at the top-left corner, scroll down, and select Stack Management.
- Under Data, select Index Management. On the Indices tab, you should see at least one index called eposyslog-<date>
Here, <date> is the current date.
- Under Kibana, select Data Views. Click Create Data View.
- Configure the data view:
- Enter a name. For example, ePO Syslog.
- In the Index Pattern field, enter eposyslog*
- In the Timestamp field, select @timestamp.
- Click Save data view to kibana.
- To view the received syslog events, from the menu at the top-left corner, select Discover.
You now see at least one event displayed with the following message:
If you can see this, ePO has successfully tested the connection to your syslog receiver.
You have now configured a
syslog environment for use with ePO.