Analyzing Dropped Traffic Logs in Linux
In this lesson, you will learn how to configure logging for dropped traffic with iptables. We'll start by installing the nginx package, which is an easy web server which only requires one command to start, then you'll configure your logging rules, next you'll generate traffic that will get blocked be iptables, then we'll allow the traffic in iptables so you can access the nginx web server from your host computer.
Step 1: Configure logging (if you haven't already)
In the best practices lesson, we briefly mentioned that you should be logging all dropped traffic. You can quickly tell if iptables is configured to log by running the iptables -L command and looking for an entry like so on bot INPUT AND OUTPUT chains:
If you don't see output like that, you can add those rules here:
Step 2: Installing Nginx on Ubuntu Server
First, install Nginx on your Ubuntu Server VM. Nginx is a popular web server that can serve web pages to clients.
After the installation, ensure that Nginx is running:
systemctl status nginx
Before we move on to the next steps which will be completed on our host computer, let's start tailing our iptables logs which (on Ubuntu), will be located in /var/log/syslog:
sudo tail -f /var/log/syslog |…
No comments yet. Add the first comment to start the discussion.