# Are there any way to add new rules to pf without write the rules to the pf.conf



## tanakorn (Feb 8, 2010)

Hi.
I want to add new rules to pf dynamically but the only one way that I found from the websites and a man page is that I must write my new rules to pf.conf and use this command line to flush and load all rules


```
pfctl -F all -f /path/pf.conf
```

Are there anyone know how to add the rules by command line or any ways without flush old rules and read new rules such as the command line of ipfw.


```
ipfw add 100 allow all from any to any
```

Or likes the command line of pf that add a new host to the table.


```
pfctl -t table1 -T add 127.0.0.1
```

Are there anyone know how I can do that?

Thanks.


----------



## SirDice (Feb 8, 2010)

Use an anchor. 

http://www.openbsd.org/faq/pf/anchors.html


----------



## tanakorn (Feb 8, 2010)

Thanks sir.


----------

