如何在Mac OSX中打开/启用端口,docker swarm的端口2377

问题描述 投票:0回答:1

我正在努力为docker swarm连接打开2377端口。

Mac OSX规范:

  System Version:   macOS 10.15.2 (19C57)
  Kernel Version:   Darwin 19.2.0

我尝试了很多方法来打开端口。

  1. 使用系统偏好设置->安全和隐私->防火墙启用了防火墙。然后按如下所示编辑/etc/pf.conf文件,该文件根本没有帮助:
pass in proto tcp from any to any port 2377

pass in proto tcp from any to any port 8080
  1. 在启用和禁用防火墙之后,先前启用的端口8080被禁用,找不到重新启用它的任何方法。

  2. ufw已过时,似乎不再起作用。

  3. nc -l 8080(netcat完全没有用,从未工作过)。

  4. PFCTL(不起作用):

HQTML git:(AD-14024)$ sudo pfctl -f /etc/pf.conf
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.

No ALTQ support in kernel
ALTQ related functions disabled

已安装的NMAP,显示:

Starting Nmap 7.80 ( https://nmap.org ) at 2020-01-14 00:50 EST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00017s latency).
Other addresses for localhost (not scanned): ::1
Not shown: 971 closed ports, 27 filtered ports
PORT     STATE SERVICE
53/tcp   open  domain
8021/tcp open  ftp-proxy

Nmap done: 1 IP address (1 host up) scanned in 5.43 seconds.  

以前的帖子似乎都无法正常工作。请提出建议。

docker macos-catalina
1个回答
0
投票

[发现了一个博客,该博客解释了相同的内容,但在Catalina上也不起作用,请参见https://blog.neilsabol.site/post/quickly-easily-adding-pf-packet-filter-firewall-rules-macos-osx/

您找到解决方案了吗?

© www.soinside.com 2019 - 2024. All rights reserved.