feat(security): restrict AdGuard Home to Tailscale network
- Add internalOnly to AdGuard nginx config - Add ts-input firewall rule for direct Tailscale access - Update Netdata to use ts-input chain for consistency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6b64254eab
commit
aa18a6f494
1 changed files with 1 additions and 5 deletions
|
|
@ -179,6 +179,7 @@ in
|
|||
networking.firewall.extraCommands = ''
|
||||
iptables -t nat -A PREROUTING -i tailscale0 -p udp --dport 53 -j REDIRECT --to-ports 5353
|
||||
iptables -t nat -A PREROUTING -i tailscale0 -p tcp --dport 53 -j REDIRECT --to-ports 5353
|
||||
iptables -I ts-input 3 -p tcp --dport ${toString cfg.port} -s 100.64.0.0/10 -j ACCEPT
|
||||
'';
|
||||
networking.firewall.extraStopCommands = ''
|
||||
iptables -t nat -D PREROUTING -i tailscale0 -p udp --dport 53 -j REDIRECT --to-ports 5353 || true
|
||||
|
|
@ -192,11 +193,6 @@ in
|
|||
contentSecurityPolicy = null; # AdGuard Home handles its own CSP
|
||||
};
|
||||
|
||||
# Allow direct Tailscale access to AdGuard Home dashboard
|
||||
networking.firewall.extraCommands = lib.mkAfter ''
|
||||
iptables -I ts-input 3 -p tcp --dport ${toString cfg.port} -s 100.64.0.0/10 -j ACCEPT
|
||||
'';
|
||||
|
||||
# Ensure nginx user can access ACME certs
|
||||
users.users.nginx.extraGroups = [ "acme" ];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue