CentOS 7 以上版本的firewall
来源:互联网 发布:macbook rar解压软件 编辑:程序博客网 时间:2024/05/21 01:31
系统:CentOS 7
firewall命令示例
firewall-cmd --version #查看firewall版本firewall-cmd --help #查看帮助systemctl start firewalld #启动firewallsystemctl status firewalld #查看firewall状态systemctl disable firewalld #停止firewallsystemctl stop firewalld #禁用firewallfirewall-cmd --reload #重新载入,更新防火墙规则firewall-cmd --state #查看firewall的状态firewall-cmd --list-all #查看防火墙规则/usr/lib/firewalld/services #该目录中存放的是定义好的网络服务和端口参数,只用于参考,不能修改。firewall-cmd --permanent --add-service=ftp #开放FTP服务firewall-cmd --permanent --remove-service=ftp #关闭FTP服务systemctl restart firewalld #让设定生效iptables -L -n | grep 21 #检查设定是否生效firewall-cmd --query-service ftp #查看服务的启用状态firewall-cmd --permanent --add-port=3128/tcp #插入firewall规则,打开3128端口firewall-cmd --permanent --query-port=3128/tcp #查询插入规则是否生效firewall-cmd --get-service #在firewall中的服务名称firewall-cmd --zone=public --list-ports #查看所有打开的端口firewall-cmd --zone=public --permanent --add-port=80/tcp #添加端口--permanent永久生效,没有此参数重启后失效firewall-cmd --zone=public --permanent --remove-port=80/tcp #删除端口firewall-cmd --panic-on #拒绝所有包firewall-cmd --panic-off #取消拒绝状态firewall-cmd --query-panic #查看是否拒绝
获取所有firewall所支持的服务
# firewall-cmd --get-servicesRH-Satellite-6 amanda-client amanda-k5-client bacula bacula-client ceph ceph-mon dhcp dhcpv6 dhcpv6-client dns docker-registry dropbox-lansync freeipa-ldap freeipa-ldaps freeipa-replication ftp high-availability http https imap imaps ipp ipp-client ipsec iscsi-target kadmin kerberos kpasswd ldap ldaps libvirt libvirt-tls mdns mosh mountd ms-wbt mysql nfs ntp openvpn pmcd pmproxy pmwebapi pmwebapis pop3 pop3s postgresql privoxy proxy-dhcp ptp pulseaudio puppetmaster radius rpc-bind rsyncd samba samba-client sane smtp smtps snmp snmptrap squid ssh synergy syslog syslog-tls telnet tftp tftp-client tinc tor-socks transmission-client vdsm vnc-server wbem-https xmpp-bosh xmpp-client xmpp-local xmpp-server
systemctl命令范例
systemctl is-enabled servicename.service #查询服务是否开机启动 systemctl enable servicename.service #开机运行服务 systemctl disable servicename.service #取消开机运行 systemctl start servicename.service #启动服务 systemctl stop servicename.service #停止服务 systemctl restart servicename.service #重启服务 systemctl reload servicename.service #重新加载服务配置文件 systemctl status servicename.service #查询服务运行状态 systemctl --failed #显示启动失败的服务
阅读全文
0 0
- CentOS 7 以上版本的firewall
- CentOS 7以上默认使用firewall作为防火墙改为iptables
- centos 7 Firewall的配置
- CentOS 7 Firewall变化
- CentOS 7 防火墙 firewall
- centos 7 firewall配置
- CentOS 7 firewall使用方法
- Centos 7 firewall 命令
- Centos 7 firewall 命令:
- CentOS 7 下使用 Firewall
- CentOS 7 下使用 Firewall
- Centos 7 防火墙firewall配置
- CentOS 7 firewall防火墙命令
- CentOS 7 下使用 Firewall
- CentOS 7 防火墙 firewall-cmd
- Centos 7防火墙firewall-cmd
- centos 7 firewall 防火墙设置
- centos firewall
- JS——window.location.search
- Shell操作使用技巧
- IntelliJ Idea 常用快捷键列表
- C2589“(”:“::”右边的非法标记
- [kernel 启动流程] (第七章)第一阶段之——跳转到start_kernel
- CentOS 7 以上版本的firewall
- 绘制形状与文字
- Mysql各种索引区别
- UE4_VS_CE5
- 应用程序——链接脚本
- 这是我第一个页面
- 基于经典分割算法的图像内细胞识别与计数(matlab实现)(不定期更新完善)
- 摘录nginx 信号处理方法部分代码
- 短按数字加减,长按数字清零