this post was submitted on 14 Jul 2023
19 points (91.3% liked)

Selfhosted

39435 readers
8 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
19
Advice for home hosting (self.selfhosted)
submitted 1 year ago* (last edited 1 year ago) by wiggles to c/[email protected]
 

Hello, I’m getting into self hosting and looking to setup a small home lab to play around with different technologies. I’m considering setting up a DMZ to keep my lab hardware separate from the rest of the network and other users. What is some of the minimal hardware required to do this on a small budget? Also what are some of the necessary security measures I should understand. One of my first projects would be to setup a small Linux box that I can ssh into remotely. Thanks.

EDIT After much reading today and great guidance from this community this is basically what i ended up doing.... Got a dell optiplex on ebay for about 55 bucks and a dual intel network card on amazon with a managed switch. If i can bridge my current router as an access point, i should be on my way! This community rocks! Lemmy is awesome!

top 15 comments
sorted by: hot top controversial new old
[–] [email protected] 10 points 1 year ago* (last edited 1 year ago) (2 children)

Get yourself a decent router capable of running OpenWRT, which will allow you to set up vlan's for your lab, and (I would also recommend) another separate vlan for your IoT and other "smart" devices.

The TP-Link Archer C7 is old but reliable and has a lot of open source support.

If you're feeling more adventurous You could also build your own router with any computer that's got two or more Ethernet ports using PFSense, Firewall-NG, or IPFire

[–] [email protected] 10 points 1 year ago (1 children)

Instead of pfSense, I would really recommend OPNsense, originally a fork but now standing on its own. I like the fact that OPNsense tracks closer to the current FreeBSD release than pfSense.

[–] [email protected] 3 points 1 year ago
[–] wiggles 1 points 1 year ago

I currently have a net gear R7000. Maybe I could flash that? If I got an old computer and put a duel Ethernet card like you suggested, what would the physical network diagram look like with that setup?

[–] [email protected] 7 points 1 year ago

EdgeRouter is proprietary but minimal. You can also look at Opnsense running on a used thin client off ebay.

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

It depends on what u wanna run, I use an old AMD A8-7600B, wich by today standards is less than a laptop cpu. But I run OpenMediaVault wich is just a NAS, so usually my cpu usage with 2 users at the same time is around %40-%60. I recommend u to use passmark as a reference, just tipe the cpu u have in mind + passmark and make thr comparison with mine so u can have an idea.

Manually set up the local IP of ur machine in the router/modem, then in the computer (so everything is failsafe), then configure the firewall (I recommended ufw) and only allow the ports that u need in the necessary protocol, nothing more. Also, to be script kiddos safe I recommend to change the ports of everything that u can, in this case SSH, I don't remember the usual port, but change it to something like 666, 999, 6666, u get the idea, if we aren't the same as every other server in existence we r gonna be safe most of the time, disable password login and use an rsa key.

[–] [email protected] 1 points 1 year ago

And usually it isn't necessary once u set up the machine as DMZ, but sometimes it doesn't accepts the request so make sure u can access using ur celular data. Otherwise u'll need to do some port forwarding, just do it plainly 443 to 443 and the like.

[–] [email protected] 3 points 1 year ago (1 children)

I did this myself for all of 150 dollars. I bought an OptiPlex 7050 off of Amazon and added a dual intel network card. From there, I installed OPNsense. I have a DMZ, WAN, and LAN interface.

[–] wiggles 1 points 1 year ago

After much reading today, this is basically what i ended up doing. Got an optiplex on ebay for about 55 bucks and a dual intel network card on amazon with a managed switch. If i can bridge my current router as an access point, i should be on my way!

[–] [email protected] 3 points 1 year ago (1 children)

One of my first projects would be to setup a small Linux box that I can ssh into remotely.

Why not just take the next step and setup tailscale? That way you can learn and also not have to worry about setting up a full security stack and everything for your DMZ.
Tailscale will let you create a virtual local network so that you don't have to expose anything to the internet.

[–] wiggles 1 points 1 year ago

I'll look into that thanks!

[–] [email protected] 3 points 1 year ago (1 children)

You can physically isolate by running multiple independent switches, you could run different subnets on the same switches or you could VLAN separate but that would require a managed switch or setting up your topology that something tags the traffic with the proper vid before running on the unmanaged switches. All have their pros and cons but i would strongly recommend getting a managed switch (managed firewalls/routers/switches depending on features/port count can all fill that need) and doing VLAN separation if you don’t have a lot of equipment you’re starting out with.

[–] wiggles 3 points 1 year ago

Thanks for the advice! I ended up getting a managed switch on amazon and an older dell computer to set up OPNsense. Can't wait to get started!

[–] [email protected] 2 points 1 year ago

Managed switch to create vlans and a firewall to manage the traffic.

Past that it's really a case of how much you want exacting control. Even a single /24 network gives 253 hosts and the class C space allows for a whole pile of those, so in theory it'd be easy to put everyone in their own network, but a pain to maintain.

[–] [email protected] 1 points 1 year ago

You can't both bridge your current router and use it for WiFi AP because of the hierarchy of the network. You'll need either a compatible AP-capable WiFi radio in your be router (hard to find, limited compatibility, I think you might top out at WiFi 4e (ac1350) in terms of what hardware is available.

Alternatively, you can use a dedicated access point alongside your new router which is easier and will get you better, more up to date, technology

load more comments
view more: next ›