Page 1 of 1

Secure Connections with a Windows FMF Client

Posted: 10 April 2015, 21:40
How to set up secure connection between the FreeMedForms server and its clients

If you choose to use FreeMedForms in network installation mode, be aware that connections between FreeMedForms client and MySQL server have to be secured. You indeed work with sensitive medical data.

The standard configuration of MySQL server does not use encrypted connections.

This default configuration is the same as for FreeMedForms client. And so far as I know, the integration of SSL communications is not foreseen in FMF roadmap.

To avoid any misunderstanding, FreeMedForms is secured. You cannot access it without a login and password and these credentials are encrypted in the FMF database.
But securing the communications with the MySQL databases is your responsibility as it is with any MySQL client.

The idea is to create an SSH tunnel with Putty

• MySQL server is installed on a Unix-like operating system
• You have access to the host where MySQL server is installed.

1. Download Putty
2. Open putty and set up a saved session

Enter IP address of MySQL server in the host name (or IP address) field
In my case:

Enter a name in the Saved Sessions field
I will use: SSH Tunnel FMF

Click save.
Your session is now saved but you still have to add the SSH tunnel

3. Setting up the SSH tunnel
In the left pane, go to
Connection > SSH > Tunnels
In the source port field, enter 8890
In the Destination field, enter
Click Add

In the Forwarded Ports, you should see something like:

Don’t forget to save your session!
In the left pane, click on Session and then Save.

Note that port 8890 was arbitrarily chosen. You can use another port if you want.

4. Open your session and enter your credentials
Your windows machine is now listening on port 8890.

You can check this with the netstat utility by opening a command prompt and typing:
netstat -an | findstr 8890

5. Open FreeMedForms Client
In the host field, enter localhost
In the port field, enter 8890

When clicking ok, your FreeMedForms client will communicate through the putty SSH tunnel with the MySQL server.

If it’s not the first time you open FreeMedForms client and you cannot change Host and Port fields
Close FreeMedForms and enter here below path in file explorer:


Edit the file config-net.ini and set the FirstTimeRunning variable to true
Click save.

Open FreeMedForms and run through the Application Configurator Wizard

Select Network (as client)
Click next and login in FreeMedForms

References ... d-ssh.html ... sh-portfwd

Re: Secure Connections with a Windows FMF Client

Posted: 11 April 2015, 09:37
by eric
Thanks for this HowTo.