上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 42 下一页
摘要: 1.查看防火墙 #默认是filter表 [root@m01 ~]# iptables -nL Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state 阅读全文
posted @ 2020-09-16 15:39 六月OvO 阅读(141) 评论(0) 推荐(0)
摘要: #常用参数 1.链管理: -N:new, 自定义一条新的规则链; -X:delete,删除自定义的规则链; 注意:仅能删除 用户自定义的 引用计数为0的 空的 链; -P:Policy,设置默认策略;对filter表中的链而言,其默认策略有: ACCEPT:接受 DROP:丢弃 REJECT:拒绝 阅读全文
posted @ 2020-09-16 15:36 六月OvO 阅读(191) 评论(0) 推荐(0)
摘要: 1.安装 [root@m01 ~]# yum install -y iptables-services 2.安装iptables支持的内核模块 [root@m01 ~]# modprobe ip_tables [root@m01 ~]# modprobe iptable_filter [root@m 阅读全文
posted @ 2020-09-16 15:35 六月OvO 阅读(439) 评论(0) 推荐(0)
摘要: #四表: 1.filter表 2.nat表 3.raw表 4.mangle表 #五链: 1.INPUT 2.OUTPUT 3.FORWARD 4.PREROUTING 5.POSTROUTING 1.filter表 主要作用就是阻止和允许访问 #包含的链: 1.INPUT:过滤进入主机的数据包 2. 阅读全文
posted @ 2020-09-16 15:32 六月OvO 阅读(125) 评论(0) 推荐(0)
摘要: 一、iptables防火墙基本概述 1.应用场景 1.主机安全 2.端口转发/ip转发 3.内部共享上网 2.iptables工作流程 1.配置防火墙规则可以添加在下面,也可以添加在前面,是有顺序的 2.匹配规则时是按照从上到下依次匹配 3.只要符合匹配到的规则,就不再往下匹配 4.如果都没有匹配上 阅读全文
posted @ 2020-09-16 15:29 六月OvO 阅读(117) 评论(0) 推荐(0)
摘要: 1.开启IP伪装 [root@m01 ~]# firewall-cmd --add-masquerade success 2.开启内核转发 注意这一步只有CentOS6系统需要做,CentOS7中默认已经开启。 #配置内核转发 [root@m01 ~]# vim /etc/sysctl.conf n 阅读全文
posted @ 2020-09-16 15:24 六月OvO 阅读(277) 评论(0) 推荐(0)
摘要: #防火墙规则永久生效后,会写入配置文件 [root@web02 ~]# ll /etc/firewalld/zones/ total 12 -rw-r--r-- 1 root root 515 Sep 15 18:49 public.xml -rw-r--r--. 1 root root 366 S 阅读全文
posted @ 2020-09-16 15:21 六月OvO 阅读(681) 评论(0) 推荐(0)
摘要: 1.富规则语法 [root@web02 ~]# man firewalld.richlanguage rule [source] [destination] service|port|protocol|icmp-block|icmp-type|masquerade|forward-port|sour 阅读全文
posted @ 2020-09-16 15:19 六月OvO 阅读(1961) 评论(0) 推荐(0)
摘要: 1.语法 端口转发是指传统的目标地址映射,实现外网访问内网资源流量转发命令格式为: firewalld-cmd --permanent --zone=<区域> --add-forward-port= port=<源端口号>:proto=<协议>:toport=<目标端口号>:toaddr=<目标IP 阅读全文
posted @ 2020-09-16 15:12 六月OvO 阅读(1853) 评论(1) 推荐(0)
摘要: 1.firewalld放行服务 #放行某个服务 [root@web02 ~]# firewall-cmd --add-service=http success #放行多个服务 [root@web02 ~]# firewall-cmd --add-service={https,mysql,redis} 阅读全文
posted @ 2020-09-16 15:10 六月OvO 阅读(829) 评论(0) 推荐(1)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 42 下一页