The route command is used to show/manipulate the IP routing table. The simplest command with ‘route’ is to run it without any options or arguments which will return the IP routing table. The equivalent command with ip is as follows: $ ip r where r stands for route. The route command was deprecated in CentOS […]
CentOS/RHEL
How to Add or Remove Ports when firewalld is Disabled
There may be a case when you need to add or remove ports when firewalld is disabled. In such cases “firewall-offline-cmd” can be used as it is an offline command-line client of the firewalld daemon. A port can be added or removed via firewall-offline-cmd in case firewalld is not active. Note: Please make sure to […]
firewall-offline-cmd Command Examples in Linux
firewall-offline-cmd is an offline command-line client of the firewalld daemon. It should be used only if the firewalld service is not running. A port can be added or removed via firewall-offline-cmd in case firewalld is not active. firewall-offline-cmd Command Examples 1. For adding a port: # firewall-offline-cmd –port=XXXX:tcp 2. For removing a port: # firewall-offline-cmd […]
lvsd Command Examples in Linux
lvsd is a daemon to control the Red Hat clustering services. lvsd reads in the cluster configuration file lvs.cf, calls ipvsadm to maintain the IPVS routing table, and nanny to perform monitoring services. lvsd Command Options
sestatus Command Examples in Linux
SELinux can either be in an enabled or a disabled state. In order to check in which state it is running, we can make use of the getenforce command. There are two modes in which SELinux runs: There are two modes in which SELinux runs: Enforcing: This is the enabled state where all rules are […]
setenforce Command Examples in Linux
We can change the SELinux modes from enforcing to permissive and vice versa during runtime by using the setenforce command. Before and after changing the SELinux mode, we must ensure the current mode by using the getenforce command. SELinux can either be in an enabled or a disabled state. In order to check in which […]
Sample /etc/kdump.conf configuration file
An image of system memory captured after a kernel crash or hang is called a crash dump. Analyzing a crash dump can give valuable clues for postmortem analyses of kernel problems. However, obtaining a dump after a kernel crash is inherently unreliable because the storage driver responsible for logging data onto the dump device might […]
How to use ipset Command in Linux
IP sets are stored collections of IP addresses, network ranges, MAC addresses, port numbers, and network interface names. The iptables tool can leverage IP sets for more efficient rule matching. For example, let’s say you want to drop traffic that originates from one of several IP address ranges that you know to be malicious. Instead […]
‘error opening class fc_host’ – systool Command Error on CentOS/RHEL 7 and 8
The Problem When running the systool command on CentOS/RHEL 7, the following error message is reported: # systool -c fc_host -v Error opening class fc_host The Solution The error occurs because the scsi_transport_fc module that is responsible for populating the contents of /sys/class/fc_host/ directory is not loaded on the system. 1. Manually load the scsi_transport_fc […]
Dependency failed for NFS server and services
The Problem Attempting to start the NFS (nfs-server.service) on CentOS/RHEL 7 fails as follows: # systemctl status nfs-server.service nfs-server.service – NFS server and services Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled) Drop-In: /run/systemd/generator/nfs-server.service.d ‘-order-with-mounts.conf Active: inactive (dead) Mar 09 16:17:10 hostname systemd[1]: Dependency failed for NFS server and services. Mar 09 16:17:10 hostname systemd[1]: nfs-server.service: […]