MSc Cybersecurity Dissertation Project โ Teesside University (CIS4055)
An integrated open-source network security system combining a firewall, intrusion detection, and real-time monitoring.
This project implements a multi-layered network security system that protects a web server using entirely open-source tools. It integrates:
- pfSense โ Next-generation firewall
- Suricata โ Intrusion Detection System (IDS)
- ELK Stack (Elasticsearch, Logstash, Kibana) โ Log management & visualization
- Filebeat โ Lightweight log shipper
- Apache2 on Ubuntu Server โ Web application hosting
The system provides real-time threat detection, centralized log management, and visual dashboards โ making it suitable for small-to-medium enterprises or educational environments.
Internet
โ
โผ
Router (Virgin Media Hub 3.0 โ Port Forwarding)
โ
โผ
Firewall (pfSense 2.7.0 โ VM on VirtualBox)
โ
โผ
Internal Network (192.168.1.0/24)
โ
โผ
Ubuntu Server 24.04 LTS (192.168.1.102)
โโโ Apache2 โ Web Application (theanugrah.com)
โโโ Suricata IDS โ Network Traffic Monitoring โ eve.json
โโโ Filebeat โ Ships Suricata logs โ Elasticsearch
โโโ Logstash โ Processes Apache2 access/error logs โ Elasticsearch
โโโ Elasticsearch โ Indexes & stores all logs (port 9200)
โโโ Kibana โ Visualization Dashboard (port 5601)
| Component | Tool | Version |
|---|---|---|
| Firewall | pfSense | 2.7.0 |
| OS | Ubuntu Server | 24.04 LTS |
| Web Server | Apache2 | Latest |
| IDS | Suricata | 7.0.3 |
| Log Shipper | Filebeat | 7.x |
| Log Pipeline | Logstash | 7.x |
| Search Engine | Elasticsearch | 7.x |
| Dashboard | Kibana | 7.x |
| Virtualisation | Oracle VirtualBox | Latest |
- Oracle VirtualBox installed on host machine
- pfSense ISO: https://www.pfsense.org
- Ubuntu Server ISO: https://ubuntu.com
Create two virtual networks in VirtualBox:
| Network Type | Name | IP Prefix |
|---|---|---|
| Host-only | VirtualBox Host-Only Ethernet Adapter | 192.168.1.100/24 |
| NAT Network | WAN-1 | 111.111.111.112/28 |
RAM: 4096 MB | CPU: 2 cores | Storage: 16 GB
Adapter 1: Bridged (WAN)
Adapter 2: Host-only (LAN)
After boot, configure LAN/WAN interfaces and access the web interface at 192.168.1.1
Default credentials: admin / pfsense (change immediately)
Firewall Rules:
- Block private networks (RFC 1918)
- Block bogon networks
- NAT Port Forward: WAN:80 โ 192.168.1.102:80 (Ubuntu web server)
RAM: 4096 MB | Storage: 25 GB
Adapter: Host-only (Internal Network)
Username: webserver | Password: webserver
IP Address: 192.168.1.102
Initial Setup:
sudo apt update
ip a # Verify IP is 192.168.1.102sudo apt install apache2 -y
sudo systemctl start apache2
sudo systemctl enable apache2Web App Directory: /var/www/webapp/
Config File: /etc/apache2/sites-enabled/test.project.final.conf
# Disable default site and enable your own
sudo a2dissite 000-default.conf
sudo a2ensite test.project.final.conf
sudo systemctl reload apache2UFW Firewall on Ubuntu:
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo ufw enableInstall Java first:
sudo apt install openjdk-11-jdk -yInstall Elasticsearch:
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
sudo apt install elasticsearch -y
sudo systemctl enable elasticsearch && sudo systemctl start elasticsearchKey config in /etc/elasticsearch/elasticsearch.yml:
network.host: 192.168.1.102
http.port: 9200
discovery.type: single-nodeInstall Logstash:
sudo apt install logstash -yConfig in /etc/logstash/conf.d/webapp-log.conf โ reads Apache2 access/error logs and ships to Elasticsearch.
Install Kibana:
sudo apt install kibana -yKey config in /etc/kibana/kibana.yml:
server.port: 5601
server.host: "192.168.1.102"
elasticsearch.hosts: ["http://192.168.1.102:9200"]Access Kibana at: http://192.168.1.102:5601
sudo add-apt-repository ppa:oisf/suricata-stable
sudo apt-get install suricata -y
sudo systemctl enable suricata && sudo systemctl start suricataKey config in /etc/suricata/suricata.yaml:
af-packet:
- interface: enp0s3Logs saved to: /var/log/suricata/eve.json
sudo apt-get install filebeat -yKey config in /etc/filebeat/filebeat.yml:
filebeat.inputs:
- type: log
enabled: true
paths:
- /var/log/suricata/eve.json
output.elasticsearch:
hosts: ["http://192.168.1.102:9200"]
setup.kibana:
host: "http://192.168.1.102:5601"sudo filebeat setup --index-management -E output.logstash.enabled=false \
-E 'output.elasticsearch.hosts=["http://192.168.1.102:9200"]'
sudo systemctl enable filebeat && sudo systemctl start filebeatDomain registered via GoDaddy: theanugrah.com
| Type | Name | Data |
|---|---|---|
| A | @ | Your Public IP |
| CNAME | www | theanugrah.com |
sudo systemctl status apache2
sudo systemctl status elasticsearch
sudo systemctl status logstash
sudo systemctl status kibana
sudo systemctl status suricata
sudo systemctl status filebeat# Apache2 access logs
cat /var/www/webapp/logs/access.log
# Apache2 error logs
cat /var/www/webapp/logs/error.log
# Suricata network logs
sudo nano /var/log/suricata/eve.json
# Filebeat logs
sudo less /var/log/filebeat/filebeat.log- Go to Kibana โ Management โ Index Patterns
- Create pattern:
webapp-logs-*(Apache2 logs via Logstash) - Create pattern:
filebeat-*(Suricata logs via Filebeat) - Set time field:
@timestamp
| Dashboard | Index Pattern | Data Source |
|---|---|---|
| Web App Logs | webapp-logs-* |
Apache2 via Logstash |
| Network Monitoring | filebeat-* |
Suricata via Filebeat |
The Kibana interface enables filtering by IP address, error codes, attack patterns, and time range for real-time threat analysis.
- DNS Propagation Delay โ Updates to DNS records take time; frequent server restarts worsen availability.
- Integration Complexity โ Multiple tools require careful configuration alignment and technical expertise.
- No Firewall Log Monitoring โ pfSense logs are not yet piped into ELK (planned for future).
- Firewall Log Monitoring โ Pipe pfSense logs into Kibana for complete perimeter visibility
- ML/AI Integration โ Anomaly detection algorithms for advanced threat identification
- SOAR Automation โ Auto-respond to detected threats in real-time
- Cloud Integration โ Extend monitoring to AWS Security Hub / Azure Security Centre
Anugrah Kizhakke Veedu
MSc Cybersecurity โ Teesside University
Module: CIS4055 Computing Masters Project
Supervisor: Harry Stewart
This project was developed as part of an academic dissertation at Teesside University. All tools used are open-source.
- pfSense: https://www.pfsense.org
- Ubuntu Server: https://ubuntu.com
- Elastic Stack: https://www.elastic.co
- Suricata IDS: https://suricata.io
- Oracle VirtualBox: https://www.virtualbox.org