romancetown

Linux开放指定端口号

1.编辑系统文件

vim /etc/sysconfig/iptables

2.进入编辑页面后,增加如下内容:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT  //8080表示要开放的端口号

3.保存后退出,重启网卡服务

service iptables restart

 

参考:https://www.cnblogs.com/zengweiming/p/6604424.html

分类:

技术点:

相关文章:

  • 2021-11-30
  • 2022-01-07
  • 2022-01-07
  • 2021-11-30
  • 2022-02-13
猜你喜欢
  • 2021-12-31
  • 2022-01-20
  • 2022-02-08
  • 2022-01-07
  • 2021-05-19
  • 2022-12-23
相关资源
相似解决方案