DDNS for RDP and SSH


Here the setup is similar to DDNS with Website.

Router Settings

  1. Login 192.168.0.1.
  2. [DDNS] Advanced tab → DDNS → Settings → Apply,
  3. 
    Enable DDNS
    Service Provider: www.noip.com
    Host Name: random.ddns.net
    User Name: email
    Password: noip pwd    
        
  4. [DHCP] Advanced tab → LAN IP Setup → Address Reservation for raspberry pi → Add → Settings → Reboot,
  5. 
    Reserve an IP
    IP Address: 192.168.0.x
    MAC Address: [ip addr show | grep link/ether]
    Device: auto
        
  6. [Port Forwarding] Security tab → Services → Add Service → Apply
  7. 
    Name: remoteSSH / remoteRDP
    Type: TCP/UDP
    Start Port: 22/3389
    Finish Port: 22/3389 # target ports in pi
        
  8. [Firewall] Security tab → Firewall Rules → Inbound Services → Add → Apply,
  9. 
    Service: SSH(22)/RDP(3389)
    Action: ALLOW Always
    Destination IPv4 LAN address: pi ip
    Access from: Any
    Source IPv4 start finish address: 0.0.0.0
    Log: Always
        

Pi Settings

  1. Enable SSH and RDP firewall
  2. 
    sudo ufw allow 22
    sudo ufw allow 3389
    sudo ufw enable
        
  3. Enable SSH and RDP.

Client access


ssh pi@random.ddns.net # pwd 
sudo journalctl -t sshd # check sshd log
# rdp username:pi, server:random.ddns.net
    

Phone Client access

References


  1. Where is the SSH log path?