Fresh snap install not listening on IPv4

I’m able to connect from my LAN but not from my WAN because my fw doesn’t pass IPv6 (and I don’t want it to). I’ve tried reinstalling and even rebuilding the VM from scratch (Ubuntu 20). What am I doing wrong? Or maybe, how do I enable IPv4 listening post-installation?

Here’s my command history
154 sudo snap install nextcloud
159 sudo nextcloud.manual-install nextcloud-user password
161 sudo nextcloud.occ config:system:set trusted_domains 1
163 sudo ufw status
164 sudo ufw show listening


sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
443/tcp                    ALLOW       Anywhere
OpenSSH (v6)               ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
443/tcp (v6)               ALLOW       Anywhere (v6)
sudo ufw show listening
  111 * (rpcbind)
  22 * (sshd)
   [ 1] allow OpenSSH

  111 * (rpcbind)
  22 * (sshd)
   [ 4] allow OpenSSH

  80 * (httpd)
   [ 5] allow 80/tcp

  111 * (rpcbind)
  5353 * (mdns-publisher)
  111 * (rpcbind)
  5353 * (mdns-publisher)


I am sorry, but if you are able to access from LAN, that means Nextcloud Snap is definitely listening on 80/443.

If same setup is working fine on LAN but not on WAN, I guess it’s something to do with your network setup or domain DNS setup.


What would it take for you to believe me? I added the ufw show listening result that shows it’s not listening.

Not sure what ufw show listening is supposed to show, but I can tell you for sure, that IPv4 is working, if you can access your Snap installation from LAN by using http://IPv4-address in a browser. A possible explanation why it only displays tcp6 can be found here… linux - netstat — why are IPv4 daemons listening to ports listed only in -A inet6? - Unix & Linux Stack Exchange

@bb77 and @NaXal are right, if you can reach it from your LAN the snap is working properly. Your problem is elsewhere.

That’s apache from the snap right there ^. It uses address mapping to translate ipv4.


Maybe you can first deactivate ufw. And if it works you can plan to activate it again to exclude problems from ufw.

Thanks for clarifying that and for the link. I was banging my head for a while and thought I found a misconfiguration in the app stack. I ended up rebuilding, again, and it worked; I’m not sure what I did differently. It was likely something I didn’t do this time that I didn’t realize I did last time. If that makes sense.