[webmin-l] Teo En Ming's Notes for Configuring DNS and Creating Virtual Server with Virtualmin and Webmin

Turritopsis Dohrnii Teo En Ming <[email protected]> Tue, 19 Oct 2021 20:48:35 +0800
Newsgroups gmane.comp.web.webmin.general
Message-ID <CAMEJMGGV4ycYrU1duw1w0jU9nrHAyivhOz1fKtVm1K-+BW2T_A@mail.gmail.com>
Subject: Teo En Ming's Notes for Configuring DNS and Creating Virtual
Server with Virtualmin and Webmin

Author: Mr. Turritopsis Dohrnii Teo En Ming (TARGETED INDIVIDUAL)
Country: Singapore
Date: 18 Oct 2021 Monday Singapore Time

Type of publication: Plain Text
Document Version: 20211018.01

DETAILED INSTRUCTIONS
======================

Create Virtual Server
======================

Reference Guide: Add a New Website/Virtual Server/Domain to Virtualmin
Link: https://vpsfix.com/4308/add-website-virtualmin-nginx/

Login to Virtualmin.

Click Create Virtual Server on the left menu.

Domain name: turritopsis-dohrnii-teo-en-ming.com

Description: Turritopsis Dohrnii Teo En Ming's Domain

Administration password: <REMOVED>

SSH public key: No default key

Server configuration template: Default settings

Account Plan: Default Plan

Administration username: Automatic

Enabled features
================

Check Setup DNS zone

Check Setup Apache website

Check Setup Apache SSL website

Check Create MariaDB database

Check Accept mail for domain

Check Setup spam filtering

Check Setup virus filtering

Check Setup Webalizer for web logs

Check Create Webmin login

Check Enable AWstats reporting

Uncheck Setup IP-based virtual FTP

Click Create Server

Setting Up Virtual Server
==========================
In domain turritopsis-dohrnii-teo-en-ming.com

Creating administration group turritopsis-dohrnii-teo-en-ming ..
.. done
Creating administration user turritopsis-dohrnii-teo-en-ming ..
.. done
Creating aliases for administration user ..
.. done
Adding administration user to groups ..
.. done
Creating home directory ..
.. done
Creating mailbox for administration user ..
.. done
Adding new DNS zone ..
.. done
Adding to email domains list ..
.. done
Adding default mail aliases ..
.. done
Adding new virtual website ..
.. done
Adding webserver user apache to server's group ..
.. done
Performing other Apache configuration ..
.. done
Setting up scheduled Webalizer reporting ..
.. done
Creating SSL certificate and private key ..
.. done
Adding new SSL virtual website ..
.. done
Setting up log file rotation ..
.. done
Creating MariaDB login ..
.. done
Creating MariaDB database turritopsis_dohrnii_teo_en_ming ..
.. done
Setting up spam filtering ..
.. done
Setting up virus filtering ..
.. done
Setting up AWstats reporting ..
.. done
Setting up password protection for AWstats ..
.. done
Creating Webmin user ..
.. done
Saving server details ..
.. done
Re-starting DNS server ..
.. done
Applying web server configuration ..
.. done
Re-starting Webmin ..
.. done
Re-starting Usermin ..
.. done
Re-loading Webmin ..
.. done
Requesting a certificate for turritopsis-dohrnii-teo-en-ming.com,
www.turritopsis-dohrnii-teo-en-ming.com,
mail.turritopsis-dohrnii-teo-en-ming.com,
admin.turritopsis-dohrnii-teo-en-ming.com,
webmail.turritopsis-dohrnii-teo-en-ming.com from Let's Encrypt ..

.. request failed : Web-based validation failed :

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Account registered.
Requesting a certificate for turritopsis-dohrnii-teo-en-ming.com and 4
more domains
Performing the following challenges:
http-01 challenge for admin.turritopsis-dohrnii-teo-en-ming.com
http-01 challenge for mail.turritopsis-dohrnii-teo-en-ming.com
http-01 challenge for turritopsis-dohrnii-teo-en-ming.com
http-01 challenge for webmail.turritopsis-dohrnii-teo-en-ming.com
http-01 challenge for www.turritopsis-dohrnii-teo-en-ming.com
Using the webroot path
/home/turritopsis-dohrnii-teo-en-ming/public_html for all unmatched
domains.
Waiting for verification...
Challenge failed for domain admin.turritopsis-dohrnii-teo-en-ming.com
Challenge failed for domain mail.turritopsis-dohrnii-teo-en-ming.com
Challenge failed for domain turritopsis-dohrnii-teo-en-ming.com
Challenge failed for domain webmail.turritopsis-dohrnii-teo-en-ming.com
Challenge failed for domain www.turritopsis-dohrnii-teo-en-ming.com
http-01 challenge for admin.turritopsis-dohrnii-teo-en-ming.com
http-01 challenge for mail.turritopsis-dohrnii-teo-en-ming.com
http-01 challenge for turritopsis-dohrnii-teo-en-ming.com
http-01 challenge for webmail.turritopsis-dohrnii-teo-en-ming.com
http-01 challenge for www.turritopsis-dohrnii-teo-en-ming.com
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: admin.turritopsis-dohrnii-teo-en-ming.com
   Type:   dns
   Detail: DNS problem: NXDOMAIN looking up A for
   admin.turritopsis-dohrnii-teo-en-ming.com - check that a DNS record
   exists for this domain

   Domain: mail.turritopsis-dohrnii-teo-en-ming.com
   Type:   dns
   Detail: DNS problem: NXDOMAIN looking up A for
   mail.turritopsis-dohrnii-teo-en-ming.com - check that a DNS record
   exists for this domain

   Domain: turritopsis-dohrnii-teo-en-ming.com
   Type:   dns
   Detail: No valid IP addresses found for
   turritopsis-dohrnii-teo-en-ming.com

   Domain: webmail.turritopsis-dohrnii-teo-en-ming.com
   Type:   dns
   Detail: DNS problem: NXDOMAIN looking up A for
   webmail.turritopsis-dohrnii-teo-en-ming.com - check that a DNS
   record exists for this domain

   Domain: www.turritopsis-dohrnii-teo-en-ming.com
   Type:   dns
   Detail: DNS problem: NXDOMAIN looking up A for
   www.turritopsis-dohrnii-teo-en-ming.com - check that a DNS record
   exists for this domain

DNS-based validation failed :

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Requesting a certificate for turritopsis-dohrnii-teo-en-ming.com and 4
more domains
Performing the following challenges:
dns-01 challenge for admin.turritopsis-dohrnii-teo-en-ming.com
dns-01 challenge for mail.turritopsis-dohrnii-teo-en-ming.com
dns-01 challenge for turritopsis-dohrnii-teo-en-ming.com
dns-01 challenge for webmail.turritopsis-dohrnii-teo-en-ming.com
dns-01 challenge for www.turritopsis-dohrnii-teo-en-ming.com
Running manual-auth-hook command: /etc/webmin/webmin/letsencrypt-dns.pl
Running manual-auth-hook command: /etc/webmin/webmin/letsencrypt-dns.pl
Running manual-auth-hook command: /etc/webmin/webmin/letsencrypt-dns.pl
Running manual-auth-hook command: /etc/webmin/webmin/letsencrypt-dns.pl
Running manual-auth-hook command: /etc/webmin/webmin/letsencrypt-dns.pl
Waiting for verification...
Challenge failed for domain admin.turritopsis-dohrnii-teo-en-ming.com
Challenge failed for domain mail.turritopsis-dohrnii-teo-en-ming.com
Challenge failed for domain turritopsis-dohrnii-teo-en-ming.com
Challenge failed for domain webmail.turritopsis-dohrnii-teo-en-ming.com
Challenge failed for domain www.turritopsis-dohrnii-teo-en-ming.com
dns-01 challenge for admin.turritopsis-dohrnii-teo-en-ming.com
dns-01 challenge for mail.turritopsis-dohrnii-teo-en-ming.com
dns-01 challenge for turritopsis-dohrnii-teo-en-ming.com
dns-01 challenge for webmail.turritopsis-dohrnii-teo-en-ming.com
dns-01 challenge for www.turritopsis-dohrnii-teo-en-ming.com
Cleaning up challenges
Running manual-cleanup-hook command: /etc/webmin/webmin/letsencrypt-cleanup.pl
Running manual-cleanup-hook command: /etc/webmin/webmin/letsencrypt-cleanup.pl
Running manual-cleanup-hook command: /etc/webmin/webmin/letsencrypt-cleanup.pl
Running manual-cleanup-hook command: /etc/webmin/webmin/letsencrypt-cleanup.pl
Running manual-cleanup-hook command: /etc/webmin/webmin/letsencrypt-cleanup.pl
Some challenges have failed.
IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: admin.turritopsis-dohrnii-teo-en-ming.com
   Type:   dns
   Detail: DNS problem: NXDOMAIN looking up TXT for
   _acme-challenge.admin.turritopsis-dohrnii-teo-en-ming.com - check
   that a DNS record exists for this domain

   Domain: mail.turritopsis-dohrnii-teo-en-ming.com
   Type:   dns
   Detail: DNS problem: NXDOMAIN looking up TXT for
   _acme-challenge.mail.turritopsis-dohrnii-teo-en-ming.com - check
   that a DNS record exists for this domain

   Domain: turritopsis-dohrnii-teo-en-ming.com
   Type:   dns
   Detail: DNS problem: NXDOMAIN looking up TXT for
   _acme-challenge.turritopsis-dohrnii-teo-en-ming.com - check that a
   DNS record exists for this domain

   Domain: webmail.turritopsis-dohrnii-teo-en-ming.com
   Type:   dns
   Detail: DNS problem: NXDOMAIN looking up TXT for
   _acme-challenge.webmail.turritopsis-dohrnii-teo-en-ming.com - check
   that a DNS record exists for this domain

   Domain: www.turritopsis-dohrnii-teo-en-ming.com
   Type:   dns
   Detail: DNS problem: NXDOMAIN looking up TXT for
   _acme-challenge.www.turritopsis-dohrnii-teo-en-ming.com - check
   that a DNS record exists for this domain

Creating initial website index page ..
.. done
Re-starting Webmin ..
.. done
Re-starting Usermin ..
.. done

Edit Virtual Server
===================
In domain turritopsis-dohrnii-teo-en-ming.com

Domain name turritopsis-dohrnii-teo-en-ming.com
Administration username turritopsis-dohrnii-teo-en-ming (For MariaDB
database : turritopsis-dohr)
Administration group turritopsis-dohrnii-teo-en-ming
Created on 10/18/2021 3:37:59 PM by root
Home directory /home/turritopsis-dohrnii-teo-en-ming
IP addresses 185.182.9.61 (185.182.9.61 externally)
Domain ID 163456425212159

Click Save Virtual Server

Delete Virtual Server
=====================

Delete virtual server because requesting for Let's Encrypt SSL
certificates failed.

On the left menu, click Disable and Delete > Delete Virtual Server

Delete Server
==============
In domain turritopsis-dohrnii-teo-en-ming.com

Are you sure you want to delete the virtual server
turritopsis-dohrnii-teo-en-ming.com, which has 3.21 MiB of files? The
following features will be deleted :
Administration user - The administration user and group for this
virtual server will be deleted.
Home directory - The home directory for this virtual server,
containing all website and otherwise, will be deleted.
BIND DNS domain - All DNS records in the domain and any BIND options
will be deleted.
Apache website - All Apache directives in the virtual host will be removed.
Apache SSL website - All Apache directives in the SSL virtual host
will be removed.
MariaDB database - All MariaDB databases, all tables and the server's
MariaDB login will be deleted.
Mail for domain - The mail server will no longer accept email for this domain.
Spam filtering - The SpamAssassin configuration for this virtual
server will be deleted.
Virus filtering - The Procmail entry to filter viruses for this
virtual server will be removed.
Log file rotation - The Logrotate configuration for the virtual
server's log files will be deleted.
Webalizer reporting - Scheduled generation of a report based on the
website's logs will be turned off.
Webmin login - The Webmin user for this virtual server will be deleted.
AWstats reporting - Scheduled AWstats reporting will be disabled, and
its configuration deleted
Mail aliases - 4 mail aliases will be deleted.

Click Yes, Delete it

Setting up DNS on the Master DNS Server (aka Virtualmin Server)
================================================================

Reference Guide: How to Set Up Authoritative DNS Servers with Webmin
Link: https://www.linuxbabe.com/linux-server/set-up-authoritative-dns-servers-webmin

Master DNS Server Configuration
================================

Login to Virtualmin.

Then click Webmin on the top left.

Click Servers > BIND DNS Server > Create master zone

Zone type: Forward (Names to Addresses)

Domain name / Network: turritopsis-dohrnii-teo-en-ming.com

Records file: Automatic

Master server: ns1.turritopsis-dohrnii-teo-en-ming.com

Check Add NS Record for master server?

Email address: [email protected]

Leave other fields to the default settings.

Click Create.  You will be taken to the Edit master zone page where
you can add DNS records to this zone.

NS Record
=========

Click Name Server button.

By default, there’s only one NS record for a new zone. We need to add
another NS record.

Zone Name: turritopsis-dohrnii-teo-en-ming.com

Name Server: ns2.turritopsis-dohrnii-teo-en-ming.com.

Click Create.

Click Return to record types.

A Record
========

Click Address button.

Name: ns1.turritopsis-dohrnii-teo-en-ming.com

Address: 185.182.9.61

Update reverse? No

Click Create.

Name: ns2.turritopsis-dohrnii-teo-en-ming.com

Address: 185.182.9.61

Update reverse? No

Click Create.

Name: admin.turritopsis-dohrnii-teo-en-ming.com

Address: 185.182.9.61

Update reverse? No

Click Create.

Name: mail.turritopsis-dohrnii-teo-en-ming.com

Address: 185.182.9.61

Update reverse? No

Click Create.

Name: turritopsis-dohrnii-teo-en-ming.com

Address: 185.182.9.61

Update reverse? No

Click Create.

Name: webmail.turritopsis-dohrnii-teo-en-ming.com

Address: 185.182.9.61

Update reverse? No

Click Create.

Name: www.turritopsis-dohrnii-teo-en-ming.com

Address: 185.182.9.61

Update reverse? No

Click Create.

Name: hosting.turritopsis-dohrnii-teo-en-ming.com

Address: 185.182.9.61

Update reverse? No

Click Create.

Click Return to record types.

MX Record
==========

Click the Mail Server button.

Name: turritopsis-dohrnii-teo-en-ming.com

Mail server: mail.turritopsis-dohrnii-teo-en-ming.com

Priority: 0

Click Create.

Click Return to record types.

SPF Record
===========

Click Sender Permitted From button.

Name: turritopsis-dohrnii-teo-en-ming.com

Allow sending from domain's MX hosts? Yes

Additional allowed sender IP addresses/networks: 185.182.9.61

Action for other senders: Discourage (~all)

Click Create.

Click Return to record types.

DKIM Record
============

I will skip creating DKIM record temporarily. But I will definitely
come back to create a DKIM record as soon as possible.

DMARC Record
=============

Click DMARC button.

Percentage of messages to apply policy: 100%

Send aggregate feedback to: [email protected]

Click Create.

Click Return to records type.

Check DNS Records for Syntax Errors
===================================

Click Check Records

No errors were found in the records file
/var/named/turritopsis-dohrnii-teo-en-ming.com.hosts.

Click Return to record types

VERY VERY IMPORTANT
===================

Do not forget to click Apply configuration.

Slave DNS Server Configuration
==============================

I don't have a Slave DNS Server at the moment. Hence I will skip
configuring Slave DNS Server and zone transfer temporarily. I may
order another VPS to setup a Slave DNS Server in future.

Making Changes at the Domain Registrar
=======================================

Login to your domain registrar. In my case it is namecheap.

On the left menu, click Domain List.

Check domain name turritopsis-dohrnii-teo-en-ming.com and click Manage.

Click Advanced DNS.

Scroll down to PERSONAL DNS SERVER.

Click ADD NAMESERVER.

Nameserver: NS1

IP Address: 185.182.9.61

Click DONE.

Click ADD NAMESERVER.

Nameserver: NS2

IP Address: 185.182.9.61

Click DONE.

After adding your two name servers, click the search button to check
if they are added successfully. If so, the glue records will appear at
the bottom of this page.

Now, click the Domain tab.

Under NAMESERVERS, select Custom DNS.

Nameserver 1: ns1.turritopsis-dohrnii-teo-en-ming.com

Nameserver 2: ns2.turritopsis-dohrnii-teo-en-ming.com

Click the green check mark.

Sign out from namecheap.

Create Virtual Server Again
===========================

Login to Virtualmin.

Click Create Virtual Server on the left menu.

Domain name: turritopsis-dohrnii-teo-en-ming.com

Description: Turritopsis Dohrnii Teo En Ming's Domain

Administration password: <REMOVED>

SSH public key: No default key

Server configuration template: Default settings

Account Plan: Default Plan

Administration username: Automatic

Enabled features
================

Check Setup DNS zone

Check Setup Apache website

Check Setup Apache SSL website

Check Create MariaDB database

Check Accept mail for domain

Check Setup spam filtering

Check Setup virus filtering

Check Setup Webalizer for web logs

Check Create Webmin login

Check Enable AWstats reporting

Uncheck Setup IP-based virtual FTP

Click Create Server

Error
=====

Failed to create virtual server : The DNS domain
turritopsis-dohrnii-teo-en-ming.com is already hosted by your DNS
server

Click Return to previous page.

Attempt to Create Virtual Server for the 3rd time
=================================================

Login to Virtualmin.

Click Create Virtual Server on the left menu.

Domain name: www.turritopsis-dohrnii-teo-en-ming.com

Description: Turritopsis Dohrnii Teo En Ming's Domain

Administration password: <REMOVED>

SSH public key: No default key

Server configuration template: Default settings

Account Plan: Default Plan

Administration username: Automatic

Enabled features
================

Check Setup DNS zone

Check Setup Apache website

Check Setup Apache SSL website

Check Create MariaDB database

Check Accept mail for domain

Check Setup spam filtering

Check Setup virus filtering

Check Setup Webalizer for web logs

Check Create Webmin login

Check Enable AWstats reporting

Uncheck Setup IP-based virtual FTP

Click Create Server

Error
=====

Failed to create virtual server : The domain name does not need to
have www at the start

Final Thoughts
==============

Hmmmmmmmmmm, I cannot create virtual server using my domain name
turritopsis-dohrnii-teo-en-ming.com after configuring DNS using Webmin
manually. It looks like I need to configure custom DNS servers at my
domain registrar first, then create virtual server,  and then
fine-tune DNS records. I shouldn't configure DNS with Webmin manually.
This is my very first time setting up Virtualmin and Webmin, so I am
not that familiar with the setup process.

Mr. Turritopsis Dohrnii Teo En Ming, 43 years old as of 19 Oct 2021,
is a TARGETED INDIVIDUAL living in Singapore. He is an IT Consultant
with a Systems Integrator (SI)/computer firm in Singapore. He is an IT
enthusiast.





-----BEGIN EMAIL SIGNATURE-----

The Gospel for all Targeted Individuals (TIs):

[The New York Times] Microwave Weapons Are Prime Suspect in Ills of
U.S. Embassy Workers

Link:
https://www.nytimes.com/2018/09/01/science/sonic-attack-cuba-microwave.html

********************************************************************************************

Singaporean Targeted Individual Mr. Turritopsis Dohrnii Teo En Ming's
Academic Qualifications as at 14 Feb 2019 and refugee seeking attempts
at the United Nations Refugee Agency Bangkok (21 Mar 2017), in Taiwan
(5 Aug 2019) and Australia (25 Dec 2019 to 9 Jan 2020):

[1] https://tdtemcerts.wordpress.com/

[2] https://tdtemcerts.blogspot.sg/

[3] https://www.scribd.com/user/270125049/Teo-En-Ming

-----END EMAIL SIGNATURE-----


-
Forwarded by the Webmin mailing list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-list