关于服务监听端口的问题.note
关于一些服务无法使用,可以看服务监听端口,是只监听了一个接口、只监听了换回接口地址,还是监听了所有地址
127.0.0.1 //只监听了环回IPv4地址
[::1] //只监听了环回IPv6地址
0.0.0.0 //监听了所有IPv4地址
[::] //监听了所有IPv6地址
{IP} //只监听了固定IP(这样的监听只会允许从该IP[该接口]进入的流量,其他接口的流量都将无法使用该服务)·编写ticket:
假如 Server1机器,两个接口:ens33[192.168.10.1]、ens37[172.16.10.1],Apache2只监听了 192.168.10.1:80,172.16.10.0/24 网段的客户端无法访问
配置:




# 排错过程:
On Client1:
Execute following command in the command line:
curl 1.1.1.252
curl 192.168.10.252
the 1.1.1.252 address web can access,and the 192.168.10.252 address web cannot access
On Server1:
Execute following command in the command line:
ss -ntupl
the Apache2 Service only listen the 80 port on 1.1.1.252 address
# 问题:
On Server1:
the Apache2 Service only listen the 80 port on 1.1.1.252 address
# 解决方案:
On Server1:
modify /etc/apache2/ports.conf file:
changed listen to:
"Listen 0.0.0.0:80"