IP Rules
IP-based rules allow for traffic routing based on the destination IP address or its geographic location (GeoIP).
CIDR
Classless Inter-Domain Routing (CIDR) rules match traffic against specific IP address ranges.
Reference: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
Example
# Routes traffic to the 192.168.0.0/16 private network directly
IP-CIDR,192.168.0.0/16,DIRECT
# Routes IPv6 traffic to the specified CIDR range (currently ignored by Surfboard)
IP-CIDR6,2001:db8:abcd:8000::/50,DIRECT
Format
{type}, {route}, {target proxy}
Parameters
| Name | Value | Mandatory | Note |
|---|---|---|---|
| type | IP-CIDR IP-CIDR6 | true | IP-CIDR works on IPv4 traffic. IP-CIDR6 works on IPv6 traffic. |
| route | - | true | Format: {IP}/{mask}, where the mask is in CIDR prefix format. |
| target proxy | - | true | The specified proxy or proxy group must exist in the profile. |
caution
IPv6 is currently not supported by Surfboard; IP-CIDR6 rules will be ignored.
GEOIP
Reference:
Example
GEOIP,US,REJECT
Format
GEOIP,{country},REJECT
Parameters
| Name | Value | Mandatory | Note |
|---|---|---|---|
| country | - | true | Format: 2-letter ISO country code. |
| target proxy | - | true | The specified proxy or proxy group must exist in the profile. |