Client - server encryption
Submitted by Stef on Fri, 25/08/2023 - 14:44
Attachment | Size |
---|---|
![]() | 1.81 KB |
![]() | 2 KB |
It's possible to encrypt the communication between the clients and the server by using xymoncgimsg.cgi on a apache webserver with https.
Server: password protected xymoncgimsg.cgi
I have the xymon server software installed in /home/users/xymon/server
- Create a new directory
/home/users/xymon/server/cgi-binpas/
- Copy
xymoncgimsg.cgi
in/home/users/xymon/server/cgi-binpas/
- Add this to apache config file:
ScriptAlias /xymon-cgipas/ "/home/users/xymon/server/cgi-binpas/"
<Directory "/home/users/xymon/server/cgi-binpas">
Options ExecCGI Includes FollowSymLinks
AuthType Basic
AuthName "Monitoring Client'
AuthUserFile "/home/users/xymon/server/etc/htpasswd"
Require valid-user
</Directory>
- Create
/home/users/xymon/server/etc/htpasswd
withhtpasswd
and add a user namedclient
with paswoordclient
Unix Client
Wget
The attached file xymon-wget.sh
can be used as a drop-in replacement for the xymon command.
Create a config file wget-config in the etc directory of the client with following content:
user=client
password=client
header=Content-type: application/octet-stream
header=Mime-version: 1.0
connect-timeout=10
tries=1
auth_no_challenge=off
check_certificate=off
Curl
The attached file
xymon-wget.sh
can be used as a drop-in replacement for the xymon command.Create a config file curl-config in the etc directory of the client with the following content:
user = client:client
Header = "Content-type: application/octet-stream"
Header = "Mime-version: 1.0"
connect-timeout = 10
silent
insecure
Windows client
For Windows is the https support embedded in the Powershell client.
Example config file:
<XymonSettings>
<serverUrl>https://xymonserver/xymon-cgipas/xymoncgimsg.cgi</serverUrl>
<serverHttpUsername>client</serverHttpUsername>
<serverHttpPassword>client</serverHttpPassword>
<clientlogfile>c:\program files\Xymon\xymonclient.log</clientlogfile>
<clientconfigfile>c:\program files\Xymon\clientconfig.cfg</clientconfigfile>
<clientfqdn>0</clientfqdn>
<clientlower>1</clientlower>
<clientremotecfgexec>1</clientremotecfgexec>
</XymonSettings>