《防火墙规则》word版

上传人:pu****.1 文档编号:424387288 上传时间:2023-08-18 格式:DOCX 页数:5 大小:16.48KB
返回 下载 相关 举报
《防火墙规则》word版_第1页
第1页 / 共5页
《防火墙规则》word版_第2页
第2页 / 共5页
《防火墙规则》word版_第3页
第3页 / 共5页
《防火墙规则》word版_第4页
第4页 / 共5页
《防火墙规则》word版_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

《《防火墙规则》word版》由会员分享,可在线阅读,更多相关《《防火墙规则》word版(5页珍藏版)》请在金锄头文库上搜索。

1、ROS软路由防火墙规则(转自网络) routeros防火墙功能非常灵活。routeros防火墙属于包过滤防火墙,你可以定义一系列的规则过滤掉发往routeros、从routeros发出、通过routeros转发的数据包。在routeros防火墙中定义了三个防火墙(过滤)链(即input、forward、output),你可以在这三个链当中定义你自己的规则。 input意思是指发往routeros自己的数据(也就是目的ip是routeros接口中的一个ip地址); output意思是指从routeros发出去的数据(也就是数据包源ip是routeros接口中的一个ip地址); forward意思

2、是指通过routeros转发的(比如你内部计算机访问外部网络,数据需要通过你的routeros进行转发出去)。禁止ping routeros,我们一般需要在input链中添加规则,因为数据包是发给routeros的,数据包的目标ip是routeros的一个接口ip地址。(当然如果你硬是要在output里建立一条规则过滤掉icmp信息也能做到ping不通,当你ping的数据包到达routeos时,routeos能接收这个数据包并做出回应,当routeros回应给你的包要发出去的时候会检查output的规则并过滤掉回应你的包。)在每条链中的每条规则都有目标ip,源ip,进入的接口(in inter

3、face),非常灵活的去建立规则。比如ROS禁止PING,禁止外网ping你routeros,只需要在in interface中选择你连外部网络的接口。禁止内部ping的话可以选择连你内部网络的接口。如果禁止所有的ping的话,那么接口选择all。当然禁止ping 协议要选择icmp ,action选择drop或reject。另外要注意的就是,icmp协议并不是就指的是ping,而是 ping是使用icmp协议中的一种(我们ping 出去发送的数据包icmp协议的类型为8 代码为0,在routeros中写为icmp-options=8:0;而我们对ping做出回应icmp类型为0 代码为0),

4、还有很多东西也属于icmp协议。打个比方,如果你禁止内部网络ping所有外部网络,可以在forward链中建立一条规则,协议为icmp,action为drop,其他默认,那么你内部网络ping不通外部任何地址,同时如果你用trancroute命令跟踪路由也跟踪不了。在做规则是要注意每一个细节。还有就是,input,output,forward三条链在routeros中默认都是允许所有的数据。也就是除非你在规则中明确禁止,否则允许。可以通过ip firewall set input policy=drop等进行修改默认策略ros防火墙名词解释input - 进入路由,并且需要对其处理forwar

5、d - 路由转发output - 经过路由处理,并且从接口出去的包action:1 accept:接受add-dst-to-address-list - 把一个目标IP地址加入address-listadd-src-to-address-list - 把一个源IP地址加入address-list2 drop - 丢弃3 jump - 跳转,可以跳转到一个规则主题里面,如input forward,也可以跳转到某一条里面4 log - 日志记录5 passthrough - 忽略此条规则6 reject - 丢弃这个包,并且发送一个ICMP回应消息7 return - 把控制返回给jump的所在

6、8 tarpit - 捕获和扣留进来的TCP连接 (用SYN/ACK回应进来的TCP SYN 包)address-list (name) - 把从action=add-dst-to-address-list or action=add-src-to-address-list actions得到的IP地址放入address-list列表. 这个列表要用来对比address-list-timeout 看是什么时候用address-list parameter从address list中移走chain (forward | input | output | name) - 使用chain得到特定列表

7、,不同的数据流经过不同的chain规则要仔细的选对正确的访问控制. 如果 input 不是非常的确定和一个新的规则需要添加注释,transfered through the particular connection0的意思是无限的,例如 connection-bytes=2000000-0 意思是2MB以上connection-limit (integer | netmask) - 地址的传输流量控制connection-mark (name) - 传输中的标记后的数据包connection-state (estabilished | invalid | new | related) - 连

8、接的状态(连接中,不规则的连接,新的连接,相互联系的连接)connection-type 连接的类型(ftp | gre | h323 | irc | mms | pptp | quake3 | tftp)content 包的内容dst-address (IP address | netmask | IP address | IP address) - 目标地址dst-address-list (name) - 目标地址表dst-address-type (unicast | local | broadcast | multicast) - 目标地址类型unicast -点对点local -

9、本地地址broadcast - 广播multicast - 多播dst-limit (integer | time | integer | dst-address | dst-port | src-address | time) - 目标限制Count - 每秒最大的包数量by Time optionTime - 时间Burst - 突发的Mode -等级优先Expire - 终止dst-port 目标端口hotspot 暂时不做学习icmp-options (integer | integer) - ICMP 选择in-interface (name) - 进入接口ipv4-options

10、(any | loose-source-routing | no-record-route | no-router-alert | no-source-routing |no-timestamp | none | record-route | router-alert | strict-source-routing | timestamp)any - match packet with at least one of the ipv4 optionsloose-source-routing - match packets with loose source routing option. Th

11、is option is used toroute the internet datagram based on information supplied by the sourceno-record-route - match packets with no record route option. This option is used to route theinternet datagram based on information supplied by the sourceno-router-alert - match packets with no router alter op

12、tionno-source-routing - match packets with no source routing optionno-timestamp - match packets with no timestamp optionrecord-route - match packets with record route optionrouter-alert - match packets with router alter optionstrict-source-routing - match packets with strict source routing optiontim

13、estamp - match packets with timestampjump-target (forward | input | output | name) -跳转limit (integer | time | integer) - 限制Count - 每秒最大的包数量Time - 突发的总时间log-prefix (text) - 如果还有定义的字符,加入日志out-interface (name) - 流出的接口p2p (all-p2p | bit-torrent | blubster | direct-connect | edonkey | fasttrack | gnutell

14、a | soulseek | warez| winmx) - P2P协议packet-mark (text) - 给包标记packet-size (integer: 0.65535 | integer: 0.65535) - 包大小range in bytesMin - 最小Max - 最大phys-in-interface (name) - 物理上的进入接口phys-out-interface (name) -物理上的出去接口protocol (ddp | egp | encap | ggp | gre | hmp | icmp | idrp-cmtp | igmp | ipencap |

15、ipip | ipsec-ah |ipsec-esp | iso-tp4 | ospf | pup | rdp | rspf | st | tcp | udp | vmtp | xns-idp | xtp | integer) -协议psd (integer | time | integer | integer) - 防止对ROS的端口扫描random (integer: 1.99) - matches packets randomly with given propabilityreject-with (icmp-admin-prohibited | icmp-echo-reply | ic

16、mp-host-prohibited |icmp-host-unreachable | icmp-net-prohibited | icmp-network-unreachable | icmp-port-unreachable |icmp-protocol-unreachable | tcp-reset | integer) - 改变reject的回答方式routing-mark (name) - 路由标记src-address (IP address | netmask | IP address | IP address) -源地址src-address-list (name) -源地址列表src-addres

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 工作计划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号