How to set MOSH

Setting about ufw(firewall)

When you use port-forwarding on your internet router

You should make UDP 60000~61000 port-forwarding too.
Mosh tries to connect YOUR_IP and, if you use port-forwarding, it is your router’s ip.