Accessing Website with IP NAT Hairpinning

The term hairpinning comes from the fact that the traffic comes from one source into a router or similar devices, makes a U-turn and goes back the same way it came.

Visualize this and you see something that looks like a hairpin.

Hairpin NAT is a useful technique for accessing an internal server using a public IP. Since you are using a public IP to attempt to access a server in your network, the traffic will attempt to go out to the internet. In order to reach the server, the traffic will need to be redirected to the correct location.
The issue with this article is that you need to load a website or use curl to access the website on an internal IP that is set up as NAT to a public IP.


Server1 – Web Server. Has a public IP and is behind a firewall with the private IP

When you try and load the site on this server, it does not load.
Fix: Set up hosts file to point to the private IP.

How to Set or Change Hostname in CentOS 7

Use this information when changing the hostname in centos 7.

Ways to show the hostname

# hostname
# hostname -s
# hostname -f
# cat /etc/hostname
# hostnamectl

How to change the hostname.
In order to change or set a CentOS 7 machine hostname, use the hostnamectl command as shown in the below command excerpt.

# hostnamectl set-hostname your-new-hostname

In order to apply the new hostname, a system reboot is required, issue one of the below commands in order to reboot a CentOS 7 machine.

# init 6
# systemctl reboot
# shutdown -r now

A second method to setup a CentOS 7 machine hostname is to manually edit the /etc/hostname file

# nano /etc/hostname

How To: Fix kernel panic-not syncing: VFS: unable to mount root fs on unknown block(0,0) on Azure VM

When booting an Azure VM, this error:

304.863321] —[ end Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Solution: remove old linux kernels, your /boot drive is out of space.

-boot to grub and click on “Advanced options”
-Select a previous kernel (should boot fine)
login and enter command

$ df

See if your /boot directory is 100% used
Remove old linux kernels

$ sudo apt-get autoremove

Also, there may be an issue with the storage drivers (that should be built into initramfs) needed for Hyper-V / Azure.
Other Information:

No PGP for Horde Mail in Plesk

When checking mail, I noticed the PGP option was not available. It should look like this:

So, I followed this:

But still missing.

MySQL shows warning: Using unique option is deprecated and will be removed in a future release

Error when exporting a dump in plesk databases (See:

Warning: Using unique option prefix database instead of databases is deprecated and will be removed in a future release. Please use the full name instead.


key_buffer and myisam-recover are deprecated in Mysql 5.5. myisam-recover option is renamed as of MySQL 5.5.3 to myisam-recover-options .

1. Log in to Plesk server via SSH

2. Correct /etc/my.cnf or /etc/mysql/my.cnf as below:
Change pass to password
See –