News for hackers. Stuff that matters.
Re:How to make “localhost” slightly less local by svnpenn on Saturday April 02, 2022 @01:38PM (#30890050)
Is it possible to access the local site from another network? Like run a local server, that I can access from my phone outside of the house? I looked into this before, but I could never find a simple solution.
Re:How to make “localhost” slightly less local by jeroenhd on Saturday April 02, 2022 @03:30PM (#30890992)
With IPv6: yes, if you open the port in your firewall.

With IPv4 you can do it with a port forward, but the IP listed isn't the same as the IP you'll actually receive the connection on. You can get your external IP relatively easily with `curl ifconfig.co`.

If firewalls or port forwards aren't available to you, pick any of the popular port forwarding methods (here's a list: https://github.com/anderspitman/awesome-tunneling). I'm a big fan of just SSH-ing into an internet connected machine myself (`ssh -R 0.0.0.0:3000:127.0.0.1:3000 server.on.the.inter.net` will expose localhost:3000 on server.on.the.inter.net:3000 and encrypt the traffic between you and the server as an added bonus!) but there are plenty of paid and sketchy alternatives if you don't have a server to SSH into.

Re:How to make “localhost” slightly less local by svnpenn on Saturday April 02, 2022 @03:47PM (#30891115)
> If firewalls or port forwards aren't available to you

I don't know if they are or not. I am just a regular person with a home computer. I know how to set up a run a basic localhost server, but I don't really know about the other stuff you're talking about.

Re:How to make “localhost” slightly less local by jeroenhd on Saturday April 02, 2022 @07:21PM (#30892577)
You can follow any Minecraft server guide to make your web server accessible to other users; enter 80 where the guides enter 25565 and it should work relatively flawlessly.

If you're thinking of diving deeper into development, I'd recommend you take the time to learn about computer networking. It's not a necessity if your end goal is to stuff HTML/CSS/JS files into a server somewhere, but it'd make your life a lot easier down the line.

Re:How to make “localhost” slightly less local by svnpenn on Saturday April 02, 2022 @08:59PM (#30893193)
I asked for something simple, this is the opposite of that:

https://minecraft.fandom.com/wiki/Tutorials/Setting_up_a_ser...

Re:How to make “localhost” slightly less local by jeroenhd on Sunday April 03, 2022 @05:38AM (#30895664)
I meant guides like these:

- https://www.wikihow.com/Portforward-Minecraft

- https://www.technewstoday.com/port-forward-minecraft/

- https://www.youtube.com/watch?v=X75GbRaGzu8

Most of the guide you linked is related to setting up Java and configuring Minecraft itself, you only need the port forwarding bit.

Re:How to make “localhost” slightly less local by skinnymuch on Saturday April 02, 2022 @02:42PM (#30890597)
Tailscale as others have said. ZeroTier if not Tailscale. Both are top notch
Re:How to make “localhost” slightly less local by johnny35 on Saturday April 02, 2022 @01:47PM (#30890133)
Look into Tailscale. Ridiculously easy to set up and free for your use case.
Re:How to make “localhost” slightly less local by newaccount74 on Saturday April 02, 2022 @01:52PM (#30890165)
+1 on Tailscale. It took me time to accept using a closed source free product, but it's just such a nice product -- they focussed on the essentials and it works really well.
Re:How to make “localhost” slightly less local by skinnymuch on Saturday April 02, 2022 @02:43PM (#30890610)
It seems like they have gone past essentials now. Like being able to use any connected device as an endpoint? I haven’t used Tailscale yet past as a mesh network but regardless. It is so well done.
Re:How to make “localhost” slightly less local by mhitza on Saturday April 02, 2022 @01:40PM (#30890074)
Use something like ngrok (or manual ssh tunnels), just be sure to have some authentication in place.