Jul 18, 2023

Ubuntu : Add/Change Apache 2 Ports

Add or Change Apache 2 server ports in Ubuntu.

1. sudo nano /etc/apache2/sites-enabled/intranet.gob.com.my.conf

2. Add line --> <VirtualHost *:80 *:8888>

3. sudo nano /etc/apache2/ports.conf

4. Add line --> Listen 80
                         Listen 8888

5. sudo systemctl restart apache2


!!! HAPPY COMPUTING !!!

Ubuntu : Install Let's Encrypt SSL in Apache 2

Install Let's Encrypt SSL Certificate in Apache 2 Server.

  1. sudo apt install certbot python3-certbot-apache
  2. sudo certbot --apache
  3. Type-in a valid email address.
  4. Terms and Conditions, type --> Y
  5. Marketing, type --> N
  6. Select domain.
Test Certbot Auto Renewal
  1. sudo certbot renew --dry-run

Check Certbot Auto Renewal Status
  1. sudo systemctl status certbot.timer

!!! HAPPY COMPUTING !!!

Jul 11, 2023

Touch 'N Go : How To Add and Reload New NFC Card

 This video is specifically created for the use of people who doesn't have a very good understand on SmartPhone devices and how the new Touch 'N Go NFC card works.

The video is in Chinese (Mandarin) voice thus making it more easily to understand for those who didn't speak English language.


!!! HAPPY COMPUTING !!!


Jul 4, 2023

Ubuntu : Change SSH Port

Whenever deploying an Ubuntu server, accessing and managing it with SSH via LAN (Local Area Network) was never an issues.

But if you wanted to allow SSH access remotely or through Internet, then the standard port must be changed and the server must be protected behind a firewall.

1) To check existing SSH port :-

 sudo cat /etc/ssh/sshd_config | grep Port



2) To change the SSH port :-

 sudo nano /etc/ssh/sshd_config


Search for line --> #Port 22

Add a new line just below it with your preferred new SSH port --> Port [Your New SSH Port Number]
(eg. Port 9222)


3) Restart the SSH service :-

 sudo systemctl restart sshd



4) Also you might want to check UFW (if enabled) to have the specific port enabled :-

 sudo ufw status



5) If the new port was not in the list, run the following command to ALLOW the access :-

 sudo ufw allow 9222/tcp



6) Now you will need to DENY the access of common SSH port number 22 :-

 sudo ufw deny 22/tcp



7) Now you can test the connection of the new port and the old port to confirm the connection is properly configured. Also ensure the firewall also allows the newly created port pass-thru.



!!! HAPPY COMPUTING !!!