this post was submitted on 01 Dec 2023
96 points (94.4% liked)

Selfhosted

40132 readers
545 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 1 year ago
MODERATORS
 

Hi, I know this topic has been talked about 70 thousand times but I’m still not sure.

I have home server on an intel NUC behind the ISP router. On it I have the standard arr apps, jellyfin, pi-hole etc etc. I would like to access them through a domain rather than an IP. So I set them up in docker, behind traefik, behind authelia and behind cloudflare. I am the only one that uses it.

Now, I’m worried about the security of it all. I’ve been searching here and there and I’ve read about cf tunnels, wireguard server, vps, vlan, OPNsense etc etc. I still don’t know what would be the most secure. Should I just stay with what I have?

EDIT: I'm not behind CGNAT

you are viewing a single comment's thread
view the rest of the comments
[–] bless@lemmy.world 45 points 11 months ago (2 children)

I would go with wireguard VPN or something like cloudflare tunnels or tailscale. With wireguard you'll need to open up an external port and forward to your VPN host, but wireguard uses UDP so no one can probe it for responses. CF tunnels and tailscale you don't have to open up holes in your firewall which is nice.

You also have the option of using a proxy and opening up 443 publicly on your firewall, but unless you know what you're doing I'd leave that closed until you learn more.

[–] NaibofTabr@infosec.pub 14 points 11 months ago (3 children)

Nah, that sounds complicated. Just open port 22 and forward it your server.

[–] idunnololz@lemmy.world 27 points 11 months ago* (last edited 11 months ago) (2 children)

Trueeeeeee. Then post your ip here so you can recall it later.

[–] Atemu@lemmy.ml 12 points 11 months ago (2 children)
[–] prenatal_confusion@lemmy.one 7 points 11 months ago

Hey thats where i download my ram

[–] AtariDump@lemmy.world 5 points 11 months ago

There’s no place like it!

[–] jaykay@lemmy.zip 5 points 11 months ago

Thanks, doing that now ;) /s

[–] jaykay@lemmy.zip 3 points 11 months ago (2 children)

Mmmmmm, tunnels sound boring haha I might try figuring out wireguard. Do you have any trusted guides on it? Or should I just google :P

[–] bless@lemmy.world 2 points 11 months ago (1 children)

Good thing about wireguard is it's really simple. Google should get it done, if you get stuck send me a DM. I started with basic wireguard, I now run firezone in docker as I like the frontend.

[–] jaykay@lemmy.zip 1 points 11 months ago (1 children)

(I'm gonna copy what I said in another comment lol)

I don’t know if I’m shooting myself in the foot by trying to do in docker for now or not, but I’d rather do that before I do it on bare metal. It seems to work already, as I can see that my IP changes on my phone when I access it. Hell, I can even access my routers’ dashboard. However, I still can’t access the services on the server (by IP, like 192.x.x.x:8989), which I can access if I'm on Wi-Fi. So I’m trying to figure that out. Any ideas?

[–] bless@lemmy.world 2 points 11 months ago (1 children)

Hmm do a traceroute and see where it's dying. Can you ping inside IP of the tunnel on the wireguard server? What about outside?

What did you deploy in docker, firezone or basic wireguard?

Does your phone say connected and you see both incoming and outgoing packets? Is there a firewall in place on the wireguard host (ufw maybe)?

If you have nmap available you can also check port status.

[–] jaykay@lemmy.zip 2 points 11 months ago* (last edited 11 months ago) (1 children)

Yup, run journalctl and I can see ufw blocking requests. Now just need to figure out how to allow it

EDIT: Adding a rule "ufw allow from 192.x.x.x/24" fixed it, just need to find out if THAT's secure now lmao

[–] bless@lemmy.world 1 points 11 months ago* (last edited 11 months ago) (1 children)

You can bound ufw rules to interfaces, so you can allow in only on the wg0 interface and not eth0 interface.

Glad it's working! I love wireguard!

[–] jaykay@lemmy.zip 2 points 11 months ago

I couldn't use the interface, as wg is in a docker container, but I used the container IP, and it seems to be working. Huge thanks! Now I can get rid of Cloudflare and related containers :D (just need to fix the homepage first, I'm not using IPs for services lol)

[–] sunbeam60@lemmy.one 1 points 11 months ago

Honestly it couldn’t be simpler. Look at wg-easy docker container. You’ll be up and running in 10 minutes.