this post was submitted on 23 Jun 2023
27 points (96.6% liked)

Selfhosted

39435 readers
7 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 all, I'm running a small website off of a raspberry pi in my house. I have opened ports 80 and 443 and connected my IP to a domain. I'm pretty confident in my security for my raspberry pi (no password ssh, fail2ban, nginx. Shoutout networkchuck.). However, I am wondering if by exposing my ports to the raspberry pi, I am also exposing those same ports to other devices in my home network, for example, my PC. I'm just a bit unsure if port forwarding to an internal IP would also expose other internal IP's or if it only goes to the pi. If you are able to answer or have any other comments about my setup, I would appreciate your comment. Thanks!

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 7 points 1 year ago (3 children)

I did this for some time. But now I don't want any ports open at home.

That's why I have a rented VPS that runs Traefik (a reverse proxy). This VPS has a VPN connection to my home net and is behind Cloudflare DNS. This is how I can safely expose services (even in my home net) to the Internet without forwarding any ports.

Of course those services need to have some kind of authentication.

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

Damn thats top security right there.

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

If this was "top security" I'd need to change jobs, haha! I just hope it doesn't fall apart and nobody breaches it too easily.

Currently there are probably a lot of attac vectors available, that I'm not even aware of. I just have to hope, that my stuff won't become interesting for a bad actor.

Nothing to see here, move along. I have a few locks, not worth it... :D

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

I've been considering doing the same thing, but i'm not sure there's much actual benefit over feeling like there's more separation, because if someone accesses the vps, they get direct access into your server at home. What's your opinion?

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

If you've set up a VPN to your home net then why not run that VPN from the devices you use to access the reverse proxy? With wireguard at least this is quite easy.

That way you don't have to expose anything you just run a VPN with the reverse proxy in it.

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

My setup is

Internet <---> Reverse Proxy (on VPS) <---> OpenVPN Server (on VPS) <---> VPN Client (home router) <---> local stuff...

I don't understand what you mean? Generally I don't like to require a VPN to access stuff. My use case is, when I'm away I'd like to be able to access things from e.g. a public device, a friends laptop, etc. That's why I'm not using a VPN to access things.

The VPN site-to-site connection is mainly responsible to make network shares available on my Nextcloud instance and provide access to other (local) services via the reverse proxy

Currently I'm rethinking the VPN, but I don't think I can ditch it in favor if e.g. Cloudflare Access tunnels (too unflexible, limited compatibility, or too much hassle to keep everything configured correctly).

Also, I don't use VPN to authorize requests. I use Authelia to authorize users with Free-IPA as directory in the backend.

I know, this might be overkill for my "simple" use cases, but I like to play around with these kind of enterprise-adjacent solutions.