Secure Connections with a Windows FMF Client

Everything about our Electronic Medical Record FreeMedForms: ask questions, post reviews, add comments.
Toutes vos questions/commentaires/retours d'expérience avec notre gestionnaire de dossier patient FreeMedForms EMR.
Post Reply
Posts: 3
Joined: 04 April 2015, 07:51
Location: Belgique

Secure Connections with a Windows FMF Client

Post by » 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

User avatar
Posts: 116
Joined: 28 September 2013, 11:27

Re: Secure Connections with a Windows FMF Client

Post by eric » 11 April 2015, 09:37

Thanks for this HowTo.

Post Reply