New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

Configure firewall from command line?

Post Reply New Thread Subscribe

Thread Tools

jnojr's Avatar
Member Since: Aug 11, 2012
Location: San Diego, CA
Posts: 85
jnojr will become famous soon enough

jnojr is offline
I'm trying to find some basic commands and examples for pfctl I come from a Linux background and am pretty comfortable with iptables Most of the info about the Mac pf firewall involves monkeying with GUI stuff, and so far all of the command line references I'm finding are for BSD and don't appear to be relevant (references to contents of /etc/pf.conf that just don't look anything like what I'm seeing in mine).

How do I get a list of all current firewall rules ( iptables -L )?

How do I start the pf firewall and flush any and all rulesets?

How do I set default policies?

I usually start by denying all inbound connections except for those related to established outbound connections.

I found IceFloor, but that appears to configure my firewall as opposed to generating rules. I want to wind up with command-line commands that can be added to a script... it's tedious enough standing up new hosts without having to go through a clickfest to configure every little thing.
QUOTE Thanks

Post Reply New Thread Subscribe

« Mac OS X 10.6 cannot be installed on this computer | My imac will not start »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
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
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
How can I configure Adium to run behind a firewall? yinglcs OS X - Apps and Games 1 01-29-2009 09:24 PM
Hardware Firewall for AirPort Extreme amardilo Internet, Networking, and Wireless 3 09-03-2007 02:32 PM
Built in Firewall Kokopelli OS X - Operating System 3 05-12-2005 10:08 AM
Other firewall is running on my Mac! powercat OS X - Operating System 1 04-12-2005 11:29 AM
Port 3689 being blocked by Firewall? HUH??????? Horatio Street Apple Notebooks 2 12-07-2004 04:34 AM

All times are GMT -4. The time now is 10:38 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?