How realistic is this architecture? It’s been a while since I’ve set something like this up for work.

The thought behind this layout is that having only one machine hanging out there with just Apache and ssh (from lan only, non-standard port), and forwarding via Mod_Proxy any services I might want to share with non-LAN friends/family (photos, docs), is a smaller exposure than hosting all my VMs in a DMZ and hoping that the one server doesn’t get nuked.

Something like: DNS -> public-zone{ www-serv } <-> firewall-1 <-> lan{ vm-host <-> firewall-2 <-> (printers, laptops, etc) }

firewall-1 is actually a router running Tomato, with custom iptables rules. That way if www-serv is compromised the attacker can’t just drop some rules.

firewall-2 is just iptables rules on vm-host

all LAN computers’ iptables are a little more permissive, with holes for SAMBA, CUPS, and ssh on non-standard port.

What do you think? Is this sufficient? What would you do differently?

  • frongt@lemmy.zip
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    9 hours ago

    I think Apache is overkill. Just use caddy or traefik if it’s containers. nginx if not.

    • BonkTheAnnoyed@lemmy.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      9 hours ago

      Those are good options, but Apache isn’t all that overkill. It has some features I need, specifically routing traffic from multiple domain names to different network segments.

      Add to that it’s something I’ve understood well for decades, and it makes sense.

      If I wanted to go small, though, I could just whip something using Go’s proxies.

  • RheumatoidArthritis@mander.xyz
    link
    fedilink
    English
    arrow-up
    3
    ·
    13 hours ago

    Yup, it worked for me, no incidents. Add mod_security if you’re worried, and of course keep Apache up to date.

    I now moved Apache to a separate VLAN on the private side, and have strict firewall rules on traffic from that VLAN only to services it’s supposed to be proxying.

    • BonkTheAnnoyed@lemmy.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      12 hours ago

      thanks! It’s hard not to feel out of my depth, it’s been so long. And, it being my own info, not a corp’s protected by insurance, indemnity, mandatory arbitration, and (as a last resort) backups, the stakes feel a little higher.

      • cecilkorik@lemmy.ca
        link
        fedilink
        English
        arrow-up
        3
        ·
        11 hours ago

        Sounds like you’re doing fine to me. The stakes are indeed higher, but that is because what you’re doing is important.

        As the Bene Gesserit teaches: I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear.

        Make your best effort at security and backups, use your fears to inform a sober assessment of the risks and pitfalls, and ask for help when you need to, but don’t let it stop you from accomplishing what you want to. The self-hosting must flow.

      • RheumatoidArthritis@mander.xyz
        link
        fedilink
        English
        arrow-up
        2
        ·
        11 hours ago

        Yeah, I felt a little uneasy putting my data on something which could be broken into. Still do, having seen my share of hacked websites at work.

        If it helps you, I host everything in subdirectories with non obvious names, so bots only hit 404 pages.

        Nextcloud.bonk.xyz -> nope Bonk.xyz/nextcloud -> nope Bonk.xyz/bonkcirrostratus -> good luck guessing that

      • RheumatoidArthritis@mander.xyz
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 hours ago

        Yeah, I felt a little uneasy putting my data on something which could be broken into. Still do, having seen my share of hacked websites at work.

        If it helps you, I host everything in subdirectories with non obvious names, so bots only hit 404 pages.

        Nextcloud.bonk.xyz -> nope Bonk.xyz/nextcloud -> nope Bonk.xyz/bonkcirrostratus -> good luck guessing that