update ip rule pages
This commit is contained in:
@@ -19,32 +19,70 @@ smartdns provides IP address whitelist, blacklist and ignore rules for filtering
|
||||
|
||||
If you want to restrict the IP addresses returned by an upstream server within a whitelist range, and disregard non-whitelisted addresses, you can set the following:
|
||||
|
||||
Method 1:
|
||||
|
||||
```shell
|
||||
server -whitelist-ip
|
||||
whitelist-ip 192.168.1.1/24
|
||||
```
|
||||
|
||||
Method 2:
|
||||
|
||||
```shell
|
||||
server -whitelist-ip
|
||||
ip-rules 192.168.1.1/24 -whitelist-ip
|
||||
```
|
||||
|
||||
## Blacklist IP addresses
|
||||
|
||||
To restrict the return of IP addresses from a certain upstream and discard IP within a specified range, a blacklist can be set up as follows:
|
||||
|
||||
Method 1:
|
||||
|
||||
```shell
|
||||
server -blacklist-ip
|
||||
blacklist-ip 192.168.1.1/24
|
||||
```
|
||||
|
||||
Method 2:
|
||||
|
||||
```shell
|
||||
server -blacklist-ip
|
||||
ip-rules 192.168.1.1/24 -blacklist-ip
|
||||
```
|
||||
|
||||
## Ignore IP addresses
|
||||
|
||||
If you want to use a specific IP address returned by an upstream server, you can configure it to be ignored.
|
||||
|
||||
Method 1:
|
||||
|
||||
```shell
|
||||
ignore-ip 1.2.3.4
|
||||
```
|
||||
|
||||
Method 2:
|
||||
|
||||
```shell
|
||||
ip-rules 1.2.3.4 -ignore-ip
|
||||
```
|
||||
|
||||
## Spoof IP addresses
|
||||
|
||||
If the ISP returns a 404 page containing a specific IP address range when the website does not exist, such as China Telecom's custom 404 page, you can use this parameter to return an SOA to the client instead of the ISP's redirect 404 page.
|
||||
|
||||
Method 1:
|
||||
|
||||
```shell
|
||||
bogus-nxdomain 1.2.3.4
|
||||
```
|
||||
|
||||
Method 2:
|
||||
|
||||
```shell
|
||||
ip-rules 1.2.3.4 -bogus-nxdomain
|
||||
```
|
||||
|
||||
## IP Set
|
||||
|
||||
If there are multiple IP address configuration rules, you can use [IP Set](../config/ip-set.md) for quick configuration.
|
||||
@@ -3,7 +3,7 @@ hide:
|
||||
- toc
|
||||
---
|
||||
|
||||
# Using IP Address Sets
|
||||
# Using IP Address Set
|
||||
|
||||
To facilitate the configuration of IP addresses according to sets, for configurations that use `ip/subnet`, IP address sets can be specified for easy maintenance. The specific method is as follows:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user