This repository has been archived by the owner on Apr 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 521
ProductionDeployment
Doug Burks edited this page Jan 28, 2016
·
61 revisions
- First, check the Hardware Requirements page.
- Download the ISO image for your preferred flavor of Ubuntu 14.04 32-bit/64-bit or download our Security Onion ISO image using the instructions here. Also download/record the MD5/SHA1 checksums for the ISO image and verify the checksum when the download has completed.
- If deploying a distributed environment (a master server and one or more slave sensors), you’ll need to perform the remaining steps on the server and all sensors, but make sure you install/configure the master server first. For best performance, the master server should be dedicated to just being a server for the other sensor boxes (the master server should have no sniffing interfaces of its own). Please note that sensors need to connect to the master server on ports 22 and 7736. If you choose to enable salt for sensor management, they will also need to be able to connect to the master server on ports 4505 and 4506.
- Using the downloaded ISO, install the operating system. If prompted with an "encrypt home folder" option, DO NOT enable this feature. If asked about automatic updates, DO NOT enable automatic updates. If prompted to install any additional packages, the only option you should choose is OpenSSH Server (openssh-server). Specifically, do NOT choose MySQL. All other required dependencies will be installed automatically.
- When asked about partitioning, there are a few things to keep in mind:
- If you have more than 2TB of disk space, you will probably want to create a dedicated `/boot` partition at the beginning of the disk to ensure that you don’t have any Grub booting issues. Choosing the LVM option should do this automatically.
- The Sguil database on the server (doesn’t exist on sensor-only installations) can grow fairly large (100GB or more for decent-size networks). It’s stored at `/var/lib/mysql/`, so you may want to put /var on a dedicated partition/disk and assign a good amount of disk space to it. Also see the `DAYSTOKEEP` instructions on the [Post-Installation page](https://github.com/Security-Onion-Solutions/security-onion/wiki/PostInstallation).
- Sensors store full packet captures at `/nsm/sensor_data/`, so you may want to put `/nsm` on a dedicated partition/disk and assign as much disk space as possible (1TB or more). For larger volumes you might also consider using XFS for the `/nsm` partition.
echo "debconf debconf/frontend select noninteractive" | sudo debconf-set-selections
sudo apt-get -y install python-software-properties
sudo add-apt-repository -y ppa:securityonion/stable
sudo apt-get update
sudo apt-get -y install securityonion-all syslog-ng-core
sudo apt-get -y install securityonion-onionsalt
- When prompted whether you would like to configure `/etc/network/interfaces` now, choose “Yes, configure /etc/network/interfaces!.”
- If you have more than one network interface, you’ll be asked which to specify which one should be the management interface.
- You’ll then be asked to choose DHCP or static addressing for the management interface. It is highly recommended you choose static.
- Choosing static, you’ll be prompted to enter a static IP address for your management interface, the network’s subnet mask, gateway IP address, DNS server IP addresses (separated by spaces), and your local domain.
- You’ll then be prompted to select any additional interfaces that will be used for sniffing/monitoring network traffic.
- When prompted, choose “Yes, make changes!"
- If you need to adjust any network settings manually (e.g. `MTU`), you may edit `/etc/network/interfaces` before rebooting.
- When ready to reboot, click "Yes, reboot!”
* Standalone
* You will be prompted to specify which IDS Engine (Snort or Suricata) you would like to use.
* If you have multiple CPU cores available:
* You will be prompted to designate how many IDS processes you would like to run. (This setting can be modified later by changing the `IDS_LB_PROCS` variable in `/etc/nsm/$HOSTNAME-$INTERFACE/sensor.conf`).
* You will be prompted to designate how many Bro processes you would like to run. (This setting can be modified later by changing the `lb_procs` variable in `/opt/bro/etc/node.cfg`).
* You’ll be asked which IDS ruleset you would like to use.
* You will then be prompted for user account information for Sguil, Squert, and ELSA.
* You’ll be prompted to proceed with making the changes to setup Security Onion.
* Server
* You will be prompted to specify which IDS Engine (Snort or Suricata) you would like to use.
* You’ll be asked which IDS ruleset you would like to use.
* You will then be prompted for user account information for Sguil, Squert, ELSA and Snorby.
* You’ll be prompted to proceed with making the changes to setup Security Onion.
* Sensor
* You will be prompted for an SSH account on the master server that has sudo privileges. (Note: the management interface on the sensor must be able to SSH to the management interface on the server, so please make sure that your server has been set up and you have network connectivity and no firewall rules that would block this traffic.) Consider creating a separate SSH account on the master server for each sensor so that if a sensor is ever compromised, its individual account can be disabled without affecting the other sensors. To do this, create a new user using the `sudo adduser $user` command (replacing $user with the actual username). (The new account must have a full home directory. If you do not create it when you create the account, copy `/etc/skel` to `/home/$user` and do `chown -R $user:$user /home/$user`. This is needed so the .ssh directory may be created to manage the connection.) Then add the new user to the sudo group with the `sudo adduser $user sudo` command. Once Setup is complete, the user can be removed from the sudo group with the `sudo deluser $user sudo` command . For example, suppose you’re setting up a server and two separate sensors and you want to use sensor1 as the SSH username for the first sensor and sensor2 as the SSH username for the second sensor (these are just examples, you should replace sensor1 and sensor2 with your own usernames):
- SERVER
- run through sosetup, choosing Production Mode and choosing Server only (no sniffing)
- run through sosetup, choosing Production Mode and choosing Server only (no sniffing)
- FIRST SENSOR - username sensor1
- create an account on the SERVER called sensor1 using the `sudo adduser sensor1` command
- add the new account to the sudo group using the `sudo adduser sensor1 sudo` command
- run through sosetup on the SENSOR
- on the SERVER, remove the account from the sudo group, but leave the account active using the `sudo deluser sensor1 sudo` command
- create an account on the SERVER called sensor1 using the `sudo adduser sensor1` command
- SECOND SENSOR - username sensor2
- create a second account on the SERVER and add it to the sudo group using the `sudo adduser sensor2` command
- add the new account to the sudo group using the `sudo adduser sensor2 sudo` command
- run through SETUP on the second SENSOR
- on the SERVER, remove the account from the sudo group, but leave the account active using the `sudo deluser sensor2 sudo` command
- create a second account on the SERVER and add it to the sudo group using the `sudo adduser sensor2` command
- You will be prompted to designate how many IDS processes you would like to run. (This setting can be modified later by changing the `IDS_LB_PROCS` variable in `/etc/nsm/$HOSTNAME-$INTERFACE/sensor.conf`).
- You will be prompted to designate how many Bro processes you would like to run. (This setting can be modified later by changing the `lb_procs` variable in `/opt/bro/etc/node.cfg`).
Proceed to PostInstallation.
- Introduction
- Use Cases
- Hardware Requirements
- Release Notes
- Download/Install
- Booting Issues
- After Installation
- UTC and Time Zones
- Services
- VirtualBox Walkthrough
- VMWare Walkthrough
- Videos
- Architecture
- Cheat Sheet
- Conference
- Elastic Stack
- Elastic Architecture
- Elasticsearch
- Logstash
- Kibana
- ElastAlert
- Curator
- FreqServer
- DomainStats
- Docker
- Redis
- Data Fields
- Beats
- Pre-Releases
- ELSA to Elastic
- Network Configuration
- Proxy Configuration
- Firewall/Hardening
- Email Configuration
- Integrating with other systems
- Changing IP Addresses
- NTP
- Managing Alerts
- Managing Rules
- Adding Local Rules
- Disabling Processes
- Filtering with BPF
- Adjusting PF_RING for traffic
- MySQL Tuning
- Adding a new disk
- High Performance Tuning
- Trimming PCAPs