Wednesday, October 21, 2015

Changing a specific value in a file using sed

/bin/sed -i.bak -e 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config

Friday, October 09, 2015

Disable IPv6 on Linux

Sometime you may want to disable IPV6 on your Linux server. 

To check if IPV6 is running on your system
Run the following command.
#ifconfig  - This is show the ipv4 and ipv6 address

To disable ipv6
vi /etc/sysctl.conf

 Add the following lines at the bottom of the config file
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
 

After saving the file, run the following command to apply the new changes.

#sysctl -p

To confirm the changes are applied, run the command
#ifconfig - This should not show ipv6 address any more