Setting up Website with DDNS


Here we will use a Sky router for port forwarding and ddns service.

Noip for DDNS setup

  1. Register an account in https://www.noip.com, confirm and log in the account.
  2. Dynamic DNS → No-IP Hostnames → Create Hostname → Create Hostname with following settings,
  3. 
    Hostname: random
    Domain: ddns.net
    Record Type: DNS Host (A)
    IPv4: auto
        
  4. Install the Linux Dynamic Update Client on Ubuntu. Follow the instructions, all for default.

Router Settings

  1. Login 192.168.0.1.
  2. [DDNS] Advanced tab → Dynamic DNS → Settings → Apply,
  3. 
    Tick Use a Dynamic DNS Service
    Service Provider: www.noip.com
    Host Name: random.ddns.net
    User Name: email
    Password: no ip password
        
  4. [DHCP] Advanced tab → LAN IP Setup → Address Reservation → Add → Settings → Reboot
  5. 
    Reserve An IP Address
    IP Address: check by ifconfig
    MAC Address: auto
    Device: auto
        
  6. [Port Forwarding] Security tab → Services → Add Service →Apply
  7. 
    Edit Custom Service - Port Forwarding
    Name: website
    Type: TCP
    Start Port: 80
    Finish Port: 80
        
  8. [Firewall] Security tab → Firewall Rules → Inbound services → Add → Apply.
  9. 
    IPv4 Settings
    Service: HTTP(TCP:80)
    Action: ALLOW always
    Destination IPv4 LAN address: server ip
    Access from: Any
    Source Ipv4 start finish address: 0.0.0.0
    Log: Always
        

Laptop Firewall

  1. Enable HTTP.
  2. 
    sudo ufw app list
    sudo ufw allow 80
    sudo ufw show added
    sudo ufw enable
        

Laptop Apache2 page

  1. Start apache2.
  2. 
    sudo systemctl stop nginx
    sudo systemctl start apache2
        
  3. Can edit the file /var/www/html/index.html.

References


  1. How to Configure Your No-IP Hostname [my.noip.com]
  2. How to Install the Linux Dynamic Update Client on Ubuntu
  3. Free Dynamic DNS : Getting Started Guide
  4. How to set up port forwarding
  5. How to Configure DDNS (Dynamic DNS) in a Router
  6. Sky SR101 DynamicDNS
  7. How To Set Up a Firewall with UFW on Ubuntu 18.04
  8. How to Start, Stop, or Restart Apache Server on Ubuntu