Configure Apache With Self-Signed TLS/SSL Certificate on Ubuntu 16.04

Step 1: Generating the certificate

First, let’s create a place to store the file.

mkdir ~/certificates
cd ~/certificates

Generate CSR and private key.

openssl req -x509 -newkey rsa:4096 -keyout apache.key -out apache.crt -days 365 -nodes

It will ask for information for the certificate request. Complete with the appropriate information.

Country Name (2 letter code) [AU]: US
State or Province Name (full name) [Some-State]: FL
Locality Name (eg, city) []: Miami
Organization Name (eg, company) [My Company]: My Company
Organizational Unit Name (eg, section) []:

Common name should be your domain name or the server’s IP address. Also, fill in your email.

Read more

Share

Windows 7/10 auto login and locking tricks

Setup auto-login

  • Open Start menu/Search
  • Search for and open regedit
  • Navigate to HKEY_LOCAL_MACHINE/Software/Microsoft/Window NT/CurrentVersion/Winlogon
  • Create or edit DefaultUserName (string) and set it to your username to run plex under
  • Create or edit DefaultPassword (string) and set it to the password for the default user
  • Create or edit AutoAdminLogon (string) and set it to 1
  • Reboot to test if the auto login is working

Auto locking after login

  • Open notepad as administrator
  • Copy: rundll32.exe user32.dll,LockWorkStation
  • Save as /Program Files/lock.bat (change file type to all files)
  • Open group policy editor by searching for gpedit
  • Navigate to Uesr Configuration/Windows Settings/Scripts (Log on/Log off)
  • Double click Logon then click add
  • Brows for the script located at /Program Files/lock.bat and click ok
  • Reboot to test that the computer locks after logon
     
Share

Upgrade PHP version to 7.2 from 7.0 on Ubuntu 16.04

Check your PHP version installed

Before we start, we can simply type the following command to check the existing PHP version installed on the server.

$ php -v

If you installed Ubuntu 16.04 LTS, you will get PHP 7.0.30 installed on your server by running installation script from VestaCP. In this tutorial, we will upgrade our PHP version to 7.2 to enjoy more features and bug fixes.

Check your PHP modules installed

To check installed PHP modules in Ubuntu, type the following command (as Ubuntu makes PHP modules available via packages):

$ dpkg — get-selections | grep -v deinstall | grep php7.0

Remember mark installed modules list, as you need to install them again after upgraded to PHP 7.2. We don’t need to install mcrypt as it has been dropped from PHP 7.2.

In this tutorial, we need to install those modules again:

Read more

Share

Install MariaDB on CentOS 7

MariaDB is an open source relational database management system, backward compatible, binary drop-in replacement of MySQL. It is developed by some of the original developers of the MySQL and by many people in the community. With the release of CentOS 7, MySQL was replaced with MariaDB as the default database system.

If you, for any reason need to install MySQL, check the How to Install MySQL on CentOS 7 tutorial. If your application does not have any specific requirements, you should stick with MariaDB, the default database system in CentOS 7.

In this tutorial we will show you how to install the latest version of MariaDB on CentOS 7 using the official MariaDB repositories.

Prerequisites
Make sure you are logged in as a user with sudo privileges before proceeding with the tutorial.

Read more

Share

Install and setup Plex Media Server Ubuntu 16.04

Plex is a free feature-rich media library platform that provides a way to store all your movies, shows, and other media in one place. You can access Plex from any device, whether you’re at home or on-the-go. There are many different media tools available in the world like, Kodi, Xmbc, OSMC and Mediatomb, but the Plex Media Server is perhaps one of the most popular solutions for managing media. Plex runs on Windows, macOS, Linux, FreeBSD and many more. Plex is a client-server media player system made up from two main components, 1) The Plex Media Server, which organizes music, photos and videos content from personal media libraries and streams it to their player, 2) The Players that can be the Plex web UI, Plex Apps or Plex home theater. Plex Media Server supports Chromecast, Amazon FireTV, Android, iOS, Xbox, PlayStation, Apple TV, Roku, Android TV and various types of smart TVs. If you are looking for a way to watch your movies from anywhere, then Plex is best choice for you.

In this tutorial, we will learn how to install and configure Plex Media Server on Ubuntu 16.04.

Requirements

  • A server running Ubuntu 16.04.
  • A not-root user with sudo privileges setup on your server.
  • A static IP address 192.168.0.227 setup on your server.

Getting Started
Before starting, make sure your system is fully up to date by running the following command:

sudo apt-get update -y
sudo apt-get upgrade -y

Once your system is updated, restart your system to apply all these changes with the following command:

sudo reboot

After restarting, log in with sudo user and proceed to the next step.

Read more

Share

Vesta- How to set up master-slave DNS cluster

If you are looking for the options to avoid any DNS-related downtime or the way to manage dns across all server you have, you might consider to set up dns cluster.

Create user dns-cluster on a server which will be used as dns slave

On the second server (slave) with vestacp you should create new user with name dns-cluster (via gui or cli)Code: 

v-add-user dns-cluster passowrd yourmail@example.tld

On the first server (master) you should run this command:

Read more

Share

Install Vesta Control Panel (vestacp) on Centos 7 with PHP-FPM and PHP 7.2

I had few issues on my container and KVM on installing vestacp. Issues were like quite weird, such as-

  1. Post installation on KVM- it moved into emergency maintenance mode
  2. Post installation on LXC container- DNS resolution halted

After hours and hours of search, found few root causes-

  1. I have to withdraw quota with vestacp installation package
  2. No firewall on LXCcontainer

So let’s start.

Download installation script

curl -O http://vestacp.com/pub/vst-install.sh

Run it

bash vst-install.sh --nginx yes --phpfpm yes --apache no --named yes --remi yes --vsftpd yes --proftpd no --iptables no --fail2ban no --quota no --exim yes --dovecot yes --spamassassin yes --clamav yes --softaculous yes --mysql yes --postgresql no --hostname yourdomain.com --email yourmail@yourdomain.com --password yourpassword

You can also generate your installation command from vesta website:

Read more

Share

SPF, DKIM, DMARC – Sample and perfect record values

Sharing some sample record value of the post subject for future reference:

SPF:

domain.gov.bd. IN TXT "v=spf1 a mx ip4:1.2.3.4 ?all"

DKIM:

MDaemon._domainkey.domain.gov.bd. IN TXT "v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDIaJcNDjvJ6LJ/zyZCIOuaQiLMSC+FBfky8JMFE7LUGlP4LXwmpaKO3Z67x+PVXgYbbFU9nzLaFOfIXTbsCh6LYLBgQF+PNghbTAchQ59IEMrMRsTPCCg95+gKYRupN0B96Uz7rrXifZL8T+yl9MkpIlAsXXs7e8Vhzwa94NdVjQIDAQAB"

DMARC:

_dmarc.domain.gov.bd. 3600 IN TXT "v=DMARC1; p=quarantine; sp=quarantine; rua=mailto:postmaster@domain.gov.bd; ruf=mailto:postmaster@domain.gov.bd; rf=afrf; pct=100; ri=86400"

DMARC Generator: 

https://www.unlocktheinbox.com/dmarcwizard/

Share

Enable DNSBL or RBL on Zimbra

DNS-based Blackhole List (DNSBL) or Real-time Blackhole List (RBL) is an effort to fight spam emails. It is a blacklist of source IP addresses that have a reputation of sending spam emails. Most email systems can be configured to check these lists and block or flag emails that were sent from domains/IPs listed there. The ‘Blackhole List’ is sometimes called ‘blacklist’ by email admins.

In this tutorial, we’ll see how we can configure RBL with Zimbra using both GUI and CLI.

Method 1 – GUI:

Login to the Zimbra admin console – https://mail.example.com:7071, and then go to Configure.

Then, go to Global Settings.

Read more

Share

SSH Tunnel on PuTTY

Most of you have probably used a tunnel with an SSH connection. What you probably weren’t aware of is that you can use a dynamic tunnel to access all remote infrastructure. Furthermore, you can specify a port and a destination IP to have direct access. This process is achieved through your PuTTY configuration.

In this procedure, we will use Internet Explorer, Firefox and an RDP connection to demonstrate the use of a tunnel with an SSH connection, as well as configuring the tunnel with several other protocol types.

Local Port Forwarding

Step 1 – Load the Session
In your PuTTY configuration, configure the Host Name and Port of your remote SSH computer­. Enter your Saved Sessions name, and click Save. If your session already exists, Load it as shown below:

Read more

Share