Set intruders on fire with firewalld and firewall-config GUI

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
alamahant
Posts: 42
Joined: Thu Dec 19, 2019 9:48 pm

Set intruders on fire with firewalld and firewall-config GUI

#1 Post by alamahant »

MX being Debian in nature ships with Uncomplicated Fire Wall (ufw) as the default firewall.
However there are better alternatives namely firewalld.
Firewalld is a front to Iptables and has a lot of functionality such as services,ports,zones,port-forwarding etc.
To install it run

Code: Select all

systemctl disable ufw OR ###for sysvinit
update-rc.d ufw disable
apt update && apt install firewalld firewall-config
After installing thus both firewalld and its control GUI
You will be able to open services and ports on your firewall (and many many other things)
Either manually by using
firewall-cmd
OR via the GUI which is named "Firewall" in xfce search.
Some examples:

Code: Select all


firewall-cmd --add-service="ssh" --permanent ####ADD THE SSH SERVICE
firewall-cmd --add-port=22/tcp --permanent ###ADD THE SSH SERVICE BY SPECIFYING ITS PORT NUMBER
firewall-cmd --reload  #####ALWAYS RUN THIS AFTER ADDING SERVICES OR PORTS TO THE FIREWALL TO MAKE THEM PERSISTENT
firewall-cmd --get -services ####TO GET ALL THE AVAILABLE SERVICES
firewall-cmd --get-default ####TO GET THE DEFAULT OPERATIONAL ZONE
firewall-cmd set-default <desired-zone> --permanent  ###TO SET THE DEFAULT ZONE

BUT you can also use the GUI which is much easier.
CAVEAT:After installing a new daemon or service remember to ALWAYS open its port n firewalld OR it may NOT FUNCTION properly
Have fun with firewalld
...and burn all the "freaking" intruders off.
IF you find opening ports and allowing services too much of a headache for you then disable firewalld and RE-ENABLE ufw.

;) ;) ;)

User avatar
handy
Posts: 614
Joined: Mon Apr 23, 2018 2:00 pm

Re: Set intruders on fire with firewalld and firewall-config GUI

#2 Post by handy »

Some of us use VPN's whenever we are on the internet (or whenever our computers boot up) & they replace our iptables config with one of their own that (among other things) locks down internet communications both in & out IF our encrypted VPN looses connection to one of its nodes. (AirVPN does this.)

This is another way to help burn all the "freaking" intruders off. ;) As well as help throw them off your tail re. IP tracking.
MSI: MAG B560 TORP', i5, RAM 16GB, GTX 1070 Ti 12GB, M2 238GB + USB, MX-23 Fb to Openbx
Lenovo: Ideapad 520S, i5, RAM 8GB, GPU i620, HDD 1TB, MX-23 Fb - Openbx
Clevo: P150SM-A, i7, RAM 16GB, nVidia 8600, 2x 1TB HDD & M.2 256 GB, MX-23 Fb - Openbx

Post Reply

Return to “Tips & Tricks by users”