this post was submitted on 07 Apr 2025
47 points (96.1% liked)

Selfhosted

46341 readers
369 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

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!

you are viewing a single comment's thread
view the rest of the comments
[–] cmnybo@discuss.tchncs.de 2 points 2 weeks ago (1 children)

Put a multi port NIC in your router PC and use a separate unmanaged switch for each network then.

[–] marauding_gibberish142@lemmy.dbzer0.com 0 points 2 weeks ago (1 children)

Thanks but as I mentioned that will not scale. I'm interested in if separating computers by subnets will work. Have you tried something like this?

[–] Pogogunner@sopuli.xyz 2 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

It's been a long time since I actually used subnets, but IIRC you will need a physical interface for each network on the router regardless.

So let's say you set up your /24 network into 2x /25's, you will need an interface for the .0 network, and another for the .128 network

If you just have an interface for the switch, and another for the WAN connection, I don't think subnetting will work for what you're trying to do

Hmm, so virtual interfaces on the router won't work? I admit I'm a bit stumped, would you be able to give me an ELI5 on why this is the case? I will try and read up more, of course