Linux/Unix Tutorial for Beginners for firewall command

Veröffentlicht am: 31 Mai 2019
auf dem Kanal: Coding GuruJi
566
5

This tutorial comprises of brief description with real time output of various options of the "firewall" command of UNIX.

The details about the various options are listed below :-
1.) The get-zones option lists the available zones in the firewall
firewall-cmd --get-zones
2.) The list-all option lists the details of the available zones
firewall-cmd --list-all
3.) The ---zone options lists or selects a particular zones
firewall-cmd --zone=external --list-all
4.) The set-default command sets the default zone in firewall.
firewall-cmd --set-default=external
5.) The add-service is used to add a service to a zone in firewall.
firewall-cmd --zone=external --add-service=samba

6.) The list-services is used to list the services attached to a particular zone.
sudo firewall-cmd --zone=external --list-services
7.) The firewall is restarted with the following command:-
firewall-cmd --reload
8.) The permanent option is used to make a change permanent.
firewall-cmd --permanent --zone=external --add-service=samba
9.) The remove-service is used to remove a service to a zone in firewall.
firewall-cmd --zone=external --remove-service=samba
10.) The add-port option is used to add a port to a zone.
firewall-cmd --permanent --zone=external --add-port=139/tcp

11.) To list the ports which are added to a zone we use list-ports option.
firewall-cmd --zone=external --list=ports
12.) The remove-port option is used to remove a port to a zone.
firewall-cmd --permanent --zone=external --remove-port=139/tcp
13.) Create a custom zone
firewall-cmd --permanent --new-zone=linuxconfig
14.) Associating a zone with an interface
firewall-cmd --permanent --zone=linuxconfig --add-interface=ens55
15.) To list the interfaces assigned to a zone
firewall-cmd --zone=linuxconfig --list-interfaces

16.) Removing a zone from an interface
firewall-cmd --remove-interface=ens55 --zone=linuxconfig
17.) Turn on panic mode
firewall-cmd --panic-on
18.) Turn off panic mode
firewall-cmd --panic-off
19.) To query panic mode status
firewall-cmd --query-panic


Auf dieser Seite können Sie das Online-Video Linux/Unix Tutorial for Beginners for firewall command mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Coding GuruJi 31 Mai 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 566 Mal angesehen und es wurde von 5 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!