OS Firewall and Performance Tweaks

Ubuntu OS setup

Table of contents

  1. Enable UFW firewall
  2. Make performance tweaks

Do

Enable UFW firewall

Apply UFW settings:

sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow from 192.168.0.0/24
sudo ufw allow 80
sudo ufw allow 443

Activate UFW using the command:

sudo ufw enable

Check UFW status

sudo ufw status

Make performance tweaks

This is based on Anand’s OS setup guide at Ultimate Docker Server: Getting Started with OS Preparation Part 1.

These are system configuration tweaks to enhance the performance and handling of large lists of files (e.g. Plex/Jellyfin metadata).

Edit /etc/sysctl.conf using the following command:

sudo nano /etc/sysctl.conf

Add the following 3 lines at the end of the file:

vm.swappiness=10
vm.vfs_cache_pressure=50
fs.inotify.max_user_watches=262144