Could someone help me block all incoming traffic on my network which has port forwarding set up on the router to allow incoming requests on port 27017 to be sent to the Mac running Mongo internally except for one IP address which I can specify? I tried loading a new anchor file from /etc/pf.conf. In that file I've put the following:
rdr pass on lo0 inet proto udp from xxx.xxx.xxx.xxx to any port 27017 -> 127.0.0.1 port 27017
rdr pass on lo0 inet proto tcp from xxx.xxx.xxx.xxx to any port 27017 -> 172.0.0.1 port 27017
where xxx.xxx.xxx.xxx is the IP address I want to allow in. It does allow that address in, but I think I need to do something else to block all others. The documentation of this stuff is very dense. Any help would be appreciated.