Networking
Created Wednesday 05 April 2023
Congrats, you have a web server, or music server or something similar running on your machine. You're able to access it through, for example, http://localhost:8080 or similar.
Now you want the rest of the internet to see it too.
Sadly, this is FAR more complicated than it ought to be, but here are your options:
Ephemeral / Short lived services
There are a number of services that will let you simply connect to their servers, and they'll give you a temporary URL to use. This will be sufficient for my classes, but aren't great for permanent needs, though most of these have a reasonable pay tier as well. No need to do anything with Domains etc.
pinggy.io
https://pinggy.io/ is so far the easiest I've found, since it doesn't even require you to download any new programs, as long as you have the very common SSH. You copy and paste ONE command, just be sure to change the correct port in the command — in a terminal, simply:
ssh -p 443 -R0:localhost:8000 -L4300:localhost:4300 qr@a.pinggy.io
If needed, change the above 8000 to your port. Say yes to all the things and it will give you a url.
ngrok.io
https://ngrok.io is the one most of us have heard of and it's still very good. You have to sign up and download the program and run it, but I'd keep this one as an option because the above is almost too good to be true? As a bonus — while I'm usually not a fan of "signing up with another thing you've signed up with," e.g. Google — I did go ahead and use my github signup here since these things are so closely related. https://zrok.io/ also looks very similar and cool here.
Permanent solutions:
Understanding the problem
What is DNS
You'll NEED
- a public facing IP address and/or public facing url.
Direct (again, some of the below may not be permitted by your ISP)
- In your router, use NAT to forward traffic from the desired computer/port to the desired external port.
- Determine your public IP address
optional things: You may have an issue either if you're on a MAN or if your IP address can change
- Often, your IP address can just change depending on your service. "Dynamic DNS" can be used to get around this. Essentially, you sign up with the service, and you tell your computer to ping that service every once in a while. It will then match THAT IP with a permanent domain. Nearly all paid domain services have this as an option, and there are some free ones (for the price of a crappy domain name) as well, e.g. duckdns
- Many ISP's use "MAN", which is nothing more than a big-ass router for a whole neighborhood. If this is the case, you won't be able to do the above unless they specifically provide for it (Metronet does this for me, I pay an extra $10 for a permanent IP address)
Third-party
- rent a cloud computer and put service on it
- rent a cloud computer and use it to do the forwarding
SOLUTIONS
- Paid Hosting (managed)
- VPS
- Dynamic DNS (e.g though dyndns (paid) or duckdns (free)
- ngrok is easy temporary this
Services
https://scribe.citizen4.eu/geekculture/how-to-expose-your-pc-to-the-internet-without-a-public-ip-address-c7a2c808ab6b
https://ngrok.com/
https://github.com/anderspitman/awesome-tunneling
Backlinks: FSU Courses:LIS5364