November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

CentOS / RHEL 7 : How to switch to iptables from firewalld

Question : How to disable firewalld and enable iptables instead?

Answer : To switch to from firewalld to iptables follow the steps given below.

1. Firstly ensure the iptables-services package is installed.

# yum install -y -q iptables-services 2. Then prepare the iptables rules you wish to use by editing /etc/sysconfig/iptables and /etc/sysconfig/ipt6tables.

3. Next, […]

CentOS / RHEL 7 firewalld : Command line reference (Cheat Sheet)

Firewalld is the new way of interacting with the iptables rules in RHEL 7. It allows to set new sucurity rules and activate them in runtime without disconnecting any existing connections.

Managing firewalld

# firewall-cmd –state — Display whether service is running # systemctl status firewalld — Another command to display status of service # […]

CentOS / RHEL 7 : How to password protect GRUB2 menu entries

Why should a Linux boot loader have password protection?

The following are the primary reasons for password protecting a Linux boot loader: 1. Preventing Access to Single User Mode – If an attacker can boot into single user mode, he becomes the root user. 2. Preventing Access to the GRUB Console – If the machine […]

CentOS / RHEL 7 : Chrony V/s NTP (Differences Between ntpd and chronyd) Chosing between Chrony and NTP

CentOS / RHEL 7 : Chrony V/s NTP (Differences Between ntpd and chronyd) Chosing between Chrony and NTP

– In RHEL 7 ntpd is replaced by chronyd as the default network time protocol daemon. – Basic configuration for synchronize time and date is stored in the file /etc/chrony.conf. – ntpd is still included in yum […]

CentOS / RHEL 7 : How to sync chrony to local clock

Question : How to sync chrony to the local clock.

Answer : When the chrony service starts, there are some settings in the /etc/chrony/chrony.conf file that tells it to actually set the time if specific conditions occur. Below procedure lts you set the local clock as the source for chrony to synchronize the time.

1. […]

CentOS / RHEL 7 : How to configure serial getty with systemd

With SysV init, by default, getty processes are started on the first six virtual consoles. They can be accessed with the Ctrl+Alt+F1 to Ctrl+Alt+F6 key combination. systemd starts the getty processes only when needed. That means, only after you change to, for instance, the second virtual terminal by pressing Ctrl+Alt+F2 is the getty process started […]

CentOS / RHEL 7 : How to change runlevels (targets) with systemd

Systemd has replaced sysVinit as the default service manager in RHEL 7. Some of the sysVinit commands have been symlinked to their RHEL 7 counterparts, however this will eventually be deprecated in favor of the standard systemd commands in the future.

SysVinit V/s systemd runlevels

Here is a comparison between SysVinit runlevels V/s systemd targets.

[…]

CentOS / RHEL 7 : systemd-analyze command to find booting time delays

Question : My system is taking a lot of time to boot. How can I find out which services are taking long time to start?

Answer :

systemd-analyze command can be utilized to find out information about how much each service took to start. systemd-analyze time can provide overall information about how long it took […]

CentOS / RHEL 7 : How to open the Firewall port for Samba server using FirewallD

Question : I cannot reach my Samba server after starting the service. How do I open the port to be able to connect to my Samba server?

Solution :

If running FirewallD, it is mandatory to open the ports used by the Samba server in order for it to properly accept clients. To begin with […]

CentOS / RHEL 7 : Unable to start/enable iptables

When trying to start/enable the iptables daemon you receive the errors:

# systemctl enable iptables Failed to issue method call: Access denied # systemctl start iptables Failed to start iptables.service: Unit iptables.service failed to load: No such file or directory. Solution:

Starting with RHEL 7, firewalld is introduced and by default the iptables package is […]