Sorry for being such a noob. My networking is not very strong, thought I’d ask the fine folks here.

Let’s say I have a Linux box working as a router and a dumb switch (I.e. L2 only). I have 2 PCs that I would like to keep separated and not let them talk to each other.

Can I plug these two PCs into the switch, configure their interfaces with IPs from different subnets, and configure the relevant sub-interfaces and ACLs (to prevent inter-subnet communication through the router) on the Linux router?

What I’m asking is; do I really need VLANs? I do need to segregate networks but I do not trust the operating systems running on these switches which can do L3 routing.

If you have a better solution than what I described which can scale with the number of computers, please let me know. Unfortunately, networking below L3 is still fuzzy in my head.

Thanks!

  • Lettuce eat lettuce@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    1 day ago

    Have you looked into Tailscale or an equivalent solution like Netbird?

    You could set up a tailnet, create unique tags for each machine, add both machines to the tailnet, and then set up each machine’s network interface to only go through the tailnet.

    Then you just use Tailscale’s ACLs with the tags to isolate those machines, making sure they can only talk to whatever central device(s) or services you want them to, but also stopping them from talking to or even seeing each other.

    • marauding_gibberish142@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      1 day ago

      I never considered tailscale for my LAN, but it’s certainly an intriguing idea. I suppose running Headscale as a VM on my router isn’t that difficult. Thank you, I will think about it a bit more