Reload firewall rules after NetBird service start (#67)

pfSense loads firewall rules during boot before wt0 is created, so per-interface rules don’t apply. This triggers a filter reload after service starts so pf picks up the rules once wt0 is available.
This commit is contained in:
Bethuel Mmbaga
2026-03-15 08:56:53 +03:00
committed by GitHub
parent 238fffe6e2
commit 7217c841d0
@@ -148,8 +148,10 @@ function netbird_display_connection_info(): void
function netbird_write_rcfile() {
$rc['file'] = 'netbird.sh';
$rc['start'] .= "/usr/local/bin/netbird service start\n\t";
$rc['start'] .= "sleep 2 && /etc/rc.filter_configure &\n\t";
$rc['stop'] .= "/usr/local/bin/netbird service stop\n\t";
$rc['restart'] .= "/usr/local/bin/netbird service restart\n\t";
$rc['restart'] .= "sleep 2 && /etc/rc.filter_configure &\n\t";
write_rcfile($rc);
}