How to Use VLAN tagged NIC (Ethernet Card) on CentOS and RHEL Servers

There are some scenarios where we want to assign multiple IPs from different VLAN on the same Ethernet card (nic) on Linux servers (CentOS / RHEL). This can be done by enabling VLAN tagged interface. But for this to happen first we must make sure multiple VLANs are attached to port on switch or in other words we can say we should configure trunk port by adding multiple VLANs on switch.


Let’s assume we have a Linux Server, there we have two Ethernet cards (enp0s3 & enp0s8), first NIC ( enp0s3 ) will be used for data traffic and second NIC (enp0s8) will be used for control / management traffic. For Data traffic I will using multiple VLANs (or will assign multiple IPs from different VLANs on data traffic ethernet card).

I am assuming the port from switch which is connected to my server data NIC is configured as trunk port by mapping the multiple VLANs to it.

Following are the VLANs which is mapped to data traffic Ethernet Card (NIC):

  • VLAN ID (200), VLAN N/W =
  • VLAN ID (300), VLAN N/W =

To use VLAN tagged interface on CentOS 7 / RHEL 7 / CentOS 8 /RHEL 8 systems, kernel module 8021q must be loaded.

Use the following command to load the kernel module “8021q”

[[email protected] ~]# lsmod | grep -i 8021q
[[email protected] ~]# modprobe --first-time 8021q
[[email protected] ~]# lsmod | grep -i 8021q
8021q                  29022  0
garp                   14384  1 8021q
mrp                    18542  1 8021q
[[email protected] ~]#

Use below modinfo command to display information about kernel module “8021q”

[[email protected] ~]# modinfo 8021q
filename:       /lib/modules/3.10.0-327.el7.x86_64/kernel/net/8021q/8021q.ko
version:        1.8
license:        GPL
alias:          rtnl-link-vlan
rhelversion:    7.2
srcversion:     2E63BD725D9DC11C7DA6190
depends:        mrp,garp
intree:         Y
vermagic:       3.10.0-327.el7.x86_64 SMP mod_unload modversions
signer:         CentOS Linux kernel signing key
sig_key:        79:AD:88:6A:11:3C:A0:22:35:26:33:6C:0F:82:5B:8A:94:29:6A:B3
sig_hashalgo:   sha256
[[email protected] ~]#

Now tagged (or mapped) the VLANs 200 and 300 to NIC enp0s3 using the ip command

[[email protected] ~]# ip link add link enp0s3 name enp0s3.200 type vlan id 200

Bring up the interface using below ip command:

[[email protected] ~]# ip link set dev enp0s3.200 up

Similarly mapped the VLAN 300 to NIC enp0s3

[[email protected] ~]# ip link add link enp0s3 name enp0s3.300 type vlan id 300
[[email protected] ~]# ip link set dev enp0s3.300 up
[[email protected] ~]#

Now view the tagged interface status using ip command:


Now we can assign the IP address to tagged interface from their respective VLANs using beneath ip command,

[[email protected] ~]# ip addr add dev enp0s3.200
[[email protected] ~]# ip addr add dev enp0s3.300

Use below ip command to see whether IP is assigned to tagged interface or not.


All the above changes via ip commands will not be persistent across the reboot. These tagged interfaces will not be available after reboot and after network service restart

So, to make tagged interfaces persistent across the reboot then use interface ifcfg files

Edit interface (enp0s3) file “/etc/sysconfig/network-scripts/ifcfg-enp0s3” and add the following content,

Note: Replace the interface name that suits to your env,

[[email protected] ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

Save & exit the file

Create tagged interface file for VLAN id 200 as “/etc/sysconfig/network-scripts/ifcfg-enp0s3.200” and add the following contents to it.

[[email protected] ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3.200
Read More

What’s Your Backup System In Case Your Hard Drive Crashes?

What if your hard drive crashes? What would you do? Would you worry? If not, you probably have a backup system in place.

All you really need is a good backup system to survive a hard drive crash. Unfortunately, not everybody has a backup system. For folks who already have one, they’ve probably had to experience a hard drive crash to realize the need for a backup system.

Such is the case with Harrison Jacobs, an international correspondent who learned the hard way. He had never had a backup system. So, when his hard drive crashed, he lost a lot.

I’ve made a lot of mistakes since I left New York to travel around the world as Business Insider’s international correspondent. By far the worst was when the external hard drive with all of my photos, videos, and interviews failed.


Thinking that hard drives don’t fail is a mistake most people are guilty of. They rely so much on their hard drives that they take it for granted. That’s exactly what happened to Harrison.

There was one mistake I made during my first six months on the road that was not funny at all. Even now, when I think about it, I get a little sick to my stomach.

It happened innocuously enough. I was editing photos while sitting on a couch in an Airbnb when I shifted a little too much and knocked my external hard drive, a Seagate Expansion Portable Hard Drive. The drive dismounted and, rather than keep editing photos, I went off to sleep.

When I plugged it in two days later, I heard a clicking sound. After trying every online-forum solution possible, I brought it to a data specialist and got the worst news: a head crash, the worst kind of hard drive failure possible. Even if the hard drive had been semi-recoverable, it would have cost me hundreds, if not thousands of dollars to recover the data.

Thanks to one bad jolt, I lost three months’ worth of photos, interviews, and videos. When I found out, I had a full-blown panic attack.


Who would have thought that a single jolt could damage a hard drive? Unfortunately, in Harrison’s case, it did. Since he didn’t have a backup system, his data got severely affected by the damaged hard drive. That painful experience led him to a foolproof backup system.

First, he switched to a solid-state drive.

My first step was to find a reliable and fast external hard drive that I could trust as my primary backup. The best solution these days — though not the most affordable — is a solid-state hard drive, or SSD.

The standard hard drives that most people use are hard disk drives (HDDs). Inside HDDs are spinning platters that store your data. The benefit of an HDD is that it is cheap for a high storage capacity. The downside is that, due to the moving parts on the inside, they are much more prone to failure.


Second, he backed up his data twice.

The Sandisk Extreme SSD became my first layer of security. All photos, video, and audio interviews are now backed up to this hard drive first.

But I

Read More

Step by Step Zorin OS 15 Installation Guide with Screenshots

Good News for all the Zorin users out there! Zorin has launched its latest version of its Ubuntu based Linux distro. Since its launch in July 2009, it is estimated that the popular distribution has reached more than 17 million downloads. Zorin is renowned for creating a distro for beginner level users and the all new Zorin OS 15 comes packed with a lot of goodies that surely will make Zorin OS lovers happy. Let’s see some of the major enhancements made in the latest version.

New Features of Zorin OS 15

Zorin OS has always amazed users with different set of features when every version is released Zorin OS 15 is no exception as it comes with a lot of new features as outlined below:

Enhanced User Experience

The moment you look at the Zorin OS 15, you will ask whether it is a Linux distro because it looks more like a Windows OS. According to Zorin, it wanted Windows users to get ported to Linux in a more user-friendlier manner. And it features a Windows like Start menu, quick app launchers, a traditional task bar section, system tray etc.

Zorin Connect

Another major highlight of Zorin OS 15 is the ability to integrate your Android Smartphones seamlessly with your desktop using the Zorin Connect application. With your phone connected, you can share music, videos and other files between your phone and desktop. You can even use your phone as a mouse to control the desktop. You can also easily control the media playback in your desktop from your phone itself. Quickly reply to all your messages and notifications sent to your phone from your desktop.

New GTK Theme

Zorin OS 15 ships with an all new GTK Theme that has been exclusively built for this distro and the theme is available in 6 different colors along with the hugely popular dark theme. Another highlight is that the OS automatically detects the time of the day and changes the desktop theme accordingly. Say for example, during sunset it switches to a dark theme whereas in the morning it switches to bright theme automatically.

Other New Features:

Zorin OS 15 comes packed with a lot of new features including:

  • Compatible with Thunderbolt 3.0 devices
  • Supports color emojis
  • Comes with an upgraded Linux Kernel 4.18
  • Customized settings available for application menu and task bar
  • System font changed to Inter
  • Supports renaming bulk files

Minimum system requirements for Zorin OS 15 (Core):

  • Dual Core 64-bit (1GHZ)
  • 2 GB RAM
  • 10 GB free disk space
  • Internet Connection Optional
  • Display (800×600)

Step by Step Guide to Install Zorin OS 15 (Core)

Before you start installing Zorin OS 15, ensure you have a copy of the Zorin OS 15 downloaded in your system. If not download it from the official website of Zorin OS 15. Remember this Linux distribution is available in 4 versions including:

  • Ultimate (Paid Version)
  • Core (Free Version)
  • Lite (Free Version)
  • Education (Free Version)

Note: In this article I will demonstrate Zorin OS 15 Core Installation Steps

Step 1) Create Zorin OS 15 Bootable USB Disk

Once you have downloaded Zorin OS 15, copy the ISO into an USB disk and create a bootable disk. Change our system settings to boot using …

Read More

How to Set ulimit and file descriptors limit on Linux Servers

Introduction:  Challenges like number of open files in any of the production environment has become common now a day. Since many applications which are Java based and Apache based, are getting installed and configured, which may lead to many open files, file descriptors etc. If this exceeds the default limit that is set, then one may face access control problems and file opening challenges. Many production environments come to standstill kind of situations because of this.


Luckily, we have “ulimit” command in any of the Linux based server, by which one can see/set/get number of files open status/configuration details. This command is equipped with many options and with this combination one can set number of open files. Following are step-by-step commands with examples explained in detail.

To see what is the present open file limit in any Linux System

To get open file limit on any Linux server, execute the following command,

[[email protected] ~]# cat /proc/sys/fs/file-max

The above number  shows that user can open ‘146013’ file per user login session.

[[email protected] ~]# cat /proc/sys/fs/file-max
[[email protected] ~]# cat /proc/sys/fs/file-max

This clearly indicates that individual Linux operating systems have different number of open files. This is based on dependencies and applications which are running in respective systems.

ulimit command :

As the name suggests, ulimit (user limit) is used to display and set resources limit for logged in user.When we run ulimit command with -a option then it will print all resources’ limit for the logged in user. Now let’s run “ulimit -a” on Ubuntu / Debian and CentOS systems,

Ubuntu / Debian System,

[email protected] ~}$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 5731
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024      
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 5731
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

CentOS System

[email protected] ~}$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 5901
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 5901
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

As we can be seen here different OS have different limits set. All these limits can be configured/changed using “ulimit” command.

To display the individual resource limit then pass the individual parameter in ulimit command, some of parameters are listed below:

  • ulimit -n  –> it will display number of open files limit
  • ulimit -c –> it display the size of core file, zero means you are not allowed to take core dump.
  • umilit -u –> it will display the maximum user process limit for the logged in user.
  • ulimit -f –> it will display the maximum file size that the
Read More

Safety Tips To Keep Hackers Away

Hackers are everywhere. You’ll never really know when they’ll strike. When they do, they will take away vital data from your computer.

No one wants to get hacked. Unfortunately, it happens. Hackers are heartless people. That’s why it’s important to understand what they do and how they do it.

A recent public forum explained what hacking is all about.

What is hacking and how can it be avoided?

These two questions were among many addressed on Tuesday at a public forum titled “You Have Been Hacked!” featuring Charles J. Lesko Jr., director of graduate studies in the ECU College of Engineering and Technology.

“Hacking” refers to the act of someone gaining unauthorized access into a computer or network, Lesko said.

“Anything that’s got digital capability nowadays has the ability for someone to — in some way, shape or form — alter,” he said. “That’s the age that we’re living in now.”


Why do hackers do what they do? Here’s what Lesko has to say about that:

There are many nefarious reasons for hacking, but the primary one is to get your money, Lasko said.


Lesko also offers some safety tips to keep the hackers away.

Never respond to a request from any organization or a business that sends an email asking you for your user ID and password, Lesko said.

“That’s an immediate delete,” he said. “Unless you trust (something) explicitly, don’t (click on it).”

Know the difference between “http” and “https,” letters that appear in the address of a website, Lesko said. The “s” indicates that the website connection is secure.

Regarding passwords, it is best to have ones that are complex and secure, Lesko said. People tend to use simple passwords, even as simple as “password” and “pa$$word,” because they are easy to remember. But they are also easy for hackers to break into.


The key is, never trust emails that ask you to share or update your personal information on the attached link. To start with, organizations or businesses, like banks, will never ask you to update personal information online.
So, if you get an email that seems to look like it’s from your bank, verify it first. Do not trust it and do exactly what Lesko says. Delete it.

Knowing the difference between “http’ and “https” is critical especially if you do a lot of research online. It’s really just a matter of looking out for the letter “s” when you choose a website.

When it comes to password management, Lesko adds;

Lesko recommended using a “password manager” tool that allows computer users to have a range of secure and complex passwords without their having to remember a thing. He also recommended installing antivirus programs, not only on computers but on mobile phones which are also susceptible to hacking.


According to Lesko, using a virtual private network or VPN can also keep the hackers away.

Another way to keep data safe is to use the services of a virtual private network (VPN), Lesko said.

“(It’s) a way to secure your online activity by routing your traffic through their servers,” he said.


Lesko also adds that sensitive information should never be stored …

Read More

Protection For The Ultimate Data Storage

We are all dependent on data. No matter who we are, we rely on data to make it through the day. Data make the world go around nowadays.

We have so much data that we are always on the lookout for the best storage. One of the most common data storages for regular folks like you and me is a computer or laptop. There’s a lot of data, we just can’t live without, stored in our computer or maybe laptop. That’s just for regular folks like you and me.

Photographers and videographers need humongous data storage for all their work files. Data storage is an issue they face constantly. That’s why the G-Speed Shuttle with Thunderbolt seems to be the ultimate storage for them.

The G-Speed Shuttle with Thunderbolt a very interesting proposition, both for stills photographers and videographers. Yes, it is big, bulky and costly, but it’s as fast as a regular USB-C SSD drive and offers storage capacities you just don’t get with regular external drives.


While it seems to be a costly solution for a huge data storage, it might just be the ultimate data storage photographers and videographers are looking for.

Photographers are always running out of storage space, and there can’t be many of us who don’t need an external drive to supplement the computer’s internal storage.

The traditional choice is to pick an external hard drive, but even the best portable hard drives are pretty slow for bulk image transfers and video editing, and while regular desktop hard drives are faster, even these have their limits. Another option is to invest in SSD (solid state storage) instead, but while this is super-fast, it’s also super-expensive. There is a third option – a desktop RAID system like the G-Technology G-Speed Shuttle.


According to, its huge potential storage is ideal for speedy transfer of data and data redundancy. The G-Speed Shuttle with Thunderbolt is also portable, which makes it very convenient for photographers on the go.

If you’re familiar with RAID, then you’re probably intrigued at how such system can fit into one portable hardware. If you’re not familiar with RAID, then it’s time you learn more about it. Since the G-Speed Shuttle is a desktop RAID system, then it’s definitely the kind of data storage that’s worth looking into. A portable RAID system sounds awesome.

RAID stands for Redundant Array of Independent Disks. A RAID drive gets a series of disk drives working together to offer more capacity, higher speeds and data ‘redundancy’ to allow for disk failures. There are different types of RAID setup – the G-Speed Shuttle uses RAID 5, which means your data is safe if one of its four drives fails.


So, since the G-Speed Shuttle runs on RAID, it guarantees some kind of data protection as well. When it comes to storage capacity, here’s what the G-Speed can offer you.

Not surprisingly, RAID systems come in pretty big boxes. These not only have to hold all the disk drives but the power supply and various other data control hardware. The G-Speed Shuttle also needed a driver download for use on our test computer, but that was straightforward.

The G-Technology G-Speed

Read More

How to Install LEMP (Linux, Nginx, MariaDB, PHP) on Fedora 30 Server

In this article, we’ll be looking at how to install LEMP stack on Fedora 30 Server. LEMP Stands for:

  • L -> Linux
  • E -> Nginx
  • M -> Maria DB
  • P -> PHP

I am assuming Fedora 30 is already installed on your system.


LEMP is a collection of powerful software setup that is installed on a Linux server to help in developing popular development platforms to build websites, LEMP is a variation of LAMP wherein instead of Apache, EngineX (Nginx) is used as well as MariaDB used in place of MySQL. This how-to guide is a collection of separate guides to install Nginx, Maria DB and PHP.

Install Nginx, PHP 7.3 and PHP-FPM on Fedora 30 Server

Let’s take a look at how to install Nginx and PHP along with PHP FPM on Fedora 30 Server.

Step 1) Switch to root user

First step in installing Nginx in your system is to switch to root user. Use the following command :

[email protected] ~]$ sudo -i
[sudo] password for pkumar:
[[email protected] ~]#

Step 2) Install Nginx, PHP 7.3 and PHP FPM using dnf command

Install Nginx using the following dnf command:

[[email protected] ~]# dnf install nginx php php-fpm php-common -y

Step 3) Install Additional PHP modules

The default installation of PHP only comes with the basic and the most needed modules installed. If you need additional modules like GD, XML support for PHP, command line interface Zend OPCache features etc, you can always choose your packages and install everything in one go. See the sample command below:

[[email protected] ~]# sudo dnf install php-opcache php-pecl-apcu php-cli php-pear php-pdo php-pecl-mongodb php-pecl-redis php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml -y

Step 4) Start & Enable Nginx and PHP-fpm Service

Start and enable Nginx service using the following command

[[email protected] ~]# systemctl start nginx && systemctl enable nginx
Created symlink /etc/systemd/system/ → /usr/lib/systemd/system/nginx.service.
[[email protected] ~]#

Use the following command to start and enable PHP-FPM service

[[email protected] ~]# systemctl start php-fpm && systemctl enable php-fpm
Created symlink /etc/systemd/system/ → /usr/lib/systemd/system/php-fpm.service.
[[email protected] ~]#

Verify Nginx (Web Server) and PHP installation,

Note: In case OS firewall is enabled and running on your Fedora 30 system, then allow 80 and 443 ports using beneath commands,

[[email protected] ~]# firewall-cmd --permanent --add-service=http
[[email protected] ~]#
[[email protected] ~]# firewall-cmd --permanent --add-service=https
[[email protected] ~]# firewall-cmd --reload
[[email protected] ~]#

Open the web browser, type the following URL: http://<Your-Server-IP>


Above screen confirms that NGINX is installed successfully.

Now let’s verify PHP installation, create a test php page(info.php) using the beneath command,

[[email protected] ~]# echo "<?php phpinfo(); ?>" > /usr/share/nginx/html/info.php
[[email protected] ~]#

Type the following URL in the web browser,



Above page confirms that PHP 7.3.5 has been installed successfully. Now let’s install MariaDB database server.

Install MariaDB on Fedora 30

MariaDB is a great replacement for MySQL DB as it is works much similar to MySQL and also compatible with MySQL steps too. Let’s look at the steps to install MariaDB on Fedora 30 Server

Step 1) Switch to Root User

First step in installing MariaDB in your system is to switch to root user or you can use a local user who has root privilege. Use the following command below:

[[email protected] ~]# sudo -i
[[email protected] ~]#

Step 2) Install latest

Read More

How to Install Git on Ubuntu

Git is a VCS (Version Control System) which is designed to handle the development and maintaining process of any given collaborative project. It allows developers and project managers to efficiently and easily overview the changes happening in the source of their program, and configure it as they desire. It is the most commonly used VCS […]


from ThisHosting.Rocks…

Read More

Hard Drive Failure: How Prepared Are You For it?

Let’s talk about hard drive failure. It’s a topic we all want to avoid, right? Well, who really wants to talk about hard drive failure?

We all want to avoid the topic but when it happens to us, we think the world is going to end. Okay, that obviously is an exaggeration but you know what I mean. As much as no one wants to talk about a hard drive failure, no one want to deal with it as well.

The reality is that we all have to talk about it so that we can deal with it when it happens. So, let’s talk about it and see what computer experts, like Bob Levitus, have to say about it as well.

According to him;

You are going to lose everything on your Mac hard (or solid state) drive if you don’t back up your files.

Now that World Backup Day (March 31) has come and gone, I feel it is prudent to reiterate the bad things that will happen to your precious data—your photos, videos, essays, proposals, emails, messages, and everything else—if you don’t backup.


We might not want to admit but Bob is right. We can all lose everything on our hard drive if it fails. Bob states the simple reason why that day is bound to come.

Your hard or solid-state drive will absolutely and positively fail someday. It probably won’t be today, but the day will definitely come because all disks fail eventually.


While it’s hard to tell when that day will come, it will definitely come.

It’s rare that a hard or solid-state drive fails in its first year or two of service (though that’s not unheard of). It’s also rare that something (anything) you do to or install upon your Mac will render its disks unusable. But, while those things are rare, too, they can happen.


There’s really no denying that hard drives fail. With computer experts like Bob, weighing in on it, there’s just no way we should ever avoid the topic. If we do, we’re never going to be fully prepared to deal with it.

Probably the reason why most folks don’t like to talk about hard drive failures is because of its association with data loss. When hard drive failures happen, data is endangered. Chances are, they can’t be accessed.

That’s why Bob has some great tips for us in case our hard drive fails.

The only way to avoid the pain of losing your treasured data is to back up your disk (or disks). Here are my top two tips for doing it right:

1. One backup is never enough. You want at least two full backups, with one stored in an offsite location.

2. Test your backups regularly to ensure that you can restore files. If you can’t, the backup is worthless.


Bob is right. One backup is never enough. We can back up to the cloud or to another external hard drive. Sure, we can do both. However, backing up to another external hard drive means that we are, again, faced with the possibility of failure in the future.

As long as we use external hard drives …

Read More

List of Important Dos & Don’ts for Your PPC Landing Page

PPC landing pages are different than other landing pages and that’s the reason why most marketers find it difficult to design. So many technical experts have worked on it, but there are still queries with how it actually works.

The post List of Important Dos & Don’ts for Your PPC Landing Page appeared first on WPWebHost.

from – WPWebHost…

Read More