saving rules

Hi,

I would like to know how do I save the rules permanently which were created with ipfw ?

I created few rules like

Code:
ipfw add allow tcp from any to any 80

But after i reboot the system, the rule is gone..how do I save rules from running configuration so that it becomes permanent ?
 
ipfw(8)

Code:
   LIST OF RULES AND PREPROCESSING
     To ease configuration, rules can be put into a file which is processed
     using ipfw as shown in the last synopsis line.  An absolute pathname must
     be used.  The file will be read line by line and applied as arguments to
     the ipfw utility.

Code:
ipfw [-cfnNqS] [-p preproc [preproc-flags]] pathname

See also
[cmd=]grep ^firewall /etc/defaults/rc.conf[/cmd]
and
/etc/rc.firewall
 
Put your rules into a file such as /etc/ipfw.conf, then add this to /etc/rc.conf:

Code:
firewall_enable="YES"
firewall_type="/etc/ipfw.conf"
 
Back
Top