For Administrators
Server Settings topics are documented under Server Settings, including:
-
Properties
-
Keys
-
Networks
-
Alerts
-
Proxies
-
Related portal menus
Application proxy topics:
This page covers:
-
Version and license
-
Support operations
-
SQL-based integration
-
Hardening
-
WireGuard packet checks
-
MSQL notes
-
Logging and misc
-
Backup and restore
-
Docker upgrades
Mamori Version & License
To view the server version and manage the Mamori license
Click > Help
Click > Mamori License
Support
Raising a support issue
Freemium users can contact support by sending an email to support@mamori.io
Paying customers can click here to raise a ticket
In your email please included:
- Description of what were trying to achieve when you go the error.
- Screenshot of error
- Support bundle (If the file is over 10MB please provide a link to download the file. Do not attach it)
Creating a bundle
To generate a support bundle, follow the instructions below.
Click > Help
For all-in-one deployments
Click > Download Support Bundle
For HA deployments
Click Cluster Nodes and then download on the the node
Extracting a session
Sometimes support will need you to extract the contents of a session to help resolve an issue. This can be done by:
Navigate to Logs > Connection Log
Find the session that has the issue and click on the row menu
Click Extract Session
Reseting MFA requests
All cached MFA requests can be managed from the MFA request log grid
Navigate to Logs > MFA Requests
You can remove a particular cached MFA request by clicking delete on the request row.
You can remove all the cached MFA requests for a user from the user grid row menu.
Checking HA cluster status
Click > Help > Cluster Nodes
Sharing Grafana Dashboards
Grafana is a well documented open source application. Their documentation has instructions on how to share dashboards between grafana servers via the export/import functions. See their documentation to learn more. https://grafana.com/docs/grafana/latest/dashboards/share-dashboards-panels/
SQL-Based Integration
To interact and integrate with Mamori via SQL instead of API requests you need to:
-
Download and install the Mamori ODBC driver (32-bit or 64-bit) or JDBC driver (64-bit)
-
Connect any database tool to the mamori database
Downloading the driver
Go to the Mamori server login page and do not login
Click on "download drivers"
Select your driver and download it
Unzip the media and install
Windows ODBC
Run the driver MSI installer
Launch windows ODBC Data Source Administrator
Add a DSN
Select the Mamori Driver (Mamori 64)
Enter the following in the DSN Dialog
Field Default Value Description Datasource Name Enter the DSN name Server Host Name or IP Enter the IP address of the Mamori server Server Port 1527 Remote System Mamori The datasource to connect to Datasource Name Enter the DSN name Credentials Enter a Mamori login username and password Click OK
JDBC
Open the driver manager of your SQL tool & Add a driver
Add the mamori jar file
Classpath is io.mamori.jdbc.security.Driver
Connection String
connection stringjdbc:mamori://YOURMAMORISERVER:1527/mamori;schemapattern=true
Basic Server Hardening
The steps below are only a basic hardening guide. Please check the current hardening guide for your OS.
Secure Shared Memory
#Open the file for editing by issuing the command:
sudo vi /etc/fstab
#Add the following line to the bottom of that file:
tmpfs /run/shm tmpfs defaults,noexec,nosuid 0 0
Secure logins
Set server to only accept key based logins. Enable SSH Logins to only allow specified IP address sources
sudo vi /etc/ssh/sshd_config
#only allow ssh for your desired IP addresses
AllowUsers *@192.168.1.*
#disable password logins
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
PermitRootLogin prohibit-password
Reboot the server for changes to take effect
Install Fail2Ban
If your server is publicly accessible, then install fail2Ban
Wireguard
Verify Packets
Check if Wireguard packets are being forwarded to Mamori server
tcpdump -i any -n -x udp port 51871
MSQL SYNTAX
Mamori SQL (MSQL) allows you run SQL like syntax to configure your mamori server. MSQL can be run in the mamori console editor or via the msql utility that deploys with the server.
TEMPLATE
Below is an excel template that will generate MSQL for creating common resources
Date Functions
select dateadd(second, -36000, current_timestamp), current_utc_timestamp, current_timestamp from sys.dual
Background tasks & Pools
call BACKGROUND_TASKS();
call CONNECTION_POOLS();
LOGGING
#To generated detailed detailed statement pool metrics
#define LOG_STATEMENT_POOL_METRICS in /opt/mamori/var/mamori_env.local
MISC
#Get the attribute and values for an RDP definition
call GET_REMOTE_DESKTOP_CONNECTION_DETAILS('RDP NAME');
#Update the RDP properties that are passed in
call UPDATE_REMOTE_DESKTOP_ATTRIBUTES('RDP NAME', '{"enable_font_smoothing": true,"enable_wallpaper":true,"enable_theming":true}');
#To export a session
call EXPORT_SESSION_DETAILS('{AZBsPs6wdhnU6ymHMmulEA}')
#To send a notification to a mobile device
call create_user_notification('pushtestuser', 'pushmessage', 'this is a test');
#To Install certificates
Usage: msql install-cert [OPTIONS] --certificate <CERTIFICATE>
Options:
--certificate <CERTIFICATE> a file containing the PEM encoded certificate
--key <KEY> a file containing the PEM encoded private key
-h, --help Print help
#Benchmark Data Read Performances
#/opt/mamori/mamori/bin/msql
./msql --host MAMORISERVER --username user benchmark rms.db.schema.table
Backup And Restore
All-In-One Install
Use the scripts in the mamori-server-scripts repository:
-
media/backup-aio.sh -
media/restore-aio.sh
To back up and restore onto a new Mamori server:
On the source Mamori server, run the backup script
Transfer the backup directory to the target. The target must have Docker installed; Mamori must not be installed yet.
On the target, run restore using either:
restore.shinside the backup directoryrestore-aio.shfrom the scripts repositoryRun the Mamori all-in-one install on the target
Source host — create backup
cd /path/to/mamori-server-scripts/media
bash backup-aio.sh
# optional: bash backup-aio.sh --output /path/to/mamori-backups
This stops the mamori container briefly, then:
-
Archives named volumes whose names start with
mamori -
Saves the
mamori-alpine-boringtunhelper image -
Writes
volumes.tsvand a generatedrestore.sh -
Starts
mamoriagain
Target host — restore, then install
# Inside the transferred backup directory:
bash restore.sh
# Or from the scripts repo:
bash /path/to/mamori-server-scripts/media/restore-aio.sh --backup /path/to/mamori-backups
# Then install Mamori (example: file-based install)
cd /path/to/mamori-server-scripts/media
bash install-file.sh
DOCKER=docker if you do not use sudo docker. The container name defaults to mamori (CONTAINER_NAME).
Update PG MAX Connections
All-In-One Install
1 - Enter docker
2 - Update /opt/mamori/var/mamori_env.local to change the value of POSTGRES_MAX_CONNECTIONS
3 - Exit the docker
4 - restart the docker container
Upgrading Docker
Docker does not have a specific upgrade command. To upgrade Docker, you need to remove the old version and install the new one. This process will not impact your data as Docker volumes and containers are preserved.
To upgrade Docker, run the following script:
#!/bin/bash
# Remove old Docker versions
sudo apt remove docker docker-engine docker.io containerd runc
# Update package index
sudo apt update
# Install prerequisites
sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release
# Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
# Add Docker repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Update package index again
sudo apt update
# Install Docker Engine
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Verify installation
docker --version





