Firewallrule

From Wiki of WFilter NG Firewall
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
{DISPLAYTITLE:Rules}}
+
{{DISPLAYTITLE:Firewall Rules}}
== Add Firewall Rule ==
+
 
<p>'''Interface''':对应“网络设置”-“接口设置”中的内网外网。</p>
+
"Firewall Rules" block or allow traffic based on IP and ports. If you need "URL filter", "application control" and so on, you need to check modules in [[Access_Policy|"Access Policy"]].
<p>'''Source IP''':数据包是从哪个IP发出来的,起源IP。支持“所有IP”、“指定IP”和“指定IP段”3种IP格式。当选择“指定IP”时,可以输入单个IP地址,或者IP段(比如192.168.1.0/24)。选择“指定IP段”时,需要输入IP范围。</p>
+
 
<p>'''Remote IP''':数据包要到达的IP,发往哪里。支持“所有IP”、“指定IP”和“指定IP段”3种IP格式。当选择“指定IP”时,可以输入单个IP地址,或者IP段(比如192.168.1.0/24)。选择“指定IP段”时,需要输入IP范围。</p>
+
== New Rule ==
<p>'''Remote Port''':数据包要到达的端口。“端口”支持一个端口或者一个端口范围,例:8000或者8000:9000(范围)。</p>
+
[[File: Firewall_set.jpg|650px]]
<p>'''Proto''':TCP或者UDP或者两者皆有。</p>
+
 
<p>'''Action''':“阻止”:客户机会立即收到被拒绝的数据包(RST)。“丢弃”:直接丢弃数据包,客户机需要等待连接超时。“通过”:放行该数据包。</p>
+
New a firewall rule, descriptions:
<p>'''Applytime''':设置该条防火墙规则的生效时间,可以指定时间段,也可以任何时间都生效。</p>
+
 
<p>'''From-to''':“生效时间”设为指定时间后后可以设置,配置规则生效的开始时间和结束时间。</p>
+
* '''Interface''': "LAN" or "WAN", interface for this rule to work on.
<p>'''Effective on''':设置在一周内,规则生效的时间。</p>
+
* '''Source IP''': packet source ip address. You can define IP as "Any", "Single" and "Range".
[[File:Firewall_set_en.jpg]]
+
** For "Single", a single ip or subnet is allowed(for example: 192.168.1.10 or 192.168.1.0/24).
 +
** For "Range", you need to input an ip range.
 +
* '''Remote IP''': packet target ip address, same syntax as the "Source IP".
 +
* '''Remote Port''': packet target port, can be a single port or a port range, for example: 8000 or 8000:9000(range).
 +
* '''Action''':
 +
** "Reject": the rejected clients will get a RST packet immediately.
 +
** "Drop": packets will be dropped, the clients will wait for connection timeout.
 +
** "Allow": allow packet
 +
* You may use '''time''', '''from-to''' and '''effective on''' to define a time period for this rule to be applied.
 +
 
 +
== Processing Order for Rules ==
 +
 
 +
Rules are always processed from the top of a list down, first match wins. Understanding this order is especially important.
 +
You may drag the re-order icon to re-order rules.
 +
 
 +
[[File: ros_firewall_01.png|650px]]
 +
 
 
== Advanced Settings ==
 
== Advanced Settings ==
<p>'''Drop Invalid Packets''':对于无效的数据包进行丢弃。</p>
+
Some advanced options, recommended to enable.
<p>'''Enable SYN Flood Protection''':SYN Flood是一种广为人知的DoS(拒绝服务攻击)与DDoS(分布式拒绝服务攻击)的方式之一,这是一种利用TCP协议缺陷,发送大量伪造的TCP连接请求,从而使得被攻击方资源耗尽(CPU满负荷或内存不足)的攻击方式。开启后可以防止受到SYN-flood攻击。</p>
+
 
<p>'''Allow Ping on WAN Interfaces''':允许从WAN口ping通路由器。</p>
+
* '''Drop Invalid Packets'''.
[[File:Firewall_advanced_en.jpg]]
+
* '''SYN Flood Protection''': Kind of DDos attack.
 +
* '''Allow Ping on WAN Interfaces''': Allow ICMP ping to the WAN interface from external network.
 +
 
 +
[[File: Firewall_advanced.jpg|400px]]

Revision as of 14:35, 22 December 2015


"Firewall Rules" block or allow traffic based on IP and ports. If you need "URL filter", "application control" and so on, you need to check modules in "Access Policy".

1 New Rule

650px

New a firewall rule, descriptions:

  • Interface: "LAN" or "WAN", interface for this rule to work on.
  • Source IP: packet source ip address. You can define IP as "Any", "Single" and "Range".
    • For "Single", a single ip or subnet is allowed(for example: 192.168.1.10 or 192.168.1.0/24).
    • For "Range", you need to input an ip range.
  • Remote IP: packet target ip address, same syntax as the "Source IP".
  • Remote Port: packet target port, can be a single port or a port range, for example: 8000 or 8000:9000(range).
  • Action:
    • "Reject": the rejected clients will get a RST packet immediately.
    • "Drop": packets will be dropped, the clients will wait for connection timeout.
    • "Allow": allow packet
  • You may use time, from-to and effective on to define a time period for this rule to be applied.

2 Processing Order for Rules

Rules are always processed from the top of a list down, first match wins. Understanding this order is especially important. You may drag the re-order icon to re-order rules.

Ros firewall 01.png

3 Advanced Settings

Some advanced options, recommended to enable.

  • Drop Invalid Packets.
  • SYN Flood Protection: Kind of DDos attack.
  • Allow Ping on WAN Interfaces: Allow ICMP ping to the WAN interface from external network.

400px

Personal tools
Namespaces

Variants
Actions
Navigation
Tools