1

I'm looking for ways, methods or workarounds to:

Change firewall rules (WAN/LAN accept-deny) of a Router from networking, through Linux command or PHP script, can be a socket, or rest service, soap service or something like. Or telnet, or something like.

Maybe there is some firmware to replace the default system of the router with something that provides a web service or something like? (Cisco RV042)

2

My understanding is that this line of Cisco routers is only configurable from the web browser; although it supports SNMP the MIB seems pretty restricted.

You could therefore consider automated web configuration, such as via Selenium, originally designed for automated web site testing.

In essence you write a script (in Python or many other languages including PHP) which drives the web browser: get a page, find page element, type something, click on something. Have a look at the examples at https://www.seleniumhq.org/docs/03_webdriver.jsp#introducing-the-selenium-webdriver-api-by-example

Alternatively, of course, buy another router, perhaps in addition, which is configurable with remotely, such as any of Cisco's IOS routers. Then you can script it in any number of ways, including ssh remote commands or web loading.

  • Thanks. Yes, I was thinking about gatling in order to get the info and use scala to run it, but I thinks is more secure change the router in these circunstances. What requirements must I looking for? ssh remote commands? telnet? – MacGyver Aug 16 '18 at 15:49
  • 1
    All of Cisco's main IOS routers allow ssh, which is sufficient for what you are describing, and you can then script with anything of your choice, though I'd suggest being very conservative about scripting languages for controlling your routers. It's a big topic, ask more specific questions if you need to. – jonathanjo Aug 16 '18 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.