Due to lack of IPv4 address Dhiraagu gives a dynamic IP address to customers.
Unless a customer specifically requests for a static IP address. Even then they allow only for business customers with an extra monthly fee. So the residential customers are left with no choice but to use a dynamic IP. Which in most cases is a good thing. However, this is not good when it comes to hosting because your IP address changes everytime router restarts this would mean you will have to check for the the new IP address. 1 way to do this is searching foryour IP address on google but this isn’t possible if you are not in local network. Another way is to use a service like DynDNS or No-IP on your router if it supports it and the Huawei router dhiraagu sells do not, and from my experience (from Dlink and TP-Link) routers aren’t reliable.
Scenario where someone needs the IP address
- Manager of a small shop or cafe who wants to view DVR remotely
- Gamers who want to host for multiplayer
- Office where they need to host a service locally
- VPN access to an office network
..well the solution is IPv6, but let’s face it fossils everywhere. Lucky for us, Dhiraagu shows the IP address in their web usage portal. My idea was to take the IP address from the portal and send to No-IP for DNS update, So I have come up with a script to do just that.
- Dhiraagu Fibre or ADSL connection
- No-IP Account Register here
- A Computer to host the script
Setup - Registering and testing
- Set a username for your No-IP account.
- Create a new hostname from No-IP.
- Save the script with a
.pyfile extension. I saved it as ipupdate.py
- Edit quotes in line 5 to 9 with the corresponding detail.
- Run the script.
Setup - Deploy
Since you will need to have the Domain auto-updated, I Would recommend using Cron job for it. To do that:
crontab -ein the terminal, Select an editor you want (I like
- Add this line
and save it by
Custom Domain and DDoS Protection
The free domain no-ip gives is a subdomain of their domains, which might be fine depending on your application but if you own a domain and want to use it, You can add a CNAME record to your domain.
This may not be applicable depending on your service, but for DDoS of web service (Cafe DVR) you can use CloudFlare