Tuesday 11 July 2023

IOS - NETWORK MANAGEMENT - IOS HTTP SERVER

USE FOR  IOS HTTP SERVER FEATURE 


SCENARIO:

In your company one day the webserver crashes and you don't have any spare equipment lying around. Since the website only has HTML images you decide to configure one of your spare routers as a HTTP server.



PROCESS:

STEP 1 - Configure router HTTP as a HTTP server and make it serve files from the flash.

HTTP#dir flash:

Directory of flash:/


    1  -rw-         979                    <no date>  http-confg


7864316 bytes total (7863272 bytes free)


Configure router HTTP so it only allows HTTP connections from port 5001 and the 192.168.12.0/24 network. There should be a maximum of 5 connections.

HTTP#sh run | i http

ip http server

ip http port 5001

ip http access-class 1

ip http authentication local

no ip http secure-server

ip http path flash:

access-list 1 permit 192.168.12.0 0.0.0.255


Configure router HTTP so users have to authenticate to access the webserver. Use the username "HTTP" and password "SAFE".

username HTTP privilege 15 password 0 SAFE

Now Configure Client Router to user the same username and password for HTTP as client 

ip http client username HTTP

ip http client password 0 SAFE

Test your configuration by transfering a file stored on router HTTP to router CLIENT.

Below will copy to Null: filesystem 

Client#copy http://192.168.12.2:5001/http-confg null:
Loading http://192.168.12.2:5001/http-confg !
979 bytes copied in 0.096 secs (10198 bytes/sec)


Copy to Flash:

Client#copy http://192.168.12.2:5001/http-confg flash:
Destination filename [http-confg]?
Erase flash: before copying? [confirm]
Erasing the flash filesystem will remove all files! Continue? [confirm]
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
Erase of flash: complete
Loading http://192.168.12.2:5001/http-confg !
Verifying checksum...  OK (0x102)
979 bytes copied in 0.100 secs (9790 bytes/sec)
Client#


Client#dir flash:
Directory of flash:/

    1  -rw-         979                    <no date>  http-confg

7864316 bytes total (7863272 bytes free)
Client#




Think - where you can use this and get benefit for this feature :)



No comments:

Post a Comment