Port Redirection on Mac OS X Lion
- by Andreas
I have tried to solve this issue using pf but with no luck. Basically, I am trying to redirect incoming port 443 traffic to port 22. I have tried to set up a rule in a file and load it in pf but I get syntax error. Can anyone with more experience with pf provide some insight? Here's what I've attempted:
pass in on en1 proto tcp from any to any port 443 rdr-to 127.0.0.1 port 22
and
pass in quick proto tcp to port 443 rdr-to 127.0.0.1 port 22
I've been able to do this in MacOSX Snow Leopard with ipfw:
sudo ipfw add 1443 forward 127.0.0.1,22 ip from any to any 443 in
but it doesn't work in Lion (it gives me an Invalid Argument error).