Rules#

How does NetPatch firewall work?#

How NetPatch Firewall works?

IP Group#

IP Group is one group of IP/Network address. It's just one line-based text file, one line is a IP address or Network address. Like below:

127.0.0.0/8
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
155.6.78.1

e.g.:
8.8.8.8 match one IP 8.8.8.8,
10.0.0.0/8 match network 10.*.*.*

You can Create any number of IP groups, it can be local or remote via url.
Each IP Group can be set to direct, block, proxy or disabled rule.
Each Group has a Priority, The higher the priority, the earlier match.

Domain Group#

Domain Group is one group of domain name. It's just one line-based text file, one line is a domain name or root domain name. Like below:

one.domain.com
.oneroot.com
aaaaaa.net
bbbbbb.net
.ccccc.a.co

e.g.:
a.b.com matches a.b.com exactly,
.b.com matches b.com and *.b.com(e.g., a.b.com, c.a.b.com)

You can Create any number of domain groups, it can be local or remote via url.
Each Domain Group can be set to direct, block, proxy or disabled rule.
Each Group has a Priority, The higher the priority, the earlier match.
Hosts file is also accepted, 127.0.0.1/0.0.0.0 in hosts file is ignored.

Default Rule#

If no IP Group or Domain Group match, the default rule is used.
It can be set to direct, block, proxy.

Group Url scheme#

netpatch://firewall/list?name=*name*&type=*type*&rule=*rule*&url=*group_url*

type: ip, domain
rule: direct, block, proxy

The following examples, one is a IP Group url, the other is a Domain Group url.

netpatch://firewall/list?name=United%20States&type=ip&rule=proxy&url=https%3A//example.com/ips/US.txt
netpatch://firewall/list?name=Blocks%20domains&type=domain&rule=block&url=https%3A//example.org/blocks.txt  

NetPatch Firewall will handle those links on devices with NetPatch Firewall installed.

e.g. Click link below, NetPatch Firewall will open it:

netpatch://firewall/list?name=Example&type=domain&rule=block&url=https%3A//netpatch.github.io/domain/example.txt

IP/Domain Groups for Netpatch Firewall#

https://github.com/netpatch/groups_for_netpatch_firewall