@jonathan thank you for the suggestion.
It works with localhost. However, if I type the ip address of the machine but locally it doesn't work. Only using the localhost path which is strange because it always worked before with the ip.
This is what I get:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 1211/smbd
tcp 0 0 127.0.0.1:8787 0.0.0.0:* LISTEN 792/rserver
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 671/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 850/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 688/cupsd
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 1211/smbd
tcp6 0 0 :::139 :::* LISTEN 1211/smbd
tcp6 0 0 :::22 :::* LISTEN 850/sshd
tcp6 0 0 ::1:631 :::* LISTEN 688/cupsd
tcp6 0 0 :::445 :::* LISTEN 1211/smbd
udp 0 0 0.0.0.0:44996 0.0.0.0:* 726/avahi-daemon: r
udp 25344 0 127.0.0.53:53 0.0.0.0:* 671/systemd-resolve
udp 0 0 0.0.0.0:68 0.0.0.0:* 916/dhclient
udp 39936 0 157.193.167.255:137 0.0.0.0:* 989/nmbd
udp 1536 0 157.193.167.244:137 0.0.0.0:* 989/nmbd
udp 39936 0 0.0.0.0:137 0.0.0.0:* 989/nmbd
udp 26496 0 157.193.167.255:138 0.0.0.0:* 989/nmbd
udp 0 0 157.193.167.244:138 0.0.0.0:* 989/nmbd
udp 30080 0 0.0.0.0:138 0.0.0.0:* 989/nmbd
udp 23936 0 0.0.0.0:631 0.0.0.0:* 767/cups-browsed
udp 43840 0 0.0.0.0:5353 0.0.0.0:* 726/avahi-daemon: r
udp6 0 0 :::40433 :::* 726/avahi-daemon: r
udp6 29184 0 :::5353 :::* 726/avahi-daemon: r
The strange part here is that the firewall is disabled, and on the local machine it suddenly started working when using the localhost path. However, if I try to access it from a remote machine it doesn't work. But supposedly it is listening, so I'm not sure what could be the problem here.
I've contacted the network guys and they changed nothing in the network.