This guide is a fork from this gist. I've added minor adjustments to customise these rules to forward connections from an outsite interface like en0.
Since Mavericks stopped using the deprecated ipfw
(as of Mountain Lion), we'll be using pf
to allow port forwarding.
Create an anchor file under /etc/pf.anchors/com.jenkins
with your redirection rule like: