UFW is a simple firewall
I use for the servers, but not the main desktop.
Install ufw & its gui (usually existing, but doesn’t hurt)
sudo apt install ufw && sudo apt install gufw
Allow LAN traffic
sudo ufw allow to 192.168.0.0/16 && \
sudo ufw allow from 192.168.0.0/16
Allow syncthing connections, if installed
sudo ufw allow syncthing
Setup the global permissions
sudo ufw default deny incoming && sudo ufw default allow outgoing
Finally, AFTER THE ABOVE SO YOU DON’T GET LOCKED OUT enable firewall
sudo ufw enable
Check that it’s working
sudo ufw status verbose
If you need IPv6 - open config and change IPv6 to “yes”
sudo nano /etc/default/ufw