When we add static route from Sourcefire CLI, chances are they may disappear when we reboot the SFR module. There is another way, we can add static routes permanently.
Steps to Add Static Routes:
Step 1: Login to the Command Line Interface (CLI) of the appliance.
Step 2: Access the network-device directory as root user.
--> sudo su – (become root)
--> cd /etc/sysconfig/network-devices
Step 3: Execute the following command to create the necessary configuration file:
touch ifcfg-static-routes ( in case ifcfg-static-routes is missing inside network-devices directory)
Step 4: Execute the following command to add a static route:
echo '<device> <type> <network> <subnet_prefix> <gateway>'
>> /etc/sysconfig/network-devices/ifcfg-static-routes
Step 5: Execute the following command to load the new static routes:
/etc/rc.d/init.d/routes restart
-------------------------------------------------------------------------------------------------------
Eg: echo 'eth0 ipv4 10.10.10.0 255.255.255.0 10.10.10.1’ >> /etc/sysconfig/network-devices/ifcfg-static-routes