赞
踩
一、配置安全组
二、安装了iptables
- # 1、第一步
- vi /etc/sysconfig/iptables
-
- # 新增8848
- # Completed on Tue Mar 1 19:38:22 2022
- # Generated by iptables-save v1.8.4 on Tue Mar 1 19:38:22 2022
- *filter
- :INPUT ACCEPT [0:0]
- :FORWARD ACCEPT [0:0]
- :OUTPUT ACCEPT [0:0]
- -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
- -A INPUT -p icmp -j ACCEPT
- -A INPUT -i lo -j ACCEPT
- -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
- -A INPUT -m state --state NEW -m tcp -p tcp --dport 8848 -j ACCEPT
- -A INPUT -j REJECT --reject-with icmp-host-prohibited
- -A FORWARD -j REJECT --reject-with icmp-host-prohibited
- COMMIT
- # Completed on Tue Mar 1 19:38:22 2022
-
- # 2、重启iptables
- systemctl enable iptables
-
- systemctl start iptables
-
- # 3、查看端口是否开启
- # 查询某个端口是否开通
- netstat -nao | grep 8848
- # 查询所有开通端口
- netstat -ntlp
-
-
-
三、如果发现还是没有开通,去检查下应用是否启动
如果应用没启动,端口会显示关闭状态!!!!!!!!
最后,附上一个检查端口是否开通的网站:在线端口检测,端口扫描,端口开放检查-online tool-postjson
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。