I’m unable to access the DB unless I’m SSH’d into the machine
I forgot to include the machine, I’m currently using a raspberry pi 5 on Ubuntu Server 24.04 LTS / Noble
The firewall is currently disabled as shown below. If it is enabled (which it will be but for testing/development, it’s disabled), I have allowed access to the device as shown below.
sudo ufw status
Status: inactive
Status: active
To Action From
-- ------ ----
27017 ALLOW PUBLIC_IP
22 ALLOW PUBLIC_IP
Again, just to confirm … with the firewall totally disabled, you can connect?
And when you enable the firewall, even with the port exception, you cannot connect?
Can you curl to the port when the firewall is enabled?
Well, something is blocking you. What’s the environment you’re connecting from? Corporate? Your corporate firewall could be forbidding access to “strange” ports.
How does your home environment work?
Looks like you’re using DHCP … is the DHCP server your ISP’s network device?
Have you checked the firewall settings in that device?
Yes, it is that, and there are no firewall settings configured. I’ve only done port forwarding, but that’s to my PC, and it’s a very simple/straightforward thing.
The home environment is very simple. Everything in my room uses an ethernet cable with 2 basic ethernet switches.
You might try once connecting your PC and the MongoDB Raspberry Pi directly via an ethernet cable, assign them static addresses, leave out the entire rest of the network, and see if it works. Simple sanity check.