CPUG

The Check Point User Group

A Resource For The Check Point Community.  Fast.  Useful.  Independent.

1. CCSA/CCSE One-Week Dual-Certification Training Course with CPUG in San Francisco!
    Courses Starting (2009) 1/19, 2/9, 3/9, 4/6, 5/4, 6/8, 7/6, 8/3.
2. Join Us On LinkedIn - We now have a CPUG group.


Go Back   CPUG: The Check Point User Group > Check Point Firewall-1/VPN-1 Platforms > Check Point SecurePlatform (SPLAT)
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2007-08-21
Member
 
Join Date: 2006-02-05
Posts: 74
Rep Power: 3
jmcgrady has an average reputation (10+)
Default How to script route changes

I'm running splat R60 HFA4. Can someone tell me the official way of adding new permanent routes via a script? The management gui is well and good for small changes. But bulk changes would be much easier using a script.
Reply With Quote
  #2 (permalink)  
Old 2007-08-22
Senior Member
 
Join Date: 2006-01-25
Posts: 1,005
Rep Power: 4
melipla has an average reputation (10+)
Default Re: How to script route changes

I don't know if there's an "official" way to do it in linux [aka SPLAT], but you can add them to the bottom of the /etc/rc.local file--that will add them during boot.

HTH
Reply With Quote
  #3 (permalink)  
Old 2007-08-23
Senior Member
 
Join Date: 2006-01-26
Location: Moscow, Russia
Posts: 706
Rep Power: 3
kva.kva has an average reputation (10+)
Default Re: How to script route changes

I have looked through script /bin/sysconfig_start and found command save_route in it, you can try the command.
Reply With Quote
  #4 (permalink)  
Old 2007-08-24
Senior Member
 
Join Date: 2006-04-30
Location: Europe, Germany
Posts: 159
Rep Power: 3
dsb.nepo has an average reputation (10+)
Default Re: How to script route changes

take a look here, that is my way to document/backup/recreate routes via script

Copying static routes from R55 to R62

the same is possible for ip configuration (ifconfig --save)
Reply With Quote
  #5 (permalink)  
Old 2007-08-24
Senior Member
 
Join Date: 2007-07-16
Posts: 693
Rep Power: 2
Thorpuse has an average reputation (10+)
Default Re: How to script route changes

Quote:
Originally Posted by melipla View Post
I don't know if there's an "official" way to do it in linux [aka SPLAT], but you can add them to the bottom of the /etc/rc.local file--that will add them during boot.

HTH

Don't do this - if you do this, you run the risk of losing those routes in a situation where the interface is downed and brought back up.

The routes are configured in a file called netconf.C. You can manually copy/edit this file, although it is not recommended. CP, can you please add a bulk route add command to the WebUI or sysconfig?
Reply With Quote
  #6 (permalink)  
Old 2007-08-25
Senior Member
 
Join Date: 2006-04-30
Location: Europe, Germany
Posts: 159
Rep Power: 3
dsb.nepo has an average reputation (10+)
Default Re: How to script route changes

Quote:
CP, can you please add a bulk route add command to the WebUI or sysconfig?
Use the supported commands, in expert mode.
ifconfig --save write the interface configuration into netconf.C
route --save write the routing table into netconf.C

To bulk edit/add interfaces/routes use at the command line.
Code:
ifconfig eth1 inet 10.1.0.2 netmask 255.255.255.0 broadcast 10.1.0.255
ifconfig eth2 inet 10.2.0.2 netmask 255.255.255.0 broadcast 10.2.0.255
ifconfig --save

route add -net 10.1.1.0 gw 10.1.0.1 netmask 255.255.255.0
route add -net 10.1.2.0 gw 10.1.0.1 netmask 255.255.255.0
route add -net 10.2.1.0 gw 10.2.0.1 netmask 255.255.255.0
route add -net 10.2.3.0 gw 10.2.0.1 netmask 255.255.255.0
route --save
I use the attached script to document/backup my routing table at splat.

See this Thread
Copying static routes from R55 to R62
Attached Files
File Type: txt routing_dump_to_file.sh.txt (1.2 KB, 128 views)
Reply With Quote
  #7 (permalink)  
Old 2007-08-29
Senior Member
 
Join Date: 2007-07-16
Posts: 693
Rep Power: 2
Thorpuse has an average reputation (10+)
Default Re: How to script route changes

Great tip! thanks for that!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -7. The time now is 10:59.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0