Tuesday, June 30, 2015

Initial Setting CentOS 7 - Firewall and Selinux




FIREWALL

If the Firewall on the server is unnecessarry (for example, because some firewalls are allready running in your LAN ),
then stop it like follows.
If needs, refer to here to configure Firewalld.


[root@dlp ~]# 
systemctl stop firewalld 
[root@dlp ~]# 
systemctl disable firewalld 

rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
rm '/etc/systemd/system/basic.target.wants/firewalld.service'





SELINUX
If you'd like to disable SELinux (Security-Enhanced Linux), configure like follows.
[root@dlp ~]# 
vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=
disabled
# change


# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

[root@dlp ~]# reboot

0 comments:

Post a Comment