August 20, 2024
For this challenge we’ve been tasked with migrating systems to use the nftables firewall. We will need to enable the service, configure the rules, and enable logging on the Domain Controller.
To clear the iptables policies we’ll run the following commands (as root):
Uninstall iptables
Repeat these steps for the Fileshare host.
First, we need to install nftables
Then we’ll start and enable the service
Note: When installing nftables on the Fileshare machine it installs it as an init.d package. We’ll need to move the daemon from /etc/init.d/ to /etc/systemd/system/
We can view the iptables rules by reading the file on the desktop
Current iptables rulesTo create the rules in nftables we’ll need to create a table and chain.
To create the table run the command:
To create the chain:
To create rules in nftables the command syntax is:
We need to allow HTTP, HTTPS, and SSH traffic, so our rules will be:
We can use the sudo nft list ruleset command to list the current rules.
sudo nft list ruleset
To load these rules whenever the system reboots / the nftables service restarts we’ll need to add them to the configuration file.
Repeat these steps for the Fileshare machine.
Note: Remove the default rules that were created on the Fileshare machine, and add the chain policies for FORWARD and OUPUT.
We’ll start by running the installer on the DC’s Desktop.
Once complete, we’ll open Syslog Watcher and navigate Export to Files under the Settings window.
We need to set the criteria to Warning or higherSetting the appropriate criteria for the logged alerts
Lastly, we’ll set the log destination to the Documents\Logs directory and set the encoding to UTF-8.
Previous post
Next post