Hello, I’m planning on creating a home server and getting some cameras.

I would like to have the server, cameras and all IOT devices be disconnected from the internet but still be able to access them within the house from different devices and maybe have limited access to them when outside.

Do I need a specific hardware for this? And what router would support this? I’m still in the planning phase but I’m looking for budget friendly solutions.

Thank you

  • BOFH666@lemmy.world
    link
    fedilink
    English
    arrow-up
    41
    ·
    6 months ago

    Vlans firewall rules and something to route between the different networks.

    This can all be achieved with pretty much every Linux installation.

      • floofloof@lemmy.ca
        link
        fedilink
        English
        arrow-up
        19
        ·
        edit-2
        6 months ago

        OPNsense is excellent. You can run it on a cheap mini PC with multiple Ethernet ports and it makes a great router. I run several VLANs through it.

        Edit: It’s based on FreeBSD, not Linux, in case that matters to you.

        • youmaynotknow@lemmy.ml
          link
          fedilink
          English
          arrow-up
          4
          ·
          6 months ago

          I do the exact same thing, only over PFSense (no issues with OPNSense at all, I just get along with PFSense better). 6 VLANs and 7 APs around the house, no VLAN can see the other, and all my "smart devices work exclusively local, and if I need to reach them from outside, I VPN into my house over WireGuard. It sounds more complicated than it is. Once it’s all set up, it just works.

      • skittlebrau@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        6 months ago

        OpenWRT and Untangle are the most user-friendly Linux options for running on your own hardware, but most people in homelab use pfsense or opnsense which are based on FreeBSD.

      • 🧟‍♂️ Cadaver@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        6 months ago

        No, but your home server will. That’s what is needed.

        Have your server firewalled and only communicate to your “no internet” devices via these ports.

        Should be straightforward.

  • BreakDecks@lemmy.ml
    link
    fedilink
    English
    arrow-up
    25
    ·
    6 months ago

    This one of those questions I am overwhelmingly eqipped to answer, but only with the weird proprietary knowledge about software defined networking and microsegmentation that my job has endowed me with…

    So I’ll resist the urge to give you that overcomplicated answer and just say get a firewall like others have suggested.

    • k_rol@lemmy.ca
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      1
      ·
      6 months ago

      I bought myself a mikrotik router to force myself to understand networking better. So I would really like to hear your over complicated answer that comes from professional needs. pretty please 🙂

      • BreakDecks@lemmy.ml
        link
        fedilink
        English
        arrow-up
        4
        ·
        6 months ago

        Oh man, uh, here’s a primer: https://mkomu.kapsi.fi/hipl/index.php?index=how

        I am most familar with HIP, but there are ways to isolate hosts so that they can only talk to what you want them to talk to in a distinctly different way than a firewall. You could have three hosts (A, B, & C) on the same subnet where A can talk to B & C, but B & C cannot talk to each other. Likewise, A and C could have access to an Internet gateway, while B does not.

        So far HIP is the only protocol I have seen for microsegmentation that actually works in an intuitive way, but I suspect Wireguard could be used to the same effect with some creative engineering.

        • girsaysdoom@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          1
          ·
          6 months ago

          After looking through it a little bit, it sounds like HIP is mainly used for verifying hosts’ identities. It sounds like you’ll still need firewall rules in order to create the scenario in your example, right?

          • BreakDecks@lemmy.ml
            link
            fedilink
            English
            arrow-up
            1
            ·
            6 months ago

            Not if HIP is a part of your network stack (adding a waist). Unfortunately this is not a plug-and-play solution unless you have the budget for my employer’s product, which is not priced for consumers.

      • root@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 months ago

        I was just looking into this for myself. Can I ask what you went with?

    • Mir@programming.devOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      6 months ago

      So I’ll resist the urge to give you that overcomplicated

      Please don’t, if it wasn’t useful for me someone else might find it useful

  • Encrypt-Keeper@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    ·
    6 months ago

    You’d put a router with firewall capabilities in place of that cloud on the right. The devices you don’t want to have internet access will be put into a different subnet than your normal home LAN on the left. You’ll then make a “Deny all” rule so that the devices on the right can’t leave their subnet, with the exception of any explicit allow rules that you make.

    • bastion@feddit.nl
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 months ago

      This, pretty much - except you can do it with one router, the internet access point/gateway router.

      Set up DMZ that can only access internal network, then set up a VPN and use that to access DMZ. If you need to, you can make a pinhole for one service or another, but you shouldn’t need to because they’re exposed to the LAN, and the LAN is accessible via VPN.

      I suppose “DMZ” isn’t exactly the right term, there, because that’s typically somewhat exposed externally, but… …same idea, just no external exposure.

  • BoofStroke@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    10
    ·
    edit-2
    6 months ago

    For home, use your firewall. Either physical ports on the firewall with dumb switches or vlans with managed layer 2 switches.

    There are many ways to do this. Proxmox can do it with ovs if all your devices are virtualized. Pfsense is probably the most straightforward.

    The best way to run pfsense is on dedicated hardware. This would work for you https://protectli.com/vault-4-port/

    You’ll also then need switches or a managed switch with vlans for each network segment.

    • 4am@lemm.ee
      link
      fedilink
      English
      arrow-up
      7
      ·
      6 months ago

      Just throwing in the usual comment that OPNSense is a pfSense fork with a nicer interface.

      • TCB13@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        arrow-down
        2
        ·
        6 months ago

        Just throwing in the usual over-complication. The OP can do this with a simple OpenWRT router and by setting a few firewall rules. To be fair there are even some comercial routers from Asus and Netgear with their stock firmware that will allow you to block a device from accessing the internet.

        • WhatAmLemmy@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          6 months ago

          Consumer routers fall apart when you want to do many common networking tasks, like setting up a VLAN on a separate subnet with pinhole access, so when faced with having to buy a significantly more expensive SMB router vs the cheap FOSS solutions others have mentioned, you’re better off just going the FOSS route.

          Note: some consumer routers can be flashed with FOSS firmware, but be prepared to waste days tinkering and testing.

          • TCB13@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            6 months ago

            Just a few notes:

            1. What you’re describing is not what the OP is asking for. He simply wants a quick solution to block a couple of devices from accessing internet.

            2. I don’t get your “note” as that’s precisely what I suggested the OP to do. And if you actually read the manual and pick a recommend model it can be as simple as uploading the firmware using the router’s firmware upgrade feature.

            3. The scenario you described can be done with OpenWrt on a consumer router and it isn’t that complex to setup. Even older hardware like the Netgear R7800 will be able to handle that.

    • icanwatermyplants@reddthat.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      Adding to that that you can also easily make a separate WiFi network (tied to a vlan even) for IoT. OpenWRT makes this very easy.

  • u/lukmly013 💾 (lemmy.sdf.org)@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    6 months ago

    There’s already some good answers here, just wanted to share my “solution”

    I had a similar problem where I wanted some specific device to not have internet connection but still be on LAN. My lazy ass solution was to manually set the network settings with default gateway set to 0.0.0.0. With IPv6 it would be [::].

    But this is not meant to be an advice. You may not even be able to manually set network settings on some of those IoT devices, and removing default gateway from DHCP server is not exactly an elegant solution. Perhaps you could set it to serve different settings based on MAC, but then the other solutions are perhaps simpler and better in some other way.
    As I said, this is not an advice.

  • Heavybell@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    6 months ago

    I know vlans is the answer, but I don’t know how to set it up. I really need to do this with my own network some day. There must be an OPNsense guide for this, I know it…

  • bastion@feddit.nl
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    6 months ago

    What about classic DMZ network and VPN?

    The DMZ serves to your LAN only. You use the VPN to effectively become a part of your LAN.

  • hperrin@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    6 months ago

    Put them all behind a firewall and configure it to block outgoing connections. Then forward the ports you need to the internal machines. Then only something connecting from the outside can talk to them. They won’t be able to initiate a connection.

    (Keep in mind, this would also block things like DNS lookups, in case that’s important to you.)

  • umbrella@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    6 months ago

    install openwrt on you router.

    most routers that arent garbage support it.

  • starlord@lemm.ee
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 months ago

    My router’s admin console, OOTB, gives me the option to either deny individual devices (based on MAC, etc.) access to the external internet, or create a second (or third, etc.) WiFi network that, itself, is not connected to the outside.

    Perhaps you have similar settings?

  • tills13@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 months ago

    If you want an OoTB solution you can get a Cloud Gateway from Ubiquiti (the ultra is like $200 I think) and use its vlan feature though you may need another switch.

    Otherwise, if you’ve got unlimited time to tinker, proxmox or pfsense are ok options.

    I personally run the UDM SE and I highly recommend this approach if you don’t want to roll it yourself.