开放端口
机器默认仅开通了22端口,如果你创建服务器没有勾选公网IP,后来又申请的公网IP,那么所有端口都没开放!
1)查看实例详情,点击【虚拟云网络】

2)然后点击子网中的数据!

3)再点安全列表中的数据。

4)入站规则,可见仅开放了22端口!ICMP 也是关闭的(禁ping)!

5)编辑第一条数据。将目的地端口范围里的数据清空!保存即可!!

6)或者更暴力一点开放所有协议!!!

6)同时还需要关闭iptabls 或者 firewalld !
centos操作如下
1
2
3
4
5
6
7
8
9
10
11
|
#停止firewall
systemctl stop firewalld.service
#禁止firewall开机启动
systemctl disable firewalld.service
#关闭iptables
service iptables stop
#去掉iptables开机启动
chkconfig iptables off
|
或者开放所有端口!
1
2
3
4
|
sudo iptables –P INPUT ACCEPT
sudo iptables –P FORWARD ACCEPT
sudo iptables –P OUTPUT ACCEPT
sudo iptables –F
|
文章评论