6

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).

Andreas
  • 71

2 Answers2

3

I'm pretty sure you don't want to forward any to any but something like any to me,
this works fine for me in Lion

sudo ipfw add 1443 fwd 127.0.0.1,22 tcp from any to me 443 in

LnL7
  • 131
1

Since mac os X 10.7 apple uses pf instead of ipfw . It is easy to configure pf with IceFloor. Check it out: http://www.hanynet.com/icefloor/index.html