IPFW IPFW does not start at boot time

Dear All,
My ipfw does not start at boot time and need manually enter command service ipfw start. Then, I issue the command ipfw list. All rules loaded.

I had add the firewall_enable="YES" and firewall_script="" to rc.conf

Why could be the root cause?
 
Dear All,
My ipfw does not start at boot time and need manually enter command service ipfw start. Then, I issue the command ipfw list. All rules loaded.

I had add the firewall_enable="YES" and firewall_script="" to rc.conf

Why could be the root cause?
Is
Code:
firewall_script=""
correct? If it is than should be:
Code:
firewall_script="/etc/ipfw.rules"
for example
or
Code:
firewall_type="workstation"
for example if you don't using script.
 
Give us the output of the command sysrc -a and the contents of "/boot/loader.conf".
This is what my system has:
Code:
firewall_enable: YES
firewall_logging: YES
firewall_nat_enable: YES
firewall_script: /etc/ipfw.rules
And NAT is optional, it's only if you have "ipfw nat" rules.

If you don't have custom rules, then you could skip "firewall_script" and chose one predefined firewall by setting "firewall_type". Just follow the instructions in the handbook: https://www.freebsd.org/doc/handbook/firewalls-ipfw.html
Very important - as fernandel observed, if you set "firewall_script" it needs to point to your rules file. If you have a predefined firewall, then do not set the "firewall_script" variable at all. Not even empty.
 
Back
Top