On my mac (OS X Mavericks), I am trying to redirect all the outgoing calls to a server (192.168.1.2) to a proxy server (192.168.1.3). I am using the following command (assuming that I don't need any of the existing rules)
echo "rdr pass inet proto tcp from any to 192.168.1.2 port 8280 -> 192.168.1.3 port 9180" | sudo pfctl -ef -
However, this doesn't seem to work. Am I missing something?
Essentially, I am trying to set up a forward proxy which would be honored by all applications which communicate with an internal network.
References: https://serverfault.com/questions/102416/iptables-equivalent-for-mac-os-x?lq=1