2
I'm messing with divert sockets in OSX, and in order to capture any socket, I first need to set up a firewall redirection (divertion if you will):
ipfw add divert 3282 tcp from any to any
Something like that, however "ipfw" is deprecated, and instead mac uses PF(5), so the command should be:
pass out on en0 inet proto tcp to port 80 divert-packet port 9090
This however, when loaded with pfctl -f /etc/pf.conf
returns a syntax error.
Here are docs stating that the divert-packet option really exist: https://man.openbsd.org/pf.conf.5#divert-packet_port
No idea why I get the syntax error. please help? how can I enable this divert-packet rule?