PJG20
1、开启防火墙 
    systemctl start firewalld

2、开放指定端口
      firewall-cmd --zone=public --add-port=1935/tcp --permanent
 命令含义:
--zone #作用域
--add-port=1935/tcp  #添加端口,格式为:端口/通讯协议
--permanent  #永久生效,没有此参数重启后失效

3、重启防火墙
      firewall-cmd --reload

4、查看端口号
netstat -ntlp   //查看当前所有tcp端口·

netstat -ntulp |grep 1935   //查看所有1935端口使用情况·
 方式二
 

#开放端口:8080

/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT

 

方式三

-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT

service iptables restart

 

 

分类:

技术点:

相关文章:

  • 2021-11-30
  • 2021-12-10
  • 2021-11-13
  • 2021-10-09
  • 2021-11-30
  • 2022-01-07
  • 2022-01-07
  • 2021-12-31
猜你喜欢
  • 2021-11-13
  • 2021-10-03
  • 2021-12-10
  • 2021-12-01
  • 2021-10-09
相关资源
相似解决方案