I have a server running on my iMac (port 8000) and I want my iPad to be able to visit it through the local network so I set this rule using pf anchors (hence ipfw is gone).
It doesn't work, what am I missing?
rdr pass on lo0 inet proto tcp from any to 192.168.2.2 port 80 -> 127.0.0.1 port 8000 rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 8000 -> 127.0.0.1 port 8000
enable the command:
pfctl -ef /etc/pf.anchors/com.test
Visiting my iMac's IP-address from the iPad 192.168.1.1 gives me an unreachable message (Safari)
From my iMac all seems OK:
# nc -v 192.168.2.2 80 found 0 associations found 1 connections: 1: flags=82<CONNECTED,PREFERRED> outif lo0 src 127.0.0.1 port 52342 dst 127.0.0.1 port 5001 rank info not available TCP aux info available Connection to 192.168.2.2 port 80 [tcp/http] succeeded! # curl -I 192.168.2.2 HTTP/1.0 302 FOUND Date: Wed, 25 Feb 2015 10:39:47 GMT Server: WSGIServer/0.1 Python/2.7.6 Vary: Cookie Content-Type: text/html; charset=utf-8 Location: http://192.168.2.2/