Hello,
On various servers, I'm facing problems with processes like security/openvpn or Jails and their interaction with pf(4).
They require specific rules involving network interface or IP address that do not exists yet on the system when pf(4) starts. Hence for security/openvpn I've got this at boot time:
where lines 124-125 are:
vpn_if is tun0, and it's created when security/openvpn starts... after pf(4).
And network services running on Jails remain unreachable until I restart pf(4), because - I guess - pf(4) has already loaded a description of my network interface that does not include Jails IP addresses.
For now, I'm using this work around:
This is so ugly.
Is there a proper way to handle this kind of problem?
On various servers, I'm facing problems with processes like security/openvpn or Jails and their interaction with pf(4).
They require specific rules involving network interface or IP address that do not exists yet on the system when pf(4) starts. Hence for security/openvpn I've got this at boot time:
Code:
/etc/pf.conf:124: could not parse host specification
/etc/pf.conf:125: could not parse host specification
pfctl: Syntax error in config file: pf rules not loaded
Code:
pass in on $vpn_if from $vpn_if:network to any keep state
pass out on $vpn_if from any to $vpn_if:network keep state
And network services running on Jails remain unreachable until I restart pf(4), because - I guess - pf(4) has already loaded a description of my network interface that does not include Jails IP addresses.
For now, I'm using this work around:
Code:
# grep reboot /etc/crontab
@reboot root sleep 5 & pfctl -f /etc/pf.conf
Is there a proper way to handle this kind of problem?