Hi I have a fresh install of Ubuntu 18.04 server. I have installed the LAMP stack and Nextcloud. It is working well except I can not access the server remotely with firefox or ssh. On the LAN both work fine. I have port forwarding set up on my router the same as it was when the server was 14.4LTS. I tried forwarding port 2000 this worked fine with nc but not with ssh. I can ping the server. The server has a static LAN ip address and I am using no-ip ddns for a domain name. I have disabled the ufw firewall. When connected to external wifi and I enter the server url the connection times out. When I try to connect using ssh after a few seconds I get: "ssh_exchange_identification: read: Connection reset by peer" This version of Ubuntu came with netplan. From various posts I have set the contents of the /etc/netplan/50-cloud-init.yaml file to:
network: # renderer: networkd ethernets: enp2s0: dhcp4: no dhcp6: no addresses: [192.168.1.12/24] gateway4: 192.168.1.1 nameservers: addresses: [188.8.131.52,184.108.40.206] version: 2
The renderer is commented out as it stopped the file working also I read a post saying to comment out gateway4. I tried that but it stopped LAN connection. Any help would be appreciated.