CentOS 7 中firewall-cmd命令
来源:互联网
时间:2026-02-26 14:56:28
作者:
系统大全为您提供
在 CentOS 7 暂时开放 ftp 服务 # firewall-cmd --add-service=ftp 永久开放 ftp 服务 # firewall-cmd --add-service=ftp --permanent 永久关闭 # firewall-cmd --remove-service=ftp --permanent success 让设定生效 # systemctl restart firewalld 检查设定是否生效 # iptables -L -n | grep 21 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:21 ctstate NEW 检查防火墙状态 # firewall-cmd --state running # systemctl stop firewalld # firewall-cmd --state not running # firewall-cmd --list-all public (default) interfaces: sources: services: dhcpv6-client ftp ssh ports: masquerade: no forward-ports: icmp-blocks: rich rules: 在 FirewallD 的服务名称 # firewall-cmd --get-service amanda-client bacula bacula-client dhcp dhcpv6 dhcpv6-client dns ftp high-availability https://www.herecours.com/d/file/efpub/2026/26-26/20260226144048569149://www.herecours.com/d/file/efpub/2026/26-26/20260226144048569148 https://www.herecours.com/d/file/efpub/2026/26-26/20260226144048569149://www.herecours.com/d/file/efpub/2026/26-26/20260226144048569148s imaps ipp ipp-client ipsec kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3s postgresql proxy-dhcp radius rpc-bind samba samba-client smtp ssh telnet tftp tftp-client transmission-client vnc-server wbem-https://www.herecours.com/d/file/efpub/2026/26-26/20260226144048569149://www.herecours.com/d/file/efpub/2026/26-26/20260226144048569148s 查询服务的启用状态 # firewall-cmd --query-service ftp yes # firewall-cmd --query-service ssh yes # firewall-cmd --query-service samba no # firewall-cmd --query-service https://www.herecours.com/d/file/efpub/2026/26-26/20260226144048569149://www.herecours.com/d/file/efpub/2026/26-26/20260226144048569148 no 自行加入要开放的 Port # firewall-cmd --add-port=3128/tcp # firewall-cmd --list-all public (default) interfaces: sources: services: dhcpv6-client ftp ssh ports: 3128/tcp masquerade: no forward-ports: icmp-blocks: rich rules:
以上就是系统大全给大家介绍的如何使的方法都有一定的了解了吧,好了,如果大家还想了解更多的资讯,那就赶紧点击系统大全官网吧。
本文来自系统大全https://www.herecours.com/d/file/efpub/2026/26-26/20260226144048569149://www.herecours.com/d/file/efpub/2026/26-26/20260226144048569148://www.win7cn.com/如需转载请注明!推荐:win7纯净版
编辑推荐:
- CentOS 7 中firewall-cmd命令02-26
- linux磁盘管理二02-26
- 阿里云linux服务器修改root管理密码教程02-26
- linuxshell实现自动清理rman备份文件的脚本02-26
- Linux系统重装与还原02-26
- ubuntu环境变量配置文件02-26
- vim 配置02-26
- Ubuntu解压缩命令详解02-26
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- 阿里云linux服务器修改root管理密码教程
阿里云linux服务器修改root管理密码教程
26-02-26 - linux忘记root密码的解决方法
linux忘记root密码的解决方法
26-02-26 - Linux系统虚拟内存空间
Linux系统虚拟内存空间
26-02-26 - 初探微软 Edge 浏览器 AI 标签分组功能:1 秒整理 40 个杂乱网页
- 谷歌收编机器人软件领域姊妹企业 Intrinsic
谷歌收编机器人软件领域姊妹企业 Intrinsic
26-02-26 - 游改电影《真人快打 2》最新中文预告发布,北美今年 5 月 15 日上映
游改电影《真人快打 2》最新中文预告发布,北美今年 5 月 15 日上映
26-02-26 - 华住集团创始人季琦向上海交大捐赠 1 亿元
华住集团创始人季琦向上海交大捐赠 1 亿元
26-02-26 - 微软 Edge 将增新功能:Outlook 里点击链接后自动打开 Copilot 侧边栏
- 再有参与者退场:BUFFALO 巴法络计划于 2026 年 7 月停止销售蓝光播放器
- 在Windows下安装Ubantu的愉快体验
在Windows下安装Ubantu的愉快体验
26-02-26
