[rancid] Re: Using RANCID with an SSH tunnel
Chris Gauthier
cgauthie at pcc.edu
Tue Jan 22 22:35:21 UTC 2008
I'm not sure how well using Perl to set up your ssh tunnel then execute
rancid would work. I think you might do better if you wrote an expect
script or some form of a shell script that then called rancid. I am not
a programmer by trade, so I m certainly not the most expert person here,
but those are my opinion of how you might be more efficient. Btw,
rancid is written using the Perl and Expect languages.
Chris
John Phelps wrote:
> Hello,
>
> I am trying to find a way to retrieve a config from a router that is on a network that our RANCID box does not have a route to. Unfortunately, in this situation, I can't add a route to allow the networks to talk to each other. The only way that the 2 networks have access to each other is through a dual-homed server that has a NIC on each network. Below is a simple diagram of the network:
>
> RANCID server--------------------Dual-homed server-----------------------Router
> 10.0.0.1 10.0.0.2 192.168.0.2 192.168.0.1
>
> Both servers in question are running RHEL. Now I am no Linux expert, but I have been playing around with SSH port forwarding and I am thinking the best way to accomplish this is to create a shell script to open a tunnel to the 192.168.0.0 network before the RANCID job executes. A coworker suggested creating a perl script that RANCID would call to open the tunnel then grab the config, but I am not familiar with perl and having trouble finding examples of how to integrate a perl script into RANCID.
>
> If anyone has a better idea of how to pull this off or can point me towards examples of perl scripts for RANCID I'd appreciate it!
>
> Thanks,
>
>
--
Chris Gauthier, CCNA, Network+, A+
Network Administration Team
Portland Community College
Portland, Oregon
"For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return."
--Leonardo da Vinci
More information about the Rancid-discuss
mailing list