NAS
The Synology ends with one job: holding backups. It runs no container, has one address (10.0.2.2, R6), speaks one file protocol (SMB), cannot reach the internet, and accepts connections from three named machines only. It is stuck on DSM 7.0, which receives no more security fixes, so every door that is not needed is closed twice: once in DSM’s own firewall, once on the router.
Do this chapter two weeks after the last service left the NAS (Pi-hole and monitoring in chapter 6, the broker in chapter 7, Scrypted in chapter 8). Until then its stopped containers are your fallback.
From scratch. On a factory-reset NAS, skip part A, give it the address in step 11.4, and continue from there.
Part A. Empty it
Section titled “Part A. Empty it”11.1 Confirm nothing still uses it
Section titled “11.1 Confirm nothing still uses it”Why. Deleting a container that something still calls turns a silent dependency into an outage. Two weeks of logs answer the question.
Mac
dig +short +time=2 +tries=1 @10.0.2.2 debian.org || echo "DNS: no answer (good)"nc -zv -G 2 10.0.2.2 1883 2>&1 | tail -1 # refused or timed out (good)UniFi Insights > Flows, filter destination 10.0.2.2, last 7 days: only SMB (445), SNMP (161) and your own visits to DSM (5000, 5001) appear. Any flow to port 53, 1883, 8123, 9090, 3000 to 3002 or 10443 names a device that still points at an old service: fix that device first.
Verify. Both commands fail to connect, and the flow list shows nothing else.
Rollback. None needed.
11.2 Archive the container data, then remove the containers
Section titled “11.2 Archive the container data, then remove the containers”Why. The folders are the last copy of the old setup. One dated archive on the NAS itself keeps them for a month without leaving a running container behind.
Mac, with the docker share mounted:
cd /Volumes/docker && mkdir -p _archive-2026for d in homeassistant matterjs-server mosquitto scrypted pihole dnscrypt-proxy monitoring homepage uptime-kuma hydroqc2mqtt; do [ -d "$d" ] && tar -czf "_archive-2026/$d.tgz" "$d" && echo "archived $d"donels -lh _archive-2026NAS
- Container Manager > Project: delete
monitoring. Container: delete every remaining container. Image: delete all. - Package Center > Installed: uninstall Container Manager.
- Control Panel > Task Scheduler: delete the
thread-routetask. The VM learns the Thread route by itself. - After you have checked the archives open (
tar -tzf _archive-2026/scrypted.tgz | head), delete the original folders on the share.
Verify. Package Center no longer lists Container Manager, and ls /Volumes/docker shows _archive-2026 and nothing that runs.
Rollback. Reinstall Container Manager and unpack an archive. Put a reminder in your calendar to delete _archive-2026 in a month.
Part B. One bond, one address
Section titled “Part B. One bond, one address”11.3 One bond for the four ports
Section titled “11.3 One bond for the four ports”Why. The NAS answers for the same address from two network cards: one standalone on switch port 13 and a bond on ports 14 to 16. The controller logged more than 1,000 duplicate-address events, and each one is a moment where the NAS may not answer.
NAS Control Panel > Network > Network Interface: select Bond 1 > Edit and tick the fourth card, so the bond has all four. Keep IEEE 802.3ad Dynamic Link Aggregation. If DSM refuses, set the standalone card to Disable first, then add it. Apply. DSM reconnects within a minute.
UniFi UniFi Devices > USW Pro 24 > Port Manager: select ports 13 to 16, Link Aggregation, mode Aggregate.
Verify. The aggregate shows 4 active members, and the NAS appears once in Client Devices.
Rollback. Remove port 13 from the aggregate and take the fourth card out of the bond. The simpler alternative with the same effect: disable the card on port 13 in DSM and keep the three-port bond.
11.4 The address 10.0.2.2, and no other network
Section titled “11.4 The address 10.0.2.2, and no other network”Why. R6. The Pi-hole container held 10.0.2.2 and is gone. DSM answered at 10.0.2.3, and the NAS still has legs in other VLANs from the time its containers needed them. One interface with one fixed address is what the firewall rules below can name.
NAS Control Panel > Network > Network Interface:
- Delete or disable every remaining VLAN interface (every one except the Servers interface, whatever its VLAN number: the NAS had legs in the old Wired, WiFi_IoT and Surveillance networks. Step 8.8 already removed two).
- Bond 1 > Edit > IPv4: Use manual configuration, address
10.0.2.2, mask255.255.255.0, gateway10.0.2.1, DNS10.0.2.5. IPv6: Off. - Control Panel > Regional Options > Time: NTP server
10.0.2.1. The NAS will not reach internet time servers after step 11.10.
DSM drops your session when the address changes. Reconnect at https://10.0.2.2:5001.
UniFi Port Manager, the aggregate of ports 13 to 16: native network Servers, Tagged VLAN Management: Block All. Client Devices > the NAS: Fixed IP Address 10.0.2.2, name nas.
Verify.
ping -c 2 10.0.2.2 && ! ping -c 2 -t 2 10.0.2.3 # .2 answers, .3 does notcurl -skI https://10.0.2.2:5001 | head -1 # HTTP/1.1 200 or 302On the infra VM, the Prometheus target synology is up (restore path) and nas.home.arpa resolves to 10.0.2.2.
Rollback. Set the bond back to its previous address. From the Mac, Synology Assistant finds a NAS whose address you lost.
Part C. Shares and services
Section titled “Part C. Shares and services”11.5 Shares and the backup account
Section titled “11.5 Shares and the backup account”Why. One account, used only by the backup jobs, with rights on the backup shares and nothing else. If a VM is compromised, the most it can reach is its own backups.
NAS
- Control Panel > Shared Folder > Create, four times, each with Hide this shared folder in “My Network Places” on and the recycle bin off:
| Share | Holds |
|---|---|
backup-ha |
Home Assistant’s own encrypted backups |
backup-home |
The nightly archive of the home VM’s stacks, Scrypted included |
backup-infra |
The nightly archive of the infra VM and the Insights Plus database dumps |
timemachine |
The Mac |
- Control Panel > User & Group > Create: user
backup, password fromop read "op://Infrastructure/NAS backup user/password" | pbcopy. Permissions: Read/Write on the four shares, No access on every other. Application permissions: deny everything except SMB. - On each share, Edit > Permissions: your admin account read/write,
backupread/write, everyone else none.
The standby VM gets no share: it holds another household’s data, keeps its own history on its own disk, and its network zone has no path to the NAS (J8).
Verify. From the Mac: smbutil view -N //backup@10.0.2.2 2>&1 | head -3 asks for a password, and after open smb://backup@10.0.2.2/backup-infra with the password the share mounts. Unmount it again.
Rollback. Delete the shares and the user.
11.6 One file protocol
Section titled “11.6 One file protocol”Why. J17. Every protocol that listens is a surface on a system that no longer gets fixes. Backups need SMB only.
NAS Control Panel > File Services:
- SMB > Advanced Settings: minimum protocol SMB3, maximum SMB3, Transport encryption mode: Force.
- SMB > Advanced > Others: Enable Time Machine over SMB broadcast off is fine, and under Set Time Machine Folders tick
timemachine. The Mac connects by address. - Turn off AFP, NFS, FTP, SFTP, TFTP, rsync, and under Advanced: Bonjour and WS-Discovery off.
- On
timemachine: Shared Folder > Edit > Advanced > Enable shared folder quota, about 1.5 times the Mac’s used space.
Verify. nc -zv -G 2 10.0.2.2 445 succeeds. for p in 21 22 111 548 873 2049; do nc -zv -G 1 10.0.2.2 $p 2>&1 | tail -1; done shows every one refused or timed out.
Rollback. Turn a service back on.
11.7 Harden DSM itself
Section titled “11.7 Harden DSM itself”Why. Defence in depth. If a firewall rule is ever loosened by mistake, DSM still refuses.
NAS
- Control Panel > User & Group: the built-in
adminandguestare disabled. Your own administrator has 2-factor authentication on (Personal > Account), with the code stored in theNAS adminitem in 1Password. - Control Panel > Security > Account: Auto Block on, 5 attempts within 5 minutes. Account Protection on.
- Control Panel > Login Portal > DSM: Automatically redirect HTTP connection to HTTPS on.
- Control Panel > Terminal & SNMP > Terminal: SSH and Telnet off.
- Control Panel > External Access: QuickConnect off, DDNS empty, Router Configuration empty. Sign out of the Synology Account.
- Control Panel > Update & Restore: automatic updates off. Updates, if any ever come, are installed by hand from a downloaded file.
- Package Center: uninstall every package you do not use (media servers, Cloud Sync, Download Station, Hyper Backup Vault unless you use it).
Verify. curl -sI http://10.0.2.2:5000 | head -1 answers with a redirect (301 or 302), and signing in to DSM asks for the six-digit code.
Rollback. Each setting is independent.
11.8 DSM’s own firewall
Section titled “11.8 DSM’s own firewall”Why. The infra VM sits on the same network as the NAS, so its traffic never crosses the router. Only the NAS’s own firewall can filter it. This is also the second lock on everything the router filters.
NAS Control Panel > Security > Firewall: Enable firewall, Edit Rules on the bond’s profile. Create these in order:
| # | Ports | Source IP | Action |
|---|---|---|---|
| 1 | TCP 5001 (DSM over HTTPS) | 10.0.5.3 | Allow |
| 2 | TCP 5001 | 192.168.3.0/255.255.255.0 (admin VPN) | Allow |
| 3 | TCP 445 (SMB) | 10.0.5.3 | Allow |
| 4 | TCP 445 | 10.0.5.2 | Allow |
| 5 | TCP 445 | 10.0.2.5 | Allow |
| 6 | UDP 161 (SNMP) | 10.0.2.5 | Allow |
| 7 | All | All | Deny |
Tick the rules, and before you click OK make sure rule 1 names the address your browser comes from: DSM tests the connection and refuses to save a rule set that would lock you out, which is your safety net here.
Verify. From the Mac, DSM still opens. From the home VM: ssh home 'nc -zv -w 2 10.0.2.2 445; nc -zv -w 2 10.0.2.2 5001' reports 445 open and 5001 closed.
Rollback. Untick Enable firewall.
11.9 Health out: SNMP and logs
Section titled “11.9 Health out: SNMP and logs”Why. A NAS with no internet cannot email you about a failing disk. Prometheus reads its health over SNMPv3 (disks, RAID, temperatures, fans), which feeds the Synology card of the Home panel, and its system log goes to Loki.
NAS Control Panel > Terminal & SNMP > SNMP: Enable SNMP service, SNMPv3 only (v1 and v2c off). Username, authentication (SHA) and privacy (AES) passwords from 1Password:
op read "op://Infrastructure/NAS SNMPv3/username"op read "op://Infrastructure/NAS SNMPv3/auth password" | pbcopy # then the priv password the same wayLog Center > Log Sending: server 10.0.2.5, port 1514, protocol UDP, format IETF (RFC 5424). Send a test log.
Verify.
curl -s http://10.0.2.5:9090/api/v1/query --data-urlencode 'query=up{job="synology"}' | jq -r '.data.result[0].value[1]' # 1In Grafana’s Explore, {host="nas"} shows the test line.
Rollback. Turn SNMP and log sending off.
Part D. The router’s side
Section titled “Part D. The router’s side”11.10 Policies on the NAS’s address
Section titled “11.10 Policies on the NAS’s address”Why. J7. Instead of a separate VLAN, the same isolation by address: nothing from the NAS to the internet, and from other networks only the Mac and the home VM.
UniFi Settings > Policy Engine > Policy Table, in this order:
| # | Name | Source | Destination | Ports | Action |
|---|---|---|---|---|---|
| A1 | NAS to internet, block | Internal, IP 10.0.2.2 | External | Any | Block |
| A2 | Mac to NAS | Internal, IP 10.0.5.3 | Internal, IP 10.0.2.2 | TCP 445, 5001 | Allow |
| A3 | home VM backups to NAS |
Internal, IP 10.0.5.2 | Internal, IP 10.0.2.2 | TCP 445 | Allow |
| A4 | Admin VPN to NAS | VPN, IPs 192.168.3.0/24 | Internal, IP 10.0.2.2 | TCP 5001 | Allow |
| A5 | Everything else to NAS, block | Internal, IoT, Surveillance, Neighbor, Standby, Work, VPN (one policy per zone) | Internal, IP 10.0.2.2 | Any | Block |
A4 must sit above the VPN policies of step 10.7 and 10.11 that would otherwise allow more. The NAS still reaches the gateway for time (UDP 123), which the Internal-to-Gateway defaults allow.
Verify.
ssh home 'nc -zv -w 2 10.0.2.2 5001' # times outFrom a phone on the main Wi-Fi, https://10.0.2.2:5001 times out. In DSM, Control Panel > Update & Restore fails to check for updates (no internet), and Regional Options > Time > Update now succeeds (the gateway answers).
Rollback. Pause A1 and A5.
11.11 Retire what pointed at the NAS’s admin interface
Section titled “11.11 Retire what pointed at the NAS’s admin interface”Why. Home Assistant’s Synology DSM integration signs in to DSM with an administrator account on port 5001, which step 11.8 no longer allows from the home VM. The NAS’s health already reaches the Home panel through SNMP and Prometheus, so the integration is redundant and the admin password leaves Home Assistant.
In Home Assistant, Settings > Devices & services > Synology DSM > Delete. Search your automations and dashboards for its entities first:
grep -rn "synology\|sensor.nas_\|sensor.diskstation" /Volumes/config/*.yaml /Volumes/config/packages/ | headIf you prefer to keep it, add an Allow in DSM’s firewall and on the router for 10.0.5.2 to TCP 5001, and give the integration a dedicated DSM account.
Verify. Settings > System > Repairs shows no Synology error.
Rollback. Add the integration again after opening port 5001 as described.
Result
Section titled “Result”The NAS holds backups and does nothing else. It has one address, 10.0.2.2, on one bonded link. It accepts SMB from the Mac and the two VMs, its admin page from the Mac and the admin VPN, and SNMP from the infra VM. It cannot start a connection to the internet. Its health and logs flow to the infra VM.