0

I have a computer that has 7 drives, running Ubuntu Server 18.04, and is used as a low power file server. But for now, I can only SSH within the local network. I would like to know how to access my "server" over the internet.

  • Welcome to Ask Ubuntu. Unfortunately your problem is not with Ubuntu. You have to understand how your router works and your specific router and ISP setup. This is beyond the scope of this site. – user68186 May 31 at 15:39
  • "But for n"ow, I can only SSH within the local network. I would like to know how to access my "server" over the internet." exactly the same way except that the destination is a remote IP. But I agree: this is not about the OS but about understanding how networking works. – Rinzwind May 31 at 15:45
2

Classic basic networking question. Since your server works on the LAN, your server works. Everything else is networking that is unrelated to Ubuntu.

  1. Your public internet IP address is your ROUTER's IP address. That's what a router does - it shares your public IP address among all the devices on your LAN.

    • Find your PUBLIC IP address. Any search engine will tell you how.
  2. Pick a PORT NUMBER. For ssh, you can forward port 22...or any other port number.

  3. Login to your router. Turn on Port Forwarding. Forward the PORT NUMBER to your server's LAN IP address.

  4. Test login from the LAN: ssh user@lan_ip_address

    • You already did this, so it should work. This simply tests that your server is still up and running at the expected LAN IP address.
  5. Test login from the internet: ssh user@public_ip_address -p port_number

    • This WON'T work when you are connected to the LAN. You need to be outside the area controlled by your router.
    • -p port_number only needed if you picked a different port number.
| improve this answer | |
  • Your answer is missing the obligatory bold italic level1 header "don't do this unless you know what you're doing" warning. – danzel May 31 at 16:58
  • @danzel, perhaps...but it's a question asked only by first-timers who, by definition, won't know what they are doing. – user535733 May 31 at 17:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.