How to know you are inside a LXD container?

Identify LXD container

You have access to a virtual machine, you need to find out what virtualization technology it uses, you can install virt-what

Then run virt-what command, it will show what virtualization technology you are using.

Another way to find is using the command. If you use LXD container, you will see the following files/directories. […]

Read More…

How to check if running inside Docker?

To check if you are inside a docker container, run the command

If you get some result with docker in it, you are inside a docker container. Example See Docker […]

Read More…

Dark Web Websites

Dark Web Websites are sites that can only be accessed using tor. Tor websites using domains name with .onion extension (LTD). Tor uses multiple servers to anonymize traffic, so no one will be able to find a visitor’s IP address or where a website is hosted. Onion websites are referred to as hidden services as […]

Read More…

Install Nginx ModSecurity on CentOS 7

ModSecurity is a Web Application Firewall that protects your website from hacking attacks. It is Open Source and free to use. It can be used with webservers like Apache, Nginx, and IIS. To install ModSecurity with Nginx, we need to compile the ModSecurity Nginx module and activate it in the Nginx configuration file. Install the […]

Read More…

Whitelisting an IP Address in CSF Firewall

whitelist IP in csf

There are 3 ways to whitelist an IP address in ConfigServer Security & Firewall (csf). Whitelisting an IP address will allow the IP address to access all ports on the server including any closed ports. For example, you can block SSH port 22 on the server. Then add your IP address to the whitelist, now […]

Read More…

Install Caddy Webserver on CentOS 7

Caddy Webserver

To install Caddy Webserver on CentOS 7, run

Enable caddy start on boot

To start caddy, run

Caddy configuration file available at

See Caddy […]

Read More…

Connect to backend failed: connect to lsphp failed: 110

CloudLinux

On a CloudLinux Server, websites stopped working with the error message “Service Unavailable”. On checking error_log in /usr/local/apache/logs, found following error message

The problem was due to the server got booted using the default CentOS kernel instead of CloudLinux Kernel.

If you were using Cloudlinux kernel, “uname -a” command will show kernel with […]

Read More…

bash: mysql_safe: command not found

MySQL

On CentOS 7 server running MySQL 5.7, when trying to reset MySQL root password, I get an error

This is because MySQL 5.7 installation using yum removed the mysqld_safe binary file. To reset, you need to start MySQL using systemctl with skip-grant-tables options. So you don’t need mysqld_safe. To see how to reset MySQL […]

Read More…

CentOS 7 MySQL 5.7 root password reset

MySQL

To reset MySQL 5.7 root password on CentOS 7 server, do the following Stop MySQL Server

Set the MySQL MYSQLD_OPTS environment to start MySQL with –skip-grant-tables

Start MySQL with –skip-grant-tables

Login as user root

Update MySQL root password

Or

Exit MySQL command prompt

Stop MySQL server

Unset […]

Read More…

ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded

When I try to connect to a MySQL 8 server, I get the following error

This is because of MySQL 8 use more secure authentication. This is not supported by your MySQL installation. What you can do is connect using MySQL 8 client or change the authentication method to use old authentication. To create […]

Read More…