Using Curl - Colubris Networks CN3000 Administrator's Manual

Table of Contents

Advertisement

Chapter 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - How it works - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Chapter 2

Using cURL

It is possible to automate management tasks using a tool like cURL. cURL is a software
client that can be used to get/send files to/from a server using a number of different
protocols.
cURL is designed to work without user interaction or any kind of interactivity. It is
available for Windows and LINUX at: http://curl.haxx.se/. You must use version 7.9.8 or
higher.
The following cURL commands illustrate how to manage the configuration file. The
following setup is assumed:
• IP address of the CN3000's Internet port is 24.28.15.22.
• Management access to the Internet port is enabled.
• Configuration file is located in CN3000.CFG.
These examples are non-secure (no certificates are used authentication), but data
traffic is still encrypted.
Note: If you want to secure the connection with the CN3000 using certificates, you must
use the --cacert option to specify where the CA certificates are located on your
computer. This also requires that you specify the host name wireless.colubris.com
instead of using its IP address. The host name must be resolved either via a DNS server
or using the hosts file on your computer.
Uploading the configuration file
1. Prepare the CN3000 to receive the login.
curl -s -k "https://24.28.15.22/home.asp"
2. Login to the management interface.
curl -s -k --dump-header cookie.txt "https://24.28.15.22/goform/Logout"
-d username=admin -d pw=admin
3. Prepare the CN3000 to receive the configuration update.
curl
4. Upload the configuration file.
curl
24.28.15.22/goform/ScriptUploadConfig"
5. Reset the CN3000 to activate the new configuration.
curl
Downloading the configuration file
1. Prepare the CN3000 to receive the login.
curl -s -k "https://24.28.15.22/home.asp"
2. Login to the management interface.
curl -s -k --dump-header cookie.txt "https://24.28.15.22/goform/Logout"
-d username=admin -d pw=admin
3. Prepare the configuration file for download.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 58 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-s -k
--cookie cookie.txt "https://24.28.15.22/script/config_init.asp"
-s -k
--cookie cookie.txt -F config=@CN3000.cfg -F backup=Restore "https://
-s -k
--cookie cookie.txt "https://24.28.15.22/script/reset.asp"

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents