All assumes you're running nginx on port 8080. Change ports to suit your needs.
- Copy
ipfw.plist
into/Library/LaunchDaemons/ipfw.plist
- Copy
ipfw.conf
into/etc/ipfw.conf
If you want this to work straight away, you may need to run:
$ sudo launchctl load /Library/LaunchDaemons/ipfw.plist