Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sandeep1018

macrumors newbie
Original poster
Hello, if a expert is in here Please help me with this configuration. Windows user for 35+ year's and new to Macintosh.

I would like to configure PF firewall to block these port's, incoming and outgoing on all interfaces.
what commands do i need to use to edit PF and does the below look correct ? i don't know much about computers so bare with me.

Is it possible to block all incoming connections with pf wall ? or will that result in not being able to connect to any wifi network ?
How does pf wall affect macs native built in firewall ? does PF rules over write the inbuilt firewall ?



This could be my /etc/pf.conf:

scrub-anchor "com.apple/*"
nat-anchor "com.apple/*"
rdr-anchor "com.apple/*"
dummynet-anchor "com.apple/*"
anchor "com.apple/*"
load anchor "com.apple" from "/etc/pf.anchors/com.apple"

block in quick inet proto { tcp, udp } from any to any port 67,68,22,23,25,88,119,138,139,192,311,389,445,500,515,548,587,626,3283,3285,3689,4500,5009,5223,5350,5351,5353,5900,
 
4 years later but, the answer was that most people do a block all, then specifically open the ports they plan on using. And people don't usually block any outgoing connections as they are going to be replies to the open incoming requests, or things you're manually doing (like blocking the web).

With the pots you've blocked, you would be unable to send email through an email client.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.