Apr 13

Disable firewalld and use iptables on CentOS or RHEL

When try to save iptable rules on latest RHEL  / CentOS version, an error similar to following will appear.
It is due to latest version no longer distributed with iptales, instead firewalld was introduced to manage iptables.  Even though firewalld provides more features, many sysadmins are preferred to use good old iptables.

Error!


# service iptables save
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.

To fix this, you need to install few packages, let’s look at how to bring back iptables to the latest Redhat / Centos. We are going to disable firewalld and use iptables instead on Centos.

1) Firstly, stop and mask firewalld service

systemctl stop firewalld
systemctl mask firewalld

2) Install iptables-services from yum command

yum install iptables-services

3) Enable the service at startup

systemctl enable iptables

4) Start the iptables

systemctl start iptables

5) Now it is ready to save, iptable rules using following command.

service iptables save

comment here if you have any doubts or questions, I’m always happy to assist you.

Links :- Fundamentals of Linux iptables

Mar 23

Restore missing menu bar in ubuntu 14.04 or beyond

This time I going to demonstrate how to restore missing menu bar in Ubuntu 14.04 or beyond versions.
If you have installed latest Ubuntu version, you may experience that menu bar of each applications appears on global menu bar which is on the top of the screen. This is really annoying when need to browse menu items. Fortunately after 14.04 release, it has been included feature called local menu. Let’s look at how to enable it, with 3 steps without installing any software.

global menu ubuntu

 

 

 

 

 

 

 

1) find “System Settings..

Take cursor to top right hand corner and click on “power button” as below image, and find “System Settings..”.

 

system settings - Ubuntu

 

 

 

 

 

 

 

 

 

 

 

 

 

2) From the system settings window, Click the “Appearance”.

 

Ubuntu Apperance

 

 

 

 

 

 

 

 

 

 

 

3) Show the menus for window sub section

Then click on “Behavior” tab, and finally select and save “In the window’s title bar” from “Show the menus for window” sub section.

 

menu on windows's title bar

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

That’s it.  Following screen shot proves it.

 

Ubuntu local menu

 

 

 

 

 

 

Mar 20

Upgrade or install latest version of Nginx on Ubuntu

Installing Nginx on Ubuntu is really simple, sudo apt-get install nginx command will do the trick for you. But it does not install the latest stable, instead it will install some latest version of Nginx from Ubuntu repository.
Nginx maintains 2 versions called Mainline and stable. Latest version can be found from here .

Mainline Version :- It has most latest version than stable, but it is on testing stage ( beta version ). This does not recommend for production environment.
Stable Version :- As name implied, it is reliable version, and recommend for production environment.

Purpose of this article is guide how to upgrade or install latest version of Nginx with minimum steps. Let’s look at how to do it.

1) Add stable Nginx repository to the system

#sudo add-apt-repository ppa:nginx/stable

2) Update repositories

#sudo apt-get update

3) Install Nginx

#sudo apt-get install nginx 

4) Verify latest Version

#nginx -v

Check nginx version

 

Older posts «

» Newer posts

Fetch more items