如果linux下没有开启对某端口访问权限,你可以通过下面的命令可以开启允许对外访问的网络端口,示例如下:

[root@asg76 sysconfig]# iptables -I INPUT -p tcp --dport 80 -j ACCEPT
[root@asg76 sysconfig]# iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
[root@asg76 sysconfig]# iptables -I INPUT -p tcp --dport 8081 -j ACCEPT
[root@asg76 sysconfig]# iptables -I INPUT -p tcp --dport 25  -j ACCEPT

使用以上命令,是修改/etc/sysconfig/iptables之外的一个方法,通过上述命令开启的端口不会反应在文件/etc/sysconfig/iptables中。

相关文章:

  • 2022-01-07
  • 2022-02-01
  • 2021-06-29
  • 2021-11-17
  • 2021-12-31
  • 2021-11-21
  • 2021-07-11
  • 2021-12-19
猜你喜欢
  • 2022-01-07
  • 2022-01-11
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案