On 10/5/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
Hi all,
I have been having trouble getting an automated script to backup the pfSense
configuration file. I have installed my own certificate and told curl where
to look for it. It verifies the certificate ok but gets an error
"Expectation Failed". Anyone have any idea what I am doing wrong? The
same script / command line is working fine for a seperate m0n0wall...
[admin] # curl --cacert <pfSense>.cert -v -s -o <pfSense>-config.xml -F
Submit=download -u 'admin:<password>'
https://<pfSense>/diag_backup.php
* About to connect() to <pfSense> port 443
* <pfSense IP>... * connected
* Connected to <pfSense> (<pfSense IP>) port 443
* successfully set certificate verify locations:
* CAfile: <pfSense>.cert
CApath: none
* SSL connection using AES256-SHA
* Server certificate:
[...]
* SSL certificate verify ok.
* Server auth using Basic with user 'admin'
> POST /diag_backup.php HTTP/1.1
Authorization: Basic [...]
User-Agent: curl/7.13.1 (i386-redhat-linux-gnu) libcurl/7.13.1
OpenSSL/0.9.7f zlib/1.2.2.2 libidn/0.5.15
Host: <pfSense>
Pragma: no-cache
Accept: */*
Content-Length: 149
Expect: 100-continue
Content-Type: multipart/form-data;
boundary=----------------------------2865c75fe169
< HTTP/1.1 417 Expectation Failed
< Connection: close
< Content-Length: 0
< Date: Thu, 05 Oct 2006 22:35:21 GMT
< Server: lighttpd/1.4.11
* Closing connection #0
While I am not too sure about CURL, I do know that this wget command works:
wget -qO /tmp/aliases_backup.xml --post-data
'Submit=Download&backuparea=aliases' --user=admin --password=pfsense
--no-check-certificate "https://192.168.1.1/diag_backup.php"
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]