0

1) Summarize the problem

I am struggling to figure out how to set up Ubuntu 22.04 so it acts as a LAN router gateway for several PCs connected to it and VPN into the LAN from outside the network?

2) Provide details and any research

I've Googled, searched on YouTube, gone through several 'networking' sections in Ubuntu books (such as Mastering Ubuntu Server - Fourth Edition ), and I've tried various online suggestions to try and figure out a solution, but so far all I've gotten this far:

3) When appropriate, describe what you’ve tried

  • Installed Ubuntu Server
  • Edited the netplan yaml file to assign a static IP address to the NICs
  • Configured NAT by using ip tables
  • Installed a DHCP server
  • Installed OpenVPN (doesn't seem to work when I try to use Remote Desktop)
  • Installed Guacamole Remote Desktop (doesn't seem to pick up the Windows PCs in the LAN)

I've got 2 Windows PCs connected to the Ubuntu 22.04 server (Windows 10 Pro, the other Windows 11 Pro), and two other PCs with Linux distros (Debian and Oracle Linux), and a TP-Link router with dd-wrt for WiFi.

The use case is that I want to learn about creating a network and system admin (I'm a total noob and have only realy played around with Windows Server), however I still need to have the Windows PCs working for very specific apps that only work on Windows. I need to be able to VPN into the LAN from the internet so I can remote desktop with both the Windows 11 Pro and Windows 10 Pro PCs. So far I've only got SSH working with Ubuntu Server, but I cannot remote access the other Linux PCs so maybe my NAT isn't working properly (I'm very much lost with it). I figure if I can get the VPN working I could Telnet into the Linux PCs.

I'm really motivated to learn this stuff so while I would appreciate a 'do this and that' answer so I can get things working, any learning resource suggestions would be greatly appreciated.

0

1 Answer 1

1

For experiments with networking (they are fun!), consider setting up a series of Virtual Machines (or LXD Containers). Network those, all inside your server, without touching your real-world LAN.

Advice: Dedicate one VM/Container to act as your router/gateway instead of cluttering your base system with those packages and settings. Keep your base system sparse, so less can go wrong. When stuff goes wrong, you want it going wrong in the VMs/Containers, isolated from the real-world OS.

Advice: It's attractive to incorporate your real-world LAN networking services into your server (been there). But it also increases your risk: A server crash --or botched install or broken upgrade or failed experiment or fried ethernet port-- will take down your whole network, too, until the server is repaired. And repairing your server can be much harder without network access! It's worthwhile to keep your real-world LAN on separate hardware to ensure reliability and robustness.

2
  • Thanks for the advice, currently I don't have the ability to separate the learning with everything else currently :-(
    – icu
    Sep 27, 2022 at 13:22
  • @icu the point of this answer is that you DO have the tools to separate learning from real-world. Everything you need is already in the Ubuntu repositories. Lots of folks have done what you envision, and have learned from the experience.
    – user535733
    Sep 27, 2022 at 13:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .