在添加桥接器之前,可以从其他主机访问不同的 http 服务。
添加桥接器后,其他主机只能通过 ssh 访问。所有其他服务只能通过主机本身、本地主机或桥接适配器的 IP 访问。
在主机上,没有防火墙处于活动状态,其他主机可以 ping 主机并通过 ssh 和 scp 连接,但不同的 Web 服务无法从其他机器上充电。其他服务基于 http,位于非干扰端口:9090、8001、7070
#/etc/network/interfaces
auto lo
iface lo inet loopback
auto br0
iface br0 inet dhcp
bridge_ports enp0s25
bridge_stp off
bridge_fd 0
bridge_maxwait 0
iface enp0s25 inet manual
输出:ifconfig
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.203.114.247 netmask 255.255.0.0 broadcast 10.203.255.255
inet6 fe80::221:ccff:fe4b:313a prefixlen 64 scopeid 0x20<link>
ether 00:21:cc:4b:31:3a txqueuelen 1000 (Ethernet)
RX packets 23803 bytes 23963479 (23.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7365 bytes 806013 (806.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:02:a9:df:4e txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 00:21:cc:4b:31:3a txqueuelen 1000 (Ethernet)
RX packets 559347 bytes 511837384 (511.8 MB)
RX errors 0 dropped 325 overruns 0 frame 0
TX packets 94679 bytes 8350357 (8.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xd2600000-d2620000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 2722645 bytes 766563500 (766.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2722645 bytes 766563500 (766.5 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:db:37:1d txqueuelen 1000 (Ethernet)
RX packets 323 bytes 45009 (45.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 170 bytes 13961 (13.9 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
网桥现在使用与之前的 enp0s25 相同的 DCHP 配置,并且具有相同的 IP。这在其他主机上工作正常,没有问题。可以从主机操作系统或虚拟机访问外部机器及其服务,没有问题。入站时,只有 ssh 可以访问,即使服务配置为在 0.0.0.0 上运行。
有什么想法吗,是什么阻碍了其他服务?