Security considerations for accessing NAS in external network
from Emotet@slrpnk.net to selfhosted@lemmy.world on 30 Jul 2024 12:58
https://slrpnk.net/post/11898931

I’m strongly considering adding another backup location in the form of an old Raspberry Pi and a USB HDD.

I want the Pi to exclusively use the available network to connect to my Wireguard Server, so other devices (local to the Wireguard Server and remote connected to the server) can use it as a secondary backup location.

I’m kind of worried about a scenario, where my network is compromised and, through the VPN connection of the Pi in the external network, the external network is as well.

What are the best practices to secure such a setup?

#selfhosted

threaded - newest

cmbabul@lemmy.world on 30 Jul 2024 13:08 next collapse

I just did this over the weekend, I’ll try to remember to come back after work and add in my steps. It can be really confusing to parse over a bunch of tutorials

Emotet@slrpnk.net on 30 Jul 2024 15:01 collapse

I’d appreciate it very much!

Nomecks@lemmy.ca on 30 Jul 2024 13:26 next collapse

Use object storage and enable immutability for the backups. If they compromise your site they shouldn’t be able to delete your backups unless they have the NAS password too.

Emotet@slrpnk.net on 30 Jul 2024 15:01 collapse

Great suggestion to secure the backups themselfes, but I’m more concerned about the impact an attacker on my network might have on the external network and vice versa.

jet@hackertalks.com on 30 Jul 2024 13:27 next collapse

This is a exercise in network DMZ planning. Assume the NAS will be compromised, so you limit its access to the rest of the network.

put the NAS on its own VLAN in both locations, setup firewall rules so that only select protocols are allowed to/from the NAS.

Emotet@slrpnk.net on 30 Jul 2024 15:00 collapse

That’d be the gold standard. Unfortunately, the external network utilizes infrastructure that doesn’t support specifying firewall rules on the existing separate VLAN, so all rules would have to be applied on the Pi itself or on yet another device between, which is something I’d like to avoid. Great general advice, though!

Trainguyrom@reddthat.com on 30 Jul 2024 19:37 collapse

so all rules would have to be applied on the Pi itself

Sounds like you’ll want to setup IPTables

istanbullu@lemmy.ml on 30 Jul 2024 16:20 next collapse

I think you can have password auth in Samba.

That being said, the more important thing is to protect your VPN network.

possiblylinux127@lemmy.zip on 30 Jul 2024 23:56 collapse

Go the other way. Have the backup server connect in to the rest of the network.

Strit@lemmy.linuxuserspace.show on 31 Jul 2024 06:45 collapse

I was considering doing something similar to OP, but I also think it’s better to do it the other way around, having the backup server connect to the network when it’s time to do a backup. Then you can just use the trusty ssh/rsync combo for backup.