WhileNetworking

  • Home
  • CCNA
  • Cisco Packet Tracer Download
    • Cisco packet tracer 6.3
    • cisco packet tracer 6.2
    • Cisco Packet Tracer 7
  • Linux Server Management
  • About Us
  • Privacy Policy
  • Contact Us

Firewall configuration in Linux (CentOS/Red Hat)

You are most welcome to this post.
firewall configuration
Really thanks to you for your interest in this topics. :)

Hope that you are enjoying Linux learning. So lets see, what is in todays post? Today I’m going to share about some knowledge about the configuration of Firewall in Linux (CentOS/Red Hat)

So lets start the firewall configuration:

Firewall configuration in Linux (CentOS/Red Hat)

At first we’ll log in as super user. (By “su-” or “su root”)

[ece@localhost Desktop]$ su –

Password:

Last login: Mon May 9 10:33:15 EDT 2016 on pts/1

 

just checked our firewal is working well or not.

 

[root@localhost ~]# systemctl enable firewalld

[root@localhost ~]# systemctl restart firewalld

[root@localhost ~]# systemctl status firewalld             ; =>> Recent status of firewall

So we got the output of the system:

 

  • firewalld.service – firewalld – dynamic firewall daemon

Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)

Active: active (running) since Tue 2016-05-10 00:22:22 EDT; 7s ago

Main PID: 4299 (firewalld)

CGroup: /system.slice/firewalld.service

└─4299 /usr/bin/python -Es /usr/sbin/firewalld –nof…

 

May 10 00:22:23 localhost.localdomain firewalld[4299]: 2016-05-…

May 10 00:22:23 localhost.localdomain firewalld[4299]: 2016-05-…

May 10 00:22:23 localhost.localdomain firewalld[4299]: 2016-05-…

May 10 00:22:23 localhost.localdomain firewalld[4299]: 2016-05-…

May 10 00:22:23 localhost.localdomain firewalld[4299]: 2016-05-…

May 10 00:22:23 localhost.localdomain firewalld[4299]: 2016-05-…

May 10 00:22:23 localhost.localdomain firewalld[4299]: 2016-05-…

May 10 00:22:23 localhost.localdomain firewalld[4299]: 2016-05-…

May 10 00:22:24 localhost.localdomain firewalld[4299]: 2016-05-…

May 10 00:22:24 localhost.localdomain firewalld[4299]: 2016-05-…

Hint: Some lines were ellipsized, use -l to show in full.

 

Now we’ll examine the status of IP table:

 

[root@localhost ~]# systemctl status iptables

 

  • iptables.service

Loaded: not-found (Reason: No such file or directory)

Active: inactive (dead)

 

[root@localhost ~]# systemctl mask iptables

 

Created symlink from /etc/systemd/system/iptables.service to /dev/null.

 

[root@localhost ~]# firewall-cmd –state

running

 

[root@localhost ~]# firewall-config

[root@localhost ~]# firewall-cmd –get-default-zone

public

 

[root@localhost ~]# firewall-cmd –permanent –zone=public –list-all

public (default)

interfaces:

sources:

services: dhcpv6-client ssh

ports: 53/tcp 80/tcp 53/udp

masquerade: no

forward-ports:

icmp-blocks:

rich rules:

 

[root@localhost ~]# firewall-cmd –zone=public –list-all

public (default)

interfaces:

sources:

services: dhcpv6-client ssh

ports: 80/tcp 53/udp 53/tcp

masquerade: no

forward-ports:

icmp-blocks:

rich rules:

 

[root@localhost ~]# firewall-cmd –set-default-zone public

Warning: ZONE_ALREADY_SET: public

[root@localhost ~]# firewall-cmd –set-default-zone public

Warning: ZONE_ALREADY_SET: public

[root@localhost ~]# echo ‘welcome to https’ > /var/www/html/index.html

[root@localhost ~]# firewall-cmd –permanent –zone=public –add-port 443/tcp

success

 

[root@localhost ~]# firewall-cmd –reload

success

[root@localhost ~]# firewall-cmd –permanent –zone=public –add-service=https

success

 

Finally we’ve reloaded firewall.

[root@localhost ~]# firewall-cmd –reload

success

[root@localhost ~]#

 

Screenshots:

Firewall configurattion in Linux (CentOS/Red Hat)

Firewall configurattion in Linux (CentOS/Red Hat)

Firewall configurattion in Linux (CentOS/Red Hat)

Firewall configurattion in Linux (CentOS/Red Hat)

 

So hope that you’ve learn some thing about the configuration of firewall in Linux (CentOS/Red Hat).

Jun 13, 2016Himadri
 

Share with friends :

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to email a link to a friend (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to print (Opens in new window)

Related

SSH configure in Linux (CentOS/Red Hat)Network file system (NFS) set up in Linux (CentOS/Red Hat)

Leave a Reply Cancel reply

five × 5 =

Himadri

Hi, I'm Himadri. I love blogging with tech topics, specially computer networking. We'll have more fun in the upcoming day. Stay with me. :)

June 13, 2016 16 Comments Linux installation and server managementfirewall configuration in centOS, firewall configuration in Linux, firewall configuration in red Hat308
Feel Free to Share :)
0
GooglePlus
0
Facebook
0
Twitter
0
Digg
0
Delicious
0
Stumbleupon
0
Linkedin
0
Pinterest
Find Us on Facebook
Choose a category !!
  • CCNA
  • Cisco Certification Exam
  • cisco packet tracer 6.2
  • Cisco packet tracer 6.3
  • Cisco Packet Tracer 7
  • Cisco Packet Tracer 7.1
  • Cisco Packet Tracer 7.2.1
  • Cisco Packet Tracer 7.3
  • Cyber Security
  • Engineering Ebooks
  • Excel
  • IELTS Ebook
  • Internet
  • Know computer
  • Know your computer
  • Laser Processing of Material
  • Linux installation and server management
  • PDF
  • Technology
  • Uncategorized
Top posts
  • Free download Principles of Electronics by VK Mehta
  • Free download Cisco Packet Tracer 7 for linux (64 bit)
  • Packet tracer 6.2 student version for Linux - Free download
Archieves
Get latest updates by Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 19 other subscribers
W
SC
wordpress counter
Analytics
Recent Comments
    Browse by categories
    Cyber SecurityLinux installation and server managementCCNAKnow your computerKnow computerCisco Packet Tracer 7UncategorizedCisco Certification ExamInternetPDFCisco Packet Tracer 7.3Engineering EbooksCisco packet tracer 6.3cisco packet tracer 6.2Cisco Packet Tracer 7.1TechnologyExcelLaser Processing of MaterialCisco Packet Tracer 7.2.1IELTS Ebook
    Feel free to contact with us

    Hi, any kind of comment or suggestion is valuable to us. So feel free to contact with us.

    Email: himadri.shekhar.bd@gmail.com

    Name: WhileNetworking.com

    2021 © WhileNetworking
     

    Loading Comments...