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
fpconsult.be
Posts: 3
Joined: 04 April 2015, 07:51
Location: Belgique
Contact:

Secure Connections with a Windows FMF Client

Post by fpconsult.be » 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

Prerequisites:
• 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: 192.168.0.96

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 192.168.0.96:3306
Click Add

In the Forwarded Ports, you should see something like:
L8890 192.168.0.96:3306

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.

Note
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:

C:\Users\%USERNAME%\.freemedforms

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
https://dev.mysql.com/doc/refman/5.6/en ... d-ssh.html
http://the.earth.li/~sgtatham/putty/0.6 ... sh-portfwd

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

Re: Secure Connections with a Windows FMF Client

Post by eric » 11 April 2015, 09:37

Thanks for this HowTo.

Post Reply