NoCache

Preview of Setup Cloudflare Dynamic DNS (DDNS) with CLI on Windows, Mac, Linux

Setup Cloudflare Dynamic DNS (DDNS) with CLI on Windows, Mac, Linux

Cyrus Kao

Cloudflare API v4 enables users to update DNS records programmatically, which makes Dynamic DNS (DDNS) implementation possible. I recently wrote a CLI tool called cf-ddns-cli in Node.js to update DNS A (IPv4) and AAAA (IPv6) records with your current IP address, and it's available in Windows, Mac and Linux.

Preview of Disable Direct IP Address Access in Nginx on Linux

Disable Direct IP Address Access in Nginx on Linux

Cyrus Kao

Nginx's server_name directive indicates the domain name it's listening on. But if none of the server blocks match the incoming request, it will still fall back to the last HTTP/HTTPS server block. So direct access by IP address will probably be caught by some route instead of being dropped, which is often not ideal.

Preview of Restore Real IP Address From Cloudflare CDN in Nginx

Restore Real IP Address From Cloudflare CDN in Nginx

Cyrus Kao

Cloudflare CDN works just like a reverse proxy, it sits in front of your web servers and forwards client requests to them. So the requests reaching your server actually came from Cloudflare. To restore the original client's IP address, we'll be using ngx_http_realip_module in Nginx to retrieve them from headers.

Preview of How to Enable IPv6 for Your Website in Nginx

How to Enable IPv6 for Your Website in Nginx

Cyrus Kao

According to Google's IPv6 adoption statistics, more than 30% of the Internet users are using IPv6 in 2021. In some countries, like France and Germany even have adoption rates over 50%, which makes it essential to adopt IPv6 on your website for international users.

Preview of Change DNS Servers (IPv4, IPv6) on Linux

Change DNS Servers (IPv4, IPv6) on Linux

Cyrus Kao

In my opinion, changing DNS servers on Linux is even easier than in Windows. As you only need to do it once and it applies to all the network interfaces. In this guide we'll be covering how to configure DNS servers on all Linux distros and prevent DNS settings from changing by other services.