How to Enable / Disable, Firewall / SELinux ?

What is Firewall ?

Firewall (IPTables): IPTables is software based firewall that provides protection between your server and damaging content on the Internet or network. It will try to guard your server against both malicious users and software such as viruses / worms.


How to disable IPTables ?

You must be a Root user.

#service iptables save (Will save your existing IPTable Rules)
#service iptables stop (It will disable firewall Temporarly)

To Disable it Permanentely:

#chkconfig iptables off


To Enable it again:

#service iptables start (It will enable firewall Temporarly)


To enable it Permanentely:

#chkconfig iptables on


You can also use;

#system-config-securitylevel
#system-config-securitylevel-tui



Apply & "Ok".


SELinux : Also known as Security-Enhanced Linux, implements various security policies on Linux and additional levels of access crontrol.


To disable SELinux,

edit file "/etc/selinux/config" and find line;

SELINUX=enforcing

Now replace it with,

SELINUX=disabled

Now if you save & reboot your machine, it'll be disabled but if you dont want to reboot it now then, you can use following command;

#setenforce 0

This will put SELinux in to the "Permissive mode", means it will run & log your whole session till next reboot, but will not controll the permission or you can say access.

You can also use;

#system-config-securitylevel
#system-config-securitylevel-tui



Apply & "Ok".

Comments

  1. Hi, where did you get this information can you please support this with some proof or you may say some good reference as I and others will really appreciate.
    data recovery Chicago il

    ReplyDelete

Post a Comment

Popular posts from this blog

Recover or restore initramfs file in RHEL or CentOS 7

Space reclamation / UNMAP on RHEL or CentOS 7

How to recover /boot partition on RHEL or CentOS 7?