0

Env

OS OSX 13.6

nc localhost 4444

netstat -R -P tcp -v -a -n | grep 4444

tcp6 0 0 ::1.4444 *.* LISTEN 0 0 131072 131072 1375 0

First I use pfctl to achieve it

The solution to this problem is in the link below on OSX 10.11 Using pfctl on Mac OS 10.11 (El Capitan) to forward ports

And other solution in /etc/pf.conf ,No thing changed

This is not suitable for my situation

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Admin
  • 19
  • 4

1 Answers1

0

Env

server: nc -l 127.0.0.1 4444
client: nc 192.168.0.99 8088

The tempary solution is

sudo pfctl -F all

sudo echo "rdr pass  proto tcp from any to any port 8088 -> 127.0.0.1 port 4444" | sudo pfctl -Ef -

sudo pfctl -s nat 

Atention

chose 127.0.0.1 not localhost

Admin
  • 19
  • 4