fix(unbound): restart statt reload + DNS Auto-FW-Rules dokumentiert
Bug: Unbound bindet Listen-Sockets nur beim startup. Bei einer Mutation von dns_settings.listen_addresses (z.B. neue LAN-IP für Resolver-Zugriff) hat 'systemctl reload' die Config zwar gelesen, aber nicht neu gebound — neue IPs blieben tot. Fix: Renderer ruft RestartService statt ReloadService. ~200ms Resolver-Downtime beim Save, dafür konsistentes Verhalten für jede Settings/Zone/Record-Mutation. Plus configgen.RestartService Helper neu (analog ReloadService), sudoers im postinst um systemctl restart unbound.service erweitert. NOTE für DNS-LAN-Zugang: zwei Operator-FW-Rules nötig (DNS-UDP + DNS-TCP from any to any) wenn der Resolver auf LAN-IPs lauscht. Aktuell manuell anzulegen — ein Auto-Rule-Generator (analog NAT-auto-forward) wäre die nächste Iteration. Version 1.0.36. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -131,7 +131,13 @@ func (g *Generator) Render(ctx context.Context) error {
|
||||
if g.SkipReload {
|
||||
return nil
|
||||
}
|
||||
return configgen.ReloadService("unbound")
|
||||
// Restart statt reload: unbound bindet Listen-Sockets nur beim
|
||||
// Startup. Bei Settings-Änderungen (listen_addresses-Wechsel)
|
||||
// greift ein bloßes 'systemctl reload' nicht — die neuen IPs
|
||||
// werden erst nach echtem Restart gebound. Trade-off: ~200ms
|
||||
// Downtime des Resolvers, dafür konsistentes Verhalten für jede
|
||||
// Mutation.
|
||||
return configgen.RestartService("unbound")
|
||||
}
|
||||
|
||||
func splitCSV(s string) []string {
|
||||
|
||||
Reference in New Issue
Block a user