Click to See Complete Forum and Search --> : router communication


garskoci
12-23-2004, 06:26 PM
Hello all!

I was wondering if anyone has been able to communicate with a router through a script or program.

I have a Netgear router that I want to make port configuration changes on the fly. It does have remote management capabilities.

I don't know much about Lynx, is it possible to write a bash or Perl script to interact with Lynx or directly with my router? Any suggestions would be appreciated.

Thanks.

soulestream
12-23-2004, 10:50 PM
i dont think you are going to be able to do that. the problem is most routers only use webmin. so logging in with a script would be improbable. a cisco router can be loggedin via telnet and can be programmed via text. but i dont think you can use a script for that either. Linksys has a model that can be flashed with a "linux" distro for programming. that might be an option. what kind of "changes" do you need to make on the fly?



soule

garskoci
12-24-2004, 10:55 PM
I wanted to open and close ports as I need them. I hate to leave unused ports open for the free world. I'll take a look at Linksys.

Thanks.

soulestream
12-25-2004, 12:48 AM
your other option might be....


setup an old/extra pc with smoothwall.
hook your router to that.
open the ports you use on your router.
then use scripts/ssh to open and close ports in your smoothwall firewall.



just an idea


soule

flukshun
12-26-2004, 08:03 PM
there's a perl package available that'll allow you to automate website navigation/form submission, with a little bit of creative logic it shouldn't be too difficult to get it to open and close ports and etc.

check it out at cpan.org:
WWW::Mechanize

garskoci
12-27-2004, 01:45 AM
The smoothwall looks like a pretty good option and it will work, but I'll take a look at the cpan mod. If I get that to work, I'll post it. Thanks guys.