如何在OSX本地networking中将请求转发到Docker机器

我目前正在本地networking上运行一个docker机器,它的IP和端口是192.168.99.100:8080。 我想从本地networking的某个地方连接这台机器,然后访问它,所以我发现的最好方法就是将发送的请求从我的笔记本电脑转换为docker机器。 换句话说,发送到我的笔记本电脑的每个请求都将通过自己的IP和端口发送到docker机器! 我使用pfctl来做到这一点,但是当我检查端口8585找出哪个服务正在监听这个端口时,我找不到任何东西,听起来好像请求没有到达(到达)目的地!

我做了如下:

1 – csrutil禁用

2-我的angular色:/etc/pf.anchors/mazafard:

rdr pass on en0 inet proto tcp from any to 192.168.20.203 port 8585 -> 192.168.99.100 port 8080 

3-我的pf conf /etc/pf-mazafard.conf

 rdr-anchor "forwarding" load anchor "forwarding" from "/etc/pf.anchors/mazafard" 

 sudo pfctl -vnf /etc/pf.anchors/mazafard pfctl: Use of -f option, could result in flushing of rules present in the main ruleset added by the system at startup. See /etc/pf.conf for further details. rdr pass on en0 inet proto tcp from any to 192.168.20.203 port = 8585 -> 192.168.99.100 port 8080 

 sudo pfctl -evf /etc/pf.anchors/mazafard fctl: Use of -f option, could result in flushing of rules present in the main ruleset added by the system at startup. See /etc/pf.conf for further details. No ALTQ support in kernel ALTQ related functions disabled rdr pass on en0 inet proto tcp from any to 192.168.20.203 port = 8585 -> 192.168.99.100 port 8080 pfctl: pf already enabled 

 telnet 192.168.20.203 8585 Trying 192.168.20.203... telnet: connect to address 192.168.20.203: Operation timed out telnet: Unable to connect to remote host 

我的OSX v:10.11.4

Docker版本1.9.1,构builda34a1d5

Boot2Docker版本1.11.0-rc3,构build