RouterConfigs not working

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
willdej
Posts: 19
Joined: Thu Sep 03, 2009 12:41 pm

RouterConfigs not working

Post by willdej »

I have Routerconfigs installed and setup I believe correct but when I try and run a manual backup I get
�� �� �� ��¬ User Access Verification Username: �� �� ����'�� wildej Password: SW1_Core_BL#
Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/plugins/routerconfigs/functions.php:704) in /var/www/cacti/plugins/routerconfigs/router-devices.php on line 274


It also does not download anything on a daily basic.
I have 0.8.7g running on debian and Routerconfig 0.3
sharekhan
Cacti User
Posts: 57
Joined: Mon Apr 04, 2011 10:47 am

Re: RouterConfigs not working

Post by sharekhan »

Hi dear ,

pls help ,

i have configure the router in ssh for security point.
due to ssh i unable to take backup in cacti , i am using ver 1 of routerconfigs its support telnet only .

can u pls help for Routeurs Config with ssh support

it will great

thanks & regards
lalit
sharekhan
Cacti User
Posts: 57
Joined: Mon Apr 04, 2011 10:47 am

Re: RouterConfigs not working

Post by sharekhan »

Hi dear ,

pls help ,

i have configure the router in ssh for security point.
due to ssh i unable to take backup in cacti , i am using ver 1 of routerconfigs its support telnet only .

can u pls help for Routeurs Config with ssh support

it will great

thanks & regards
lalit
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: RouterConfigs not working

Post by noname »

sharekhan wrote:i have configure the router in ssh for security point.
due to ssh i unable to take backup in cacti , i am using ver 1 of routerconfigs its support telnet only .
How about "SSH port forwarding"?
ex.) # ssh -L 23:Router:22 Router

Code: Select all

 Server                                            Router
+---------------------------+                     +-------+
|                           |                     |       |
| +-------+           +-----+                     |       |
| | Cacti |-------->23| SSH |==================>22|       |
| +-------+ telnet    +-----+  SSH connection     |       |
|                           |                     |       |
+---------------------------+                     +-------+
If RouterConfigs accessed to the Server itself (=localhost) by using telnet,
then requests will be forwarded the Router via SSH connection.
sharekhan
Cacti User
Posts: 57
Joined: Mon Apr 04, 2011 10:47 am

Re: RouterConfigs not working

Post by sharekhan »

thank u sir for the replay

sorry i unable to do it . i didnt found the ssh port forwarding work in cacti server.

can you pls explain me in brief , were this command ssh -L 23:Router:22 Router work and how .

does any changes required in router

Thank & regards
lalit
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: RouterConfigs not working

Post by noname »

Please test as follows on Cacti server. Perhaps like this (but not confirmed):

1) Make connection via SSH to router
# ssh -L 23:192.168.1.1:22 192.168.1.1
(for example, your router's IP address is 192.168.1.1)

If you logged in successfully, then open another terminal and perform this.
If failed, you can't login by SSH to router for some reason...

2) Connect with telnet (not SSH) to router via SSH tunnel
# telnet localhost 23

Access for local port 23 will be forwarded to port 22 of remote host (=router).
Configure RouterConfigs to be accessing localhost.

But I think that upgrading your RouterConfigs makes faster than this way...
sharekhan
Cacti User
Posts: 57
Joined: Mon Apr 04, 2011 10:47 am

Re: RouterConfigs not working

Post by sharekhan »

HI ,

Sorry it not work .

Can you pls provide me a routerconfig v2 .

feature: Allow the use of enable passwords

feature: Add support for SSH Connections (thanks to Abdul Pallarés)

Initial Release

Nightly Backups

View Config of any backup

Compare Configs

Automatically update Hostname from config file
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: RouterConfigs not working

Post by noname »

As far as I looked plugin source, latest (v0.3-1) routerconfigs also has a feature for SSH connection.
(Sorry, I've not used this with ssh ever)

Please make sure whether if your PHP supports SSH2.
http://www.php.net/manual/en/book.ssh2.php

In brief, test as follows:

Code: Select all

% php -r 'echo (function_exists("ssh2_auth_password") ? "TRUE" : "FALSE");'
If PHP can use ssh, this plugin will work as follows (maybe):
1) first, routerconfigs will try ssh to target router
2) if failed, then telnet to same router
sharekhan
Cacti User
Posts: 57
Joined: Mon Apr 04, 2011 10:47 am

Re: RouterConfigs not working

Post by sharekhan »

Thank u i will try and will revert on same .

One more thing need to ask .

In cacti i want multicast graph option for Router and Switch

can you pls help on this.

Or any other option through that i will get Multicast graph

Thank & regards
lalit
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: RouterConfigs not working

Post by noname »

sharekhan wrote:In cacti i want multicast graph option for Router and Switch
Or any other option through that i will get Multicast graph
Please hope for someone else to answer that topic..
rhinestone
Posts: 1
Joined: Sat Apr 23, 2011 10:45 am

Re: RouterConfigs not working

Post by rhinestone »

noname wrote:As far as I looked plugin source, latest (v0.3-1) routerconfigs also has a feature for SSH connection.
(Sorry, I've not used this with ssh ever)

Please make sure whether if your PHP supports SSH2.
http://www.php.net/manual/en/book.ssh2.php

In brief, test as follows:

Code: Select all

% php -r 'echo (function_exists("ssh2_auth_password") ? "TRUE" : "FALSE");'
If PHP can use ssh, this plugin will work as follows (maybe):
1) first, routerconfigs will try ssh to target router
2) if failed, then telnet to same router
Maybe Cacti could be rewritten to support phpseclib, a pure PHP SSH implementation (phpseclib.sourceforge.net)? It's a ton more portable than SSH2 functionality requiring libssh2 since it has no dependencies and it's actually faster too:

http://kevin.vanzonneveld.net/techblog/ ... mment_3759

phpseclib also has a superior API. Private keys have to be saved on the filesystem to be loaded whereas with phpseclib all they need be is strings. You can take a key from $_POST without having to dump it to the filesystem as libssh2 requires. To top it off, libssh2 requires you have a separate file for the publickey, which is brain dead, since the private key *contains* the public key.

ssh2_exec(), from libssh2, also returns ANSI color codes and sometimes never returns output and sometimes does (it's inconsistent).
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest