You can view installation guide guide on 3ilson.org YouTube Channel.
- Ubuntu Server v18.04+
- pfSense v2.4.4+ or OPNsense 19.7.4+
- The following was tested with Java v12 and Elastic Stack v7.4
sudo add-apt-repository ppa:linuxuprising/java
sudo add-apt-repository ppa:maxmind/ppa
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update
sudo apt-get install oracle-java12-installer
sudo apt install geoipupdate
sudo nano /etc/GeoIP.conf
- Append line 25 as follows:
EditionIDs GeoLite2-City GeoLite2-Country GeoLite2-ASN
sudo geoipupdate
sudo nano /etc/cron.weekly/geoipupdate
- Add the following and save/exit
00 17 * * 0 geoipupdate
- Elasticsearch v7+ | Kibana v7+ | Logstash v7+
sudo apt-get install elasticsearch && sudo apt-get install kibana && sudo apt-get install logstash
sudo nano /etc/kibana/kibana.yml
- server.port: 5601
- server.host: "0.0.0.0"
cd /etc/logstash/conf.d
sudo wget https://raw.githubusercontent.com/a3ilson/pfelk/master/conf.d/01-inputs.conf
sudo wget https://raw.githubusercontent.com/a3ilson/pfelk/master/conf.d/05-syslog.conf
sudo wget https://raw.githubusercontent.com/a3ilson/pfelk/master/conf.d/10-pf.conf
sudo wget https://raw.githubusercontent.com/a3ilson/pfelk/master/conf.d/11-firewall.conf
sudo wget https://raw.githubusercontent.com/a3ilson/pfelk/master/conf.d/50-outputs.conf
sudo wget https://raw.githubusercontent.com/a3ilson/pfelk/master/conf.d/12-suricata.conf
sudo wget https://raw.githubusercontent.com/a3ilson/pfelk/master/conf.d/13-snort.conf
sudo wget https://raw.githubusercontent.com/a3ilson/pfelk/master/conf.d/15-others.conf
sudo mkdir /etc/logstash/conf.d/patterns
cd /etc/logstash/conf.d/patterns/
sudo wget https://raw.githubusercontent.com/a3ilson/pfelk/master/conf.d/patterns/pf-09.2019.grok
sudo nano /etc/logstash/conf.d/05-syslog.conf
Change line 3; the "if [host]..." should point to your pf IP address
Change line 9 to point to your second PF IP address or ignore
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo /bin/systemctl enable kibana.service
sudo /bin/systemctl enable logstash.service
systemctl start elasticsearch
systemctl start kibana
systemctl start logstash
systemctl status elasticsearch.service
systemctl status kibana.service
systemctl status logstash.service
cat/nano/vi the files within this location to view Logstash logs
If this helped, feel free to donate a drink: