Route Injection Mechanism (RIM)
What can I do here?
Use this window to configure RIM for gateways in a Meshed or Star VPN community.
|
Getting Here - SmartConsole > Security Policies > Access Control > Policy > Access Tools > VPN Communities > New Star Community > Tunnel Management > Permanent Tunnels section > Enable Route Injection Mechanism > Settings
|
Understanding RIM
Overview of Route Injection
Route Injection Mechanism (RIM) enables a Security Gateway to use dynamic routing protocols to propagate the encryption domain of a VPN peer Security Gateway to the internal network and then initiate back connections. When a VPN tunnel is created, RIM updates the local routing table of the Security Gateway to include the encryption domain of the VPN peer.
|
Note - Route Injection is not currently supported for IPv6.
|
RIM can only be enabled when permanent tunnels are configured for the community. Permanent tunnels are kept alive by tunnel test packets. When a Security Gateway fails to reply, the tunnel will be considered 'down.' As a result, RIM will delete the route to the failed link from the local routing table, which triggers neighboring dynamic routing enabled devices to update their routing information accordingly. This will result in a redirection of all traffic destined to travel across the VPN tunnel, to a pre-defined alternative path.
There are two possible methods to configure RIM:
- Automatic RIM - RIM automatically injects the route to the encryption domain of the peer Security Gateways.
- Custom Script - Specify tasks for RIM to perform according to specific needs.
Route injection can be integrated with MEP functionality (which route return packets back through the same MEP Security Gateway). For more information on MEP, see Multiple Entry Point VPNs.
Automatic RIM
Automatic RIM can be enabled using the GUI when the operating system on the Security Gateway is SecurePlatform, IPSO or Linux. Although a custom script can be used on these systems, no custom-written scripts are required.
In this scenario:
- Security Gateways 1 and 2 are both RIM and have a dynamic routing protocol enabled.
- R1 and R4 are enabled routers.
- When a VPN tunnel is created, RIM updates the local routing tables of Security Gateway 1 and Security Gateway 2 to include the encryption domain of the other Security Gateway.
- Should the VPN tunnel become unavailable, traffic is redirected to the leased line.
The routing tables for the Security Gateways and routers read as follows. Entries in bold represent routes injected into the Security Gateways local routing tables by RIM:
For Security Gateway 1:
Destination
|
Netmask
|
Security Gateway
|
Metric
|
0.0.0.0
|
0.0.0.0
|
172.16.10.2
|
1
|
192.168.21.0
|
255.255.255.0
|
172.16.10.2
|
1
|
192.168.11.0
|
255.255.255.0
|
192.168.10.1
|
1
|
Security Gateway 2:
Destination
|
Netmask
|
Security Gateway
|
Metric
|
0.0.0.0
|
0.0.0.0
|
172.16.20.2
|
1
|
192.168.11.0
|
255.255.255.0
|
172.16.20.2
|
1
|
192.168.21.0
|
255.255.255.0
|
192.168.20.1
|
1
|
R1 (behind Security Gateway 1):
Destination
|
Netmask
|
Security Gateway
|
Metric
|
0.0.0.0
|
0.0.0.0
|
192.168.10.2
|
1
|
192.168.21.0
|
255.255.255.0
|
192.168.10.2
|
1
|
192.168.21.0
|
255.255.255.0
|
10.10.10.2
|
2
|
R4 (behind Security Gateway 2):
Destination
|
Netmask
|
Security Gateway
|
Metric
|
0.0.0.0
|
0.0.0.0
|
192.168.20.2
|
1
|
192.168.11.0
|
255.255.255.0
|
192.168.20.2
|
1
|
192.168.11.0
|
255.255.255.0
|
10.10.10.1
|
2
|
Custom Scripts
Custom scripts can be run on any Security Gateway in the community. These scripts are executed whenever a tunnel changes its state, i.e. goes "up" or "down." Such an event, for example, can be the trigger that initiates a dial-up connection.
A script template custom_rim (with a .sh or .bat extension depending on the operating system) is provided in the $FWDIR/Scripts directory.
Sample customized script for SecurePlatform, IPSO, or Linux
#!/bin/sh
# This script is invoked each time a tunnel is configured with the RIM option
# and the tunnel changed state.
#
# You may add your custom commands to be invoked here.
# Parameters read from command line.
RIM_PEER_Security Gateway=$1
RIM_NEW_STATE=$2
RIM_HA_STATE=$3
RIM_FIRST_TIME=$4
RIM_PEER_ENC_NET=$5
case "${RIM_NEW_STATE}" in
up)
# Place your action for tunnels that came up
;;
down)
# Place your action for tunnel that went down
;;
esac
For Windows platforms, the script takes the form of a batch file:
Sample customized script for Windows
@echo off
rem . This script is invoked each time a tunnel is configured with the RIM option
rem . and the tunnel changed state.
rem .
rem . You may add your custom commands to be invoked here.
rem . Parameters read from command line.
set RIM_PEER_Security Gateway=%1
set RIM_NEW_STATE=%2
set RIM_HA_STATE=%3
set RIM_FIRST_TIME=%4
set RIM_PEER_ENC_NET=%5
goto RIM_%RIM_NEW_STATE%
:RIM_up
rem . Place your action for tunnels that came up
goto end
:RIM_down
rem . Place your action for tunnel that went down
goto end
:end
Where:
- RIM_PEER_Security Gateway: Peer Security Gateway
- RIM_NEW_STATE: Change in the state of the Security Gateway, i.e. up or down.
- RIM_HA_STATE: State of a single Security Gateway in a cluster (i.e., standby or active).
- RIM_FIRST_TIME: The script is executed separately for each network within the peer's encryption domain. Although the script might be executed multiple times on a peer, this parameter will only be transferred to the script with the value of '1' the first time the script runs on the peer. The value '1' indicates that this is the first time this script is being executed. The next time the script is executed, it is transferred with the value of '0' and the parameter is disregarded. For example, you may send an email alert to the system administrator the moment a tunnel goes down.
- RIM_PEER_ENC_NET: VPN domain of the VPN peer.
Injecting Peer Security Gateway Interfaces
You can inject the IP addresses of the peer Security Gateway into the routing tables, in addition to the networks behind the Security Gateway.
For example, after a VPN tunnel is created, RIM injects into the local routing tables of both Security Gateways, the encryption domain of the peer Security Gateway. However, when RIM enabled Security Gateways communicate with a Security Gateway that has Hide NAT enabled, the peer's interfaces need to be injected as well.
In this scenario:
- Security Gateways A and B are both RIM enabled and Security Gateway C has Hide NAT enabled on the external interface ("hiding" all the IP addresses behind it).
- Host 1, behind Security Gateway C, initiates a VPN tunnel with Host 2, through Security Gateway A.
- Router 3 holds routes to all the hosts behind Security Gateway C. Router 3 however, does not have the Hide NAT IP address of Security Gateway C and as a result, cannot properly route packets back to host 1.
This solution for routing the packets back properly is two-fold:
- In SmartConsole:
- Click .
- Click .
- Select . This injects router 3 with all of the IP addresses of Security Gateway C including the Hide NAT address.
- Click .
- Install the Access Control Policy.
- Configure the router not to propagate the information injected to other Security Gateways. If the router is not configured properly, using the previous example, could result in Security Gateway B routing traffic to Security Gateway C through Security Gateway A.
RIM - Options
For Star and Mesh communities, there are two possible ways to configure RIM:
- Enable Automatic Route Injection Mechanism - RIM automatically injects the route to the encryption domain of the peer gateways.
- Enable customer editable script execution - Specify tasks for RIM to perform according to specific needs. A script template custom_rim (with a .sh ot .bat extension depending on the operating system) is provided in the $FDIR/Scripts directory.
Tracking Options
- None - No action is taken.
- Log - The connection or loss of connection is logged.
- Popup Alert - The action specified in the Alert Commands page of the Global Properties window is taken.
- Mail Alert - The action specified in the Alert Commands page of the Global Properties window is taken.
- SNMP Trap Alert - The action specified in the Alert Commands page of the Global Properties window is taken.
- User Defined Alerts - Three different User Defined Alerts can be configured in the Alert Commands page of the Global Properties window. The action taken follows the pre-defined configuration.