查看端口信息
netstat -nutlp
只有 ipv6 的 80 端口,ipv4 的 80 端口不显示
tcp6 0 0 :::80 :::* LISTEN 22160/httpd
禁用 ipv6
sysctl net.ipv6.conf.all.disable_ipv6=1
systemctl restart httpd
netstat -nutlp
只有 ipv6 的 80 端口,ipv4 的 80 端口不显示
tcp6 0 0 :::80 :::* LISTEN 22160/httpd
sysctl net.ipv6.conf.all.disable_ipv6=1
systemctl restart httpd