cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
776
Views
0
Helpful
6
Replies

Custom HTML to enable an interface

Michael Durham
Level 4
Level 4

We have a need for a custom html page that we put on 2800 and 2900 series of routers where the end user goes to an IP address such as 1.1.1.2 via a web browser and the are  presented with a single button that when pressed will then enable (no shut) the DMVPN GRE Tunnel interface. That is only thing that this page needs to do and we do not even want the end user to have to enter user name or password.  We could opt for a second button that will disable (shutdown) the DMVPN GRE tunnel.  BUT NO other options.  If we have to have a specific web pager for this and it be accessed like this; 1.1.1.2/support, that would be acceptable.

 

I know a little about html and do have a web developer if needed.  But to get started, any suggestions?

 

Thank You,

Michael

 

sample.png

6 Replies 6

Hello,

 

I am honestly not sure that you can put custom HTML pages on these routers at all. That said, how about a menu ? That would accomplish the same thing...

A menu sounds interesting but..

 

This is for customers of mine that will not have anything connected to the router's console port as the router will be in a closet or such.

 

Out customer has NO Cisco knowledge.

Our customers will most likely not have telnet or ssh programs loaded onto their PC systems,  This is why I thought of a web based option.

 

From time to time a customer may need a change to the config such as changing the display name on an IP phone.  Our customer could be located anywhere so travel is not an option. Our customer will not have a public IP address on their system either.

 

We want to set up a DMVPN GRE tunnel so that we can login and make the changes as needed.  But we DO NOT want a permanent connection to our customer's equipment for security reasons etc.

 

Our end will have a static public IP and we need an easy way to our customer to enable the tunnel that will be pre-configured on their router and in the shutdown state, to no shut the tunnel from any computer connected to their network easily and with no special software.

 

Another cool idea is to be able to dial a number on their IP phone that enables the runnel interface.  But that is not easily done if it could be done at all

Francesco Molino
VIP Alumni
VIP Alumni
Hi,

Do you have any skills in python? You can call a python script from your html page to shutdown or not shutdown your dmvpn tunnels.
Also, you can use snmp to trigger some config changes like some tools out there are doing.

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

Hello,

 

another option would be to put the HTML file on a server, make it accessible to your users, and the just configure batch .bat files to be executed when clicking buttons.

I am so close:

 

Got a custom support page to work:

test.png

<HTML>
<HEAD>
<TITLE>Custom Support Page</TITLE>
</HEAD>
<BODY>
<H1>Custom Support Page</H1>
<PRE>
<A HREF=/level/15/interface/Tunnel1/-/no/shut/CR>Tuurn on Support Tunnel</A>
<P>
<A HREF=/level/15/interface/Tunnel1/-/shut/CR>Tuurn off Support Tunnel</A>
</PRE>
</BODY>
</HTML>

 

url: http://192.168.69.243/level/15/interface/Tunnel1/-/no/shut/CR

gives me the following result and from what you see, you would think that it issued the no shut command. But looking on the router, the tunnel is still in the shutdown state.

test1.png

Code for the above page:

<HTML><HEAD><TITLE>Test_System /level/15/interface/Tunnel1/-/no/shut/CR</TITLE></HEAD>
<BODY><H1>Test_System</H1><PRE>
<A HREF=/level/15>Home</A>	<A HREF=/level/15/exec/->Exec</A>	<A HREF=/level/15/exec/-/configure/http>Configure</A>
<HR>
<FORM METHOD=POST ACTION="/level/15/interface/Tunnel1/-/no/shut/CR">
<DT><INPUT TYPE=SUBMIT NAME=CMD VALUE=Command><INPUT TYPE=TEXT NAME=command SIZE=60 VALUE="">
<INPUT TYPE=HIDDEN NAME=command_url VALUE="/level/15/interface/Tunnel1/-">
<H4>Output</H4><H5>Command base-URL was: /level/15/interface/Tunnel1/-
Complete URL was:/level/15/interface/Tunnel1/-/no/shut/CR 
Command was: no shut </H5><PRE><HR><INPUT TYPE=HIDDEN NAME=hidden_command VALUE="no shut "><INPUT TYPE=HIDDEN NAME=csrf_token VALUE="6A3ACC4D9DEDDB8324849B501084B322605FA95F"><DL>
<DT><INPUT TYPE=SUBMIT NAME=CMD VALUE=CR><DD>
</DL><HR><PRE>command completed.
</FORM></DL><HR>
</PRE></BODY></HTML>

 

BUT... if I click the CR box, it DOES issue the command no shut and the tunnel is now in the no shutdown state.

test2.png

And the same goes for the shutdown link. 

 

I need to get the final CR automatically issued so my customers do not get lost.

We are 95% there.

 

 

"/level/15/interface/Tunnel1/-/no/shut/CR"

No real experience with this, but

what comes in mind is: this is a two line command, you're sure no /CR needed after selecting the interface?

 

could be a different behavior of the users browser ? (check if same version?)

 

Review Cisco Networking products for a $25 gift card