防火墙相关

防火墙相关

  1. 查看服务器端口情况

    • 查看具体端口

      lsof -i:80   # 以端口为例
      
    • 查看所有开启的端口号

      netstat -aptn
      
    • 查看系统中所有使用udp协议的端口信息

      netstat -nupl
      
    • 查看系统中使用tcp协议的端口号信息

      netstat -ntpl
      
  2. 防火墙相关

    • 方式一 iptables
      • 安装iptables-services

        yum install iptables-services
        
      • 启动iptables

        systemctl enable iptables
        systemctl start iptables
        
      • 查看防火墙状态

        service iptables status
        
      • 关闭防火墙

        service iptables stop
        
      • 打开防火墙

        service iptables start
        
    • 方式二 firewalld
      • 启动

        systemctl start firewalld
        
      • 查看状态

        systemctl status firewalld
        
      • 禁用,禁止开机启动

        systemctl disable firewalld
        
      • 停止运行

        systemctl stop firewalld
        
      • 重启

        firewall-cmd --reload
        
posted @   疯狂列表推导式  阅读(35)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
点击右上角即可分享
微信分享提示