A proxy is required when the server running Docker does not have direct access to the Internet. Configure the Docker daemon to use a proxy server to access images stored on the official Docker Hub Registry or 3rd-party registries. There are 2 ways to configure the proxy for docker : Configuring proxy variables in the […]
Archives for September 2017
CentOS / RHEL : How to view the commands executed in yum history command output
By default when you execute yum history command, you would only see the time and actions (update, install etc.) for the yum packages. # yum history ….. ID | Login user | Date and time | Action(s) | Altered ——————————————————————————- 22 | [user1] | 2017-07-19 21:45 | I, U | 279 EE 21 | [oracle] […]
CentOS / RHEL : How to block incoming and outgoing ports using iptables
It is always recommended to stop the services and block the ports which are not required. Keeping unwanted ports open, may cause vulnerability to the system. Depending on the requirement you can block both the incoming and outgoing traffic on a specific port. Block Incoming Port The syntax to block an incoming port using iptables […]
CentOS / RHEL 6 : How to change SNMP log level
The default options for snmpd daemon reside in /etc/sysconfig/snmpd file for RHEL 6. You can see the default options by running following command: # grep OPTIONS /etc/init.d/snmpd Modifying log levels for SNMP 1. In RHEL6, default configuration in /etc/sysconfig/snmpd for logging level of SNMP is: # snmpd command line options # OPTIONS=”-LS0-6d -Lf /dev/null -p […]
LVM error “WARNING: Inconsistent metadata found” – How to resolve in CentOS / RHEL
What is inconsistent metadata error When LVM performs pretty much any action, it first scans all available physical volumes and refreshes its view of the volume group layout. Because multiple physical volumes can exist in the same volume group, it is possible to end up in a situation where these PVs in the same VG […]
CentOS / RHEL : How to find Logical volumes (LVs) contained in Physical Volume (PVs) in LVM
Sometimes, to delete a physical volume, we may have to find out first if any LVs are residing in it. The post describes few of the most commonly used methods to determine the LVs that are part of a particular PV. Using lsblk command lsblk command gives a nice tree layout representation of disks/partitions and […]
Linux OS Service ‘iptables’
Service Name iptables Description The iptables utility controls the network packet filtering code in the Linux kernel. If you need to set up firewalls and/or IP masquerading, you should install this tool. The /sbin/iptables application is the userspace command line program used to configure the Linux IPv4 packet filtering rules. Since Network Address Translation (NAT) […]
CentOS / RHEL : How to make iptable rules persist across reboots
Sometimes after a reboot, iptables rules are not available as they are not saved to be persistent. The post below describes steps to save iptables persistently. Making iptable rules persistent 1. Add rules to the iptables according to your requirment. 2. Verify that all the rules are present using the command “iptables -L“. # iptables […]