473,325 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

PHP Telnet connection from a router to another router

Hi,

I have implemented a php script by which i can login to a router using fsockopen(), and i can run any cisco commands.

But i have requiremnt login to a remote from from a central router for the out of band management.

How can make a script by whch i can login to another cisco router (telnet) from an already logged in router.

my script has a class and functions.

Thanks
Dec 16 '09 #1
2 4545
dlite922
1,584 Expert 1GB
Besides the down right frightening aspect of controlling your router through a (yet to be determined unsecure) php application, there is no way to do this in PHP. It's nothing that PHP should do, just physically speaking: when you log into that first router, you interact with /it/ and only it through PHP.

That router can have other commands that may allow PHP to call the second router, but this not likely.

I'm no networking expect, but can't you allow the traffic for the second router connection go through the first one. i.e. opening ports, defining routes?

My 0.02,



Dan
Dec 16 '09 #2
Thanks for ur reply

To pass a command to router, php requires a connection variable ($this->_connection = @fsockopen($this->_hostname, 23, $errno, $errstr, $this->_timeout), I can connect to second router by using telnet command from first router and reaches up to the login prompt of second router. Now how do I use connection variable to pass commands to second router, if i use @fsockopen for second router, the source of connection is my webserver it is not sourcing from first router.
I just need to know is there any way to make @fsockopen source as a specified connection variable which is already exists rather than web server.

Thank u
Dec 17 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Richard Bird CCNP, CCDP, MCSE, etc. | last post by:
I need some help adding multithreading to an existing python script. The script was developed to telnet and make changes on a list of cisco routers. I figure that by adding multithreading, I'd be...
4
by: Fuzzyman | last post by:
In a nutshell - the question I'm asking is, how do I make a socket conenction go via a proxy server ? All our internet traffic has to go through a proxy-server at location 'dav-serv:8080' and I...
2
by: john brown | last post by:
I'm telnetting into a router. Apart from the fact I can't seem to view the output when iniciating the session, I can't match one of the expressions using Net::Telnet. I can telnet into the router...
2
by: Mahesh Devjibhai Dhola | last post by:
Hi, I want to develop p2p (peer-to-peer) communication connection for chat in ..Net (Lang: c# - preferable) NOTE: if two LAN are behind their own router then also it should work as yahoo, msn...
2
by: _andrea.l | last post by:
I'm writing a little script for reading information from a router by telnet. I have a problem How give a comand and get the answer more times? I means: $usenet = fsockopen($cfgServer,...
2
by: vmalhotra | last post by:
Hi I am new in python scripting. I want to open a Multiple telnet session through once script. In other way i can tell i want to open two linux consoles through one script. I wrote one...
3
by: svjames | last post by:
Hey guys, im working on a project that requires a telnet connection to be made from a web page to a router, auto login then quit/drop whatever, its just gotta run one and in the background. my...
17
by: John Salerno | last post by:
Let me see if this question even makes sense...I'm reading Core Python Programming and I jumped ahead to the more specific topics like network programming. I plan to follow along with the example...
17
by: ravimath | last post by:
Dear all, I have written following script to loin to router bu it is showing error. #!c:\Perl\bin; use strict; use warnings; my $hostname = 'REMOVED FOR YOUR PROTECTION'; my $password =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.