Re: Syntax error for pf.conf loading during restart.

2025-04-05 Thread Kihaguru Gathura
Hi Jon, Thanks for that additional information updated. However doesnt solve the problem. What works is to inform pf a bit more by updating the pf.conf file with the following lines: pass in on em0 from 41.90.23.0/24 to 41.90.23.240 pass out on em0 from 41.90.23.240 to 41.90.23.0/24 However loo

Re: Syntax error for pf.conf loading during restart.

2025-04-05 Thread Kihaguru Gathura
Hello, Using parentheses around the interface (from 41.90.23.240 to *($ext_if)* port ssh modulate state) name tells pf to re-resolve the address dynamically whenever the interface is ready during the reboot giving time for pf rules to load successfully. Regards, Kihaguru On Thu, 20 Mar 2025, 13

Re: Syntax error for pf.conf loading during restart.

2025-04-05 Thread Janne Johansson
> > # External interface > > ext_if = "em0" > > Maybe: > # External interface > $ext_if = "em0" Nopes -- May the most significant bit of your life be positive.

Re: Syntax error for pf.conf loading during restart.

2025-04-04 Thread latinfo
> Hello, > > Openbsd 7.6 upon restart, pf rules fail to load with error (no IP address > found for em0 /etc/pf.conf:26: could not parse host specification). > However, performing "pfctl -nf /etc/pf.conf && pfctl -vf /etc/pf.conf" > manually after logging in gets the rules loaded successfully. Also

Re: Syntax error for pf.conf loading during restart.

2025-03-20 Thread Peter Nicolai Mathias Hansteen
> On 20 Mar 2025, at 12:46, Kihaguru Gathura wrote: > > Hello, > > Using parentheses around the interface (from 41.90.23.240 to ($ext_if) port > ssh modulate state) name tells pf to re-resolve the address dynamically > whenever the interface is ready during the reboot giving time for pf rule

Re: Syntax error for pf.conf loading during restart.

2025-03-20 Thread Kihaguru Gathura
Hello, Using parentheses around the interface (from 41.90.23.240 to *($ext_if)* port ssh modulate state) name tells pf to re-resolve the address dynamically whenever the interface is ready during the reboot giving time for pf rules to load successfully. Regards, Kihaguru On Thu, 20 Mar 2025, 1

Solved! Re: Syntax error for pf.conf loading during restart.

2025-03-20 Thread Kihaguru Gathura
Hello, Using parentheses around the interface (from 41.90.23.240 to *($ext_if)* port ssh modulate state) name tells pf to re-resolve the address dynamically whenever the interface is ready during the reboot giving time for pf rules to load successfully. Regards, Kihaguru On Thu, 20 Mar 2025, 10

Re: Syntax error for pf.conf loading during restart.

2025-03-20 Thread Stuart Henderson
On 2025-03-20, Kihaguru Gathura wrote: > > Openbsd 7.6 upon restart, pf rules fail to load with error (no IP address > found for em0 /etc/pf.conf:26: could not parse host specification). > However, performing "pfctl -nf /etc/pf.conf && pfctl -vf /etc/pf.conf" > manually after logging in gets the r

Re: Syntax error for pf.conf loading during restart.

2025-03-20 Thread Kihaguru Gathura
Hi peter, I've done a bit of homework. The machine is connected to a public static IP via LTE modem on bridge mode. To inform pf a bit more, I updated the pf.conf file with the following lines: pass in on em0 from 41.90.23.0/24 to 41.90.23.240 pass out on em0 from 41.90.23.240 to 41.90.23.0/24

Re: Syntax error for pf.conf loading during restart.

2025-03-20 Thread Kihaguru Gathura
Hi peter, I've done a bit of homework. The machine is connected to a public static IP via LTE modem on bridge mode. To inform pf a bit more, I updated the pf.conf file with the following lines: pass in on em0 from 41.90.23.0/24 to 41.90.23.240 pass out on em0 from 41.90.23.240 to 41.90.23.0/24

Re: Syntax error for pf.conf loading during restart.

2025-03-20 Thread Peter N. M. Hansteen
On Thu, Mar 20, 2025 at 07:23:20PM +1100, Jon Higgs wrote: > Looks like you might have missed an "inet". :) Yes, that's it exactly. If you leave out the protocol specification, the rule will apply to both inet and inet6, which will of course fail if the interface does not have an IPv6 addess assig

Re: Syntax error for pf.conf loading during restart.

2025-03-20 Thread Peter N. M. Hansteen
On Thu, Mar 20, 2025 at 10:23:12AM +0300, Kihaguru Gathura wrote: > Openbsd 7.6 upon restart, pf rules fail to load with error (no IP address > found for em0 /etc/pf.conf:26: could not parse host specification). > However, performing "pfctl -nf /etc/pf.conf && pfctl -vf /etc/pf.conf" > manually a

Re: Syntax error for pf.conf loading during restart.

2025-03-20 Thread Jon Higgs
On 20/03/25 10:23, Kihaguru Gathura wrote: > What are the potential scenario causing the line 26 (from 41.90.23.240 > to $ext_if port ssh modulate state) to present itself as syntax error > during restart? Looks like you might have missed an "inet". :)