Self-Hosting in Malaysia: Overcoming CGNAT for Your Homelab

Search for a command to run...

Good day, Mr.Hong, thank you for sharing this blog post, reading it has helped me plan for my homelab networking to be used outside of my local network. Regarding the ISP in Malaysia using CGNAT, i am abit confused because when i query chatgpt regarding external access to my computers, it mentioned that using DDNS would not work if the ISP is using CGNAT, but i would assume that you got it working using DDNS, would it mean that the ISP in Malaysia are not using CGNAT? Thank you for reading. Your insight in this topic would be much appreciated.
With CGNAT, you are sharing a pool of public IPs with other subscribers. So even with DDNS setup, incoming connections will not be forwarded to you. You need to get a dedicated public IP address.
I am a MAXIS Fiber subscriber, MAXIS is using CGNAT. Setting up DDNS alone is not enough. In this article I mentioned additionally paying RM 10.00 monthly for allocating public IP. That allocated (dynamic) public IP will be dedicated to me and not shared with other subscribers. Then I setup DDNS to point (sub)domain names to this public IP.
Hi Hong,
Your guide on beating CGNAT for a Malaysian homelab is genuinely useful, especially the RM 10 public IP tip. After someone requests that public IP from their ISP, they usually want to confirm it actually changed. I run whatsmyiplive.com , a free tool that shows the current public IP with no signup. It could be a small addition right after the public IP allocation step. Thanks for the clear writeup.
Dikshant
Most AI agents that support scheduled tasks have two sources of instruction when a cron job fires: The cron prompt — the task-specific instructions you wrote when scheduling the job The skill — a re

TL;DR Scarp draw result, host on GitHub, retrieve it like API at damacai.hongineer.com. Data Scraping I have previously shared a technique for scraping Da Ma Cai draw result. Now I finally have time t

This is a Bash script that check if the replica (slave) health status. If there is an issue, it will exist with non-zero status. This is useful when used with monitoring tools like [Monit](https://mmo

chmod is a command-line utility used to change the access permissions of file system objects such as files and directories. It allows you to control who can read, write, and execute those objects. Changing Permissions Using Octal Notation Example Usa...
chown changes the ownership of files and directories. This involves modifying the user and/or group associated with a file, determining who has access and permissions. Changing File Ownership to a Specific User Example Usage: chown user file.txt What...
Dreaming of running your own server or "homelab" in Malaysia? Many internet service providers (ISPs) like TM Unifi and Maxis Fiber utilize Carrier-Grade NAT (CGNAT) for IPv4 address management. This means your home router is assigned a private IP address, not a public one, which prevents direct external access to your server or even your Wi-Fi camera when you're away. But don't worry, there are effective solutions!
Both TM Unifi and Maxis Fiber offer a straightforward solution: a public IP address allocation for a nominal monthly fee of RM 10. Simply contact their customer service hotline to request this. They will schedule a date for the change, which usually just requires you to restart your router. The best part? No complex configurations are needed on your end.
Important Note: This is a dynamic public IP address, meaning it will change periodically. For seamless access, you'll want to pair this with a dynamic DNS solution (covered next).
Constantly tracking a changing IP address is impractical. The ideal solution is to use a (sub)domain name to access your homelab. This is where Dynamic DNS (DDNS) comes in.
My Preferred Method: Custom Domain with Cloudflare
I personally recommend purchasing your own domain name (e.g., from Namecheap) and managing its DNS records through Cloudflare. Cloudflare offers robust DNS management and additional security features. To keep your domain linked to your dynamic IP, you can set up a cron job to execute a simple shell script that automatically updates your DNS records via the Cloudflare API. (Pro-tip: AI tools can even help you generate this script!)
Free Alternative: Duck DNS
For those on a budget or looking for a quick setup, Duck DNS provides free subdomains and ready-to-use scripts for automatic DNS record updates. Additionally, if your router has built-in Dynamic DNS (DDNS) support, you can often configure it directly with a service like Duck DNS for automatic IP updates.
For more robust or specialized homelab setups, consider these advanced methods:
By implementing these strategies, you can easily overcome the challenges of CGNAT and unlock the full potential of self-hosting your homelab in Malaysia.