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

sandeep1018

macrumors newbie
Original poster
Apr 20, 2022
2
0
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,
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.