For something simpler, you could try ping also. In my case ping works both ways, I can ping my Librem 5 from my laptop and I can ping the laptop from the Librem 5. But probably ping will also fail for you, as @AN0N is saying it may be that different devices on your network are not allowed to reach each other.
Another test you could do, if you have another laptop at hand, is to see if the two laptops can reach each other using ping and/or ssh. If that does not work, then you know you have an issue with your network that is not related to the Librem 5, but a more general thing.
You could also try with another WiFi network, like at a friend’s house or something, to see if it works there. I don’t know how common it is for devices to be allowed to talk directly like this on a wireless network, I just know that it happens to work with my WiFi at home. (And I guess it seems to work for several other people who have managed to login to their Librem 5 using ssh.)
Looks like the browser problem is fixed now. I got an update of the libwebkit2gtk package when installing the latest updates today, and now the browser is working again.
Connecting to loopback didn’t work. I haven’t changed the password so it is still 123456 in the lockscreen, but that isn’t the correct one for ssh.
ssh pureos@127.0.0.1
I checked around in the /etc/passwd and shadow files and realized that the user is not pureos, but purism. So running ssh purism@127.0.0.1, with password 123456 works.
Now I have the solution It was two problems. The router I used had some isolation, so I tested another one (my iPhone), which worked. Then the problem was with the user which was purism instead of pureos. Thanks everyone for the help!