MX 23 - Uncomplicated Firewall Configuration

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
FullScale4Me
Posts: 1185
Joined: Fri Jan 08, 2021 11:30 pm

MX 23 - Uncomplicated Firewall Configuration

#1 Post by FullScale4Me »

I wrote the firewall section for the MX21 ---> MX23 update of the MX User Manual. A continuation of the improvement of the Firewall documentation (MX User Manual section 4.5.1) is presented here.

PDF format - 4.5.1 Firewall Configuration https://fullscale4me.com/uncomplicated-firewall.pdf

Pasted below is the current (Updated: November 05, 2023) version.

4.5.1 Firewall Configuration

The "Firewall Configuration" is a GUI app used for the configuration of the "Uncomplicated Firewall", aka UFW. This makes it a simple task for novice users to configure their firewall.

This GUI app (gufw) is installed by default in Xfce and Fluxbox only. KDE users can search in MXPI for the package named ‘gufw’ to get the same "Firewall Configuration" app.

In MX Linux 23, the Firewall is enabled and set to ignore all Incoming connections. This may prevent discovery of printers and some popular applications from working correctly. Programs may wait a long time to connect and never do so, or give an error message. Some of these error messages are not very clear.

Printing via CUPS
Use the Firewall Configuration app and add the "Preconfigured" rule "CUPS". This adds a rule for port 631 for both TCP and UDP. Some printer drivers may use ports 139 & 445 over TCP.

Samba - file sharing
Samba uses just port 445 with the TCP protocol for the latest versions of Windows. To configure a "Simple" rule run the “Firewall Configuration” app:

• Click the Rules button and then +.
• Click the Simple tab.
• In Name: type “Samba – 445”.
• In the Protocol; select TCP. In Port: type “445”.
• Click the “ Add” button and then Close.

Image

Example of adding 'simple' a firewall exception rule for Samba – 445.

Samba Note: There are many other guides that show more ports being opened. They are for older versions of Samba and should NOT be used. Newer devices use SMB2 & SMB3. Enabling the additional port ranges as stated in those guides *MAY* result in data loss, Ransomware, Malware, and or privacy issues.

Common Firewall Port usage

* Avahi 5353 UDP (common mDNS provider). Preconfigured rule: "PLEX Avahi discovery".
CIFS (Common Internet File System) UDP ports 137 and 138, and TCP ports 139 and 445. †
* CUPS IPP/PPS printing 631 TCP More - https://www.cups.org/doc/firewalls.html
AppSocket/JetDirect printing 9100-9102 TCP
DNS 53 both
* DropBox TCP 90. 443, 17600 & 17601 (3rd pty file apps). TCP 17500 LAN Sync feature
Duckto 4644
* FTP 20 & 21
Hplip 5353 UDP
* KDE Connect - port range 1714-1764 for UDP and TCP
LocalSend 53317 TCP & UDP
* IRC 6697 (IRC SSL)
* mDNS 5353 UDP DNS Lookup. Preconfigured rule: "Multicast DNS" See also: Avahi.
* NFS 111 & 2049 TCP & UDP
* NTP/SNTP 123
OpenVPN 1194 TCP & UDP
Printing & SMB Printer sharing – see CUPS above.
Plex Media Server TCP: 32400
Remote Desktop 3389
* Samba (pre 2012 devices - SMB1/NT1) UDP ports 137 & 138; TCP ports 135, 137. 139 & 445. †
Samba modern: SMB version 2 & SMB version 3 implementations TCP port 445
Scrcpy 5555 TCP
SMB Printing see CUPS above.
Spotify uses port 4070 TCP by default. If it is unable to connect on that port, it will roll to port 443, then port 80
* SSH 22
Syncthing 22000 TCP & UDP - host-to-host 9806
* Teamviewer TCP/UDP 5938, TCP 443, TCP 80
*Transmission 51413.
* VNC 5500/5900/5901 both.
Warpinator 42000 and 42001 Flatpack adds 5353 UDP
Wormhole/Magic Wormhole connection to ‘Mailbox’ aka Rendezvous Server 4000 & 4001
WSDD port 5357 TCP and port 3702 UDP - Add two "Simple" type rules.

* = Use the "Preconfigured" application rule for these common devices.
† = Enabling the above additional port ranges *MAY* result in data loss, Ransomware, Malware (such as WannaCry), and or privacy issues. TCP on ports 136 and 138 no longer implemented.
‡ = The printer connection, if connected to via Samba (default for a shared printer) *may* require opening port 445 on TCP on PCs not hosting the printer connection.

More ports https://www.linuxtrainingacademy.com/ports/


Please direct ALL support requests to the MX Linux Forum -- https://forum.mxlinux.org

Created by: FullScale4Me: June, 2023 Updated: November 05, 2023
Michael O'Toole
MX Linux facebook group moderator
Dell OptiPlex 7050 i7-7700, MX Linux 23 Xfce & Win 11 Pro
HP Pavilion P2-1394 i3-2120T, MX Linux 23 Xfce & Win 10 Home
Dell Inspiron N7010 Intel Core i5 M 460, MX Linux 23 Xfce & KDE, Win 10

User avatar
Jerry3904
Administrator
Posts: 23609
Joined: Wed Jul 19, 2006 6:13 am

Re: MX 23 - Uncomplicated Firewall Configuration

#2 Post by Jerry3904 »

Very impressive and clear, thanks!

We've got to think about how to handle the very good tip docs we have received.
Production: MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: MX-25 Fluxbox, ThinkPad X1 Carbon gen 9 with i7
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

Post Reply

Return to “Tips & Tricks by users (not for help)”