a076 Are there any way to add new rules to pf without write the rules to the pf.conf - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Firewalls

Firewalls IPFW, PF, IPF (but not limited) related discussion

Reply
 
Thread Tools Display Modes
  #1  
Old February 8th, 2010, 06:04
tanakorn tanakorn is offline
Junior Member
 
Join Date: Apr 2009
Location: Bangkok, Thailand
Posts: 23
Thanks: 5
Thanked 0 Times in 0 Posts
Default Are there any way to add new rules to pf without write the rules to the pf.conf

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

Code:
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.

Code:
ipfw add 100 allow all from any to any
Or likes the command line of pf that add a new host to the table.

Code:
pfctl -t table1 -T add 127.0.0.1
Are there anyone know how I can do that?

Thanks.
Reply With Quote
  #2  
Old February 8th, 2010, 08:49
SirDice's Avatar
SirDice SirDice is online now
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,725
Thanks: 47
Thanked 2,023 Times in 1,862 Posts
Default

Use an anchor.

http://www.openbsd.org/faq/pf/anchors.html
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
The Following User Says Thank You to SirDice For This Useful Post:
tanakorn (February 8th, 2010)
  #3  
Old February 8th, 2010, 09:09
tanakorn tanakorn is offline
Junior Member
 
Join Date: Apr 2009
Location: Bangkok, Thailand
Posts: 23
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Thanks sir.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] RELEASE 8.0 rules bigearsbilly Installing & Upgrading 13 January 1st, 2010 18:31
[Solved] pf question about rules wonslung Firewalls 13 November 14th, 2009 07:31
[Solved] My first pf rules locutus Firewalls 6 October 13th, 2009 10:04
devfs rules own sossego General 10 March 24th, 2009 23:19
Need Help With Basic PF Rules rob34 Firewalls 2 March 13th, 2009 20:50


All times are GMT +1. The time now is 12:41.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0