第一步:

切换到root用户:su root

第二步:

编辑iptables:vim /etc/sysconfig/iptables

最原始的iptalbes只有22端口开放,我们只需要把22端口那一行复制下来,把端口号改为自己需要开放的端口号,一定要加在

-A INPUT -j REJECT --reject-with icmp-host-prohibited一行上面,否则无法对外开放

linux对外开放端口

重启iptables:service iptables restart

相关文章:

  • 2022-01-07
  • 2021-12-01
  • 2021-11-21
  • 2021-11-13
  • 2021-11-30
  • 2021-11-02
  • 2021-11-21
  • 2021-11-06
猜你喜欢
  • 2021-12-25
  • 2021-09-25
  • 2021-09-28
  • 2021-10-09
  • 2021-10-08
  • 2021-11-28
  • 2021-11-28
相关资源
相似解决方案