In This Section: |
In addition to dynamic and static routing, you can use Policy Based Routing (PBR) to control traffic. PBR Policy Rules have priority over static and dynamic routes in the routing table. When a packet arrives at a Gaia Security Gateway, the gateway goes through the PBR Rules in the order of their set priority, and looks for a match. If the match exists, the gateway forwards the packet according to the rule. If there is no match in the PBR Policy, the gateway forwards the packet according to static or dynamic routes in the routing table.
To configure Policy Based Routing:
You can configure Policy Based Routing in Check Point Gaia Portal or in CLI.
To add static routes in an Action Table:
The Add Policy Table with Static Route window opens.
Note - Table ID is assigned by the system.
Note - If selected, the Destination address and Subnet mask fields do not show.
Notes:
To delete an Action Table:
To add a Policy Rule:
To Delete a Policy Rule:
Parameter |
Description |
---|---|
Table Name |
The name of the table. |
Table ID |
A numerical ID for the table. Assigned by the system. |
Default route |
The default static route in the system routing table. |
Destination |
The destination of the route. |
Subnet mask |
Subnet mask for the destination of the route. |
Next Hop Type |
Choose one of:
|
Gateway IP address |
Next hop gateway IPv4 address. |
Gateway Interface |
Security Gateway interface that leads to the next hop gateway. |
Gateway Priority |
The preference of the particular route.
|
Parameter |
Description |
---|---|
Priority |
You can define many Policy Rules. Traffic is matched to all the rules, one rule at a time, according to the priority that is configured for the rule. |
Action |
The action to take if the traffic is matched |
Prohibit |
Send a Prohibit message to the sending host. |
Unreachable |
Send an Unreachable message to the sending host. |
Table |
Do the actions defined in an Action Table. |
Match |
|
Interface |
Match by: Interface through which the packets enter the Security Gateway from the source host. |
Source, subnet mask |
Match by: Source IPv4 address and subnet mask. |
Destination, Subnet mask |
Match by: Destination IPv4 address and subnet mask. |
To create an Action Table:
Run this command:
set pbr table <table_name> static-route {default | <destination_ip/mask>} nexthop
gateway
address <nexthop_ip>
{on | off}
monitored-ip <monitored_ip> {on | off}
monitored-ip-option {fail-all | fail-any | force-if-symmetry {on | off}}
priority <route_priority_value>
logical <interface_name>
{on | off}
priority <route_priority_value>
reject
blackhole
Parameter |
Description |
---|---|
|
Name of the PBR Policy Table. |
|
Route to -
|
|
Type of the next hop:
|
|
Remote IPv4 address to monitor for the next hop gateway. Set a gateway to monitor IP address(es) configured with the The gateway becomes usable with respect to reachability of IP address(es) reported from the |
|
Set failure condition and flavor for the configured monitored IP address(es).
|
|
Set priority of the route - a value from 1 to 8 |
|
Drop packets and send Unreachable messages to the sender |
|
Drop packets and do not send any notifications to the sender |
|
Turn on and off the setting:
|
Note - You can add multiple routes to the same table. To do that, run set pbr table
command with the same table_name.
Example:
Create an Action Table named PBRtable1, with a route to the network 192.0.2.0/24 out of the interface Ethernet 0 and a route to the network 192.0.3.0/24 through the next-hop gateway with the IP address 192.168.1.1.
set pbr table PBRtable1 static-route 192.0.2.0/24 nexthop gateway logical eth0 on
set pbr table PBRtable1 static-route 192.0.3.0/24 nexthop gateway address 192.168.1.1 on
To configure a Policy Rule:
Run this command:
set pbr rule priority <priority_value>
action {prohibit | table <PBR_Table> | unreachable}
match
from <source_IP/mask>
interface <interface_name>
port {<port_number> | off}
protocol {<protocol_number> | tcp | udp | icmp | off}
to <destination_IP/mask>
off
Parameter |
Description |
---|---|
|
Unique integer value between 1 and 5000. The gateway checks all Policy Rules, one at a time, in order of priority. The highest priority is 1. |
|
If the packet matches the specified parameters, select a routing action:
|
|
Configure the traffic matching criteria:
|
|
Delete the Policy Rule. |
Example:
Create a Policy Rule that forwards all packets with the destination address 192.0.2.1/32 that arrive on the interface Ethernet 2 according to the PBR Table PBRtable1
, and assign to it the priority of 100.
set pbr rule priority 100 match to 192.0.2.1/32 interface eth2
set pbr rule priority 100 action table PBRtable1
To monitor Policy Based Routing - Gaia Portal
To monitor Policy Based Routing - Gaia Clish
Run these commands:
show pbr tables
show pbr rules
show pbr summary