Introduction to VPS and Web Technology Development

容器内无法访问外网,容器外可以访问外网,在宿主机防火墙关闭的前提下 可以重启容器 可能是网卡配置失败

自由vps php
/www/spider # exit
[root@localhost ~]# ping baidu.com
PING baidu.com (110.242.68.66) 56(84) bytes of data.
64 bytes from 110.242.68.66 (110.242.68.66): icmp_seq=1 ttl=128 time=57.2 ms
64 bytes from 110.242.68.66 (110.242.68.66): icmp_seq=2 ttl=128 time=44.6 ms
64 bytes from 110.242.68.66 (110.242.68.66): icmp_seq=3 ttl=128 time=44.7 ms
^C
--- baidu.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 44.616/48.888/57.267/5.930 ms
[root@localhost ~]# systemctl stop firewall-service
Failed to stop firewall-service.service: Unit firewall-service.service not loaded.
[root@localhost ~]# systemctl stop firewall.service
Failed to stop firewall.service: Unit firewall.service not loaded.
[root@localhost ~]# systemctl stop service firewall
Failed to stop service.service: Unit service.service not loaded.
Failed to stop firewall.service: Unit firewall.service not loaded.
[root@localhost ~]# systemctl stop service firewalld
Failed to stop service.service: Unit service.service not loaded.
[root@localhost ~]# service iptables stop 
Redirecting to /bin/systemctl stop iptables.service
Failed to stop iptables.service: Unit iptables.service not loaded.
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)
[root@localhost ~]# systemctl disable firewalld

使用chatGPT寻求答案
标签: 暂无标签

免责声明:

本站提供的资源,都来自网络,版权争议与本站无关,所有内容及软件的文章仅限用于学习和研究目的。不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负,我们不保证内容的长久可用性,通过使用本站内容随之而来的风险与本站无关,您必须在下载后的24个小时之内,从您的电脑/手机中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。侵删请致信E-mail:master@freevpsweb.com

同类推荐
评论列表