 tunafish24
join:2008-12-31 95000
| Is it possible to write a telnet script to configure router?
The title is a bit vague so here are more details!
I am a computer tech and a lot of time I get called in because people need to open ports or something like that. To be honest, I don't know much about linux and it's commands but I have been programming in windows environment for several years now and I was thinking if it's possible to configure pretty much all routers through a telnet script/program.
So my question is are those telnet commands standard for different firmwares, since all the firmwares are basically linux? If the commands are same, then it would be really easy for me to write a small utility that opens/closes ports on routers. Wihtout having to physically go to the site or talk customers through various firmware UIs.
Note: I know I could allow router to be administered remotely but don't feel comfortable enabling this feature. What I'm thinking of is a program that I give to customers and when they need to open close ports or make changes like dynamic dns updates then they could just run my program, set few options and they are all set.
If the commands are different, then I would need a way to identify the router(firmware) so that I can have different commands for different routers BUT same UI for my customers. I possibly won't be able to provide support for each router but I hope that the commands are consistent across tomato, dd-wrt, open-wrt versions respectively and hopefully that would also cover my major userbase.
Also, is telnet enabled by default on most routers? |
|
 Tikker_LoS
join:2004-04-29 Regina, SK | do you mean real routers? or crappy little soho routers?
telnet is usually NOT available on most consumer brand routers, and would need to be configured on most real routers ahead of time |
|
 tunafish24
join:2008-12-31 95000 | NOT the real routers like cisco & juniper etc.
I'm talking about the ones used in homes i.e. linksys WRT54G, D-Link etc. So by default telnet/ssh is disabled on those? is there any other way to access routers programmatically? |
|
  Bill_MI Bill In Michigan Premium,MVM join:2001-01-03 Royal Oak, MI
·Comcast
4 edits | The simple answer to your question is no... each firmware would have its own way of doing things. Similar but not close to identical. That doesn't mean you couldn't learn the tricks of EVERY firmware involved and even write scripts to sense the firmware type and act accordingly. I wouldn't suggest that unless you're really desperate... but don't ask ME for help! 
All the firmware you mention HAVE a telnet or SSH interface but are DESIGNED to be web-GUI configured. Under the hood this means different things have to be edited a particular way. The GUI may change a config file or change variables in what's known as "nvram". An example is how DD-WRT uses nvram like no one else in our galaxy.
I suggest standardizing firmware or, perhaps, using remote desktop on demand. How about forming exact instructions to enable... AND DISABLE... remote management only when needed? |
|