Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Feb 15, 2012 1:30 pm 
Offline
Senior Newbie

Joined: Tue Feb 14, 2012 2:54 am
Posts: 7
Dear Friends:

Normally I use my vps to host websites. But now I have a customer that needs to host a mysql database, and access the database from a Java application. The app is installed in a few netbooks and the netbooks are travelling around the country, using different kind of connections to connect to the server (mobile connections, a wifi connection in a MC Donalds, a wifi at home, a lan at work...).

Wich is the best and more secure way to give access to this Java application to (and only to) this mysql database?

I hope you understand my bad English.

Thanks in advance,

R. Campos.


Top
   
 Post subject:
PostPosted: Wed Feb 15, 2012 2:24 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
SSH tunneling.

Forward local port 3306 to remote port 3306, through the tunnel.
Code:
ssh -L 3306:localhost:3306 username@hostname


Tell Java app to connect to local port 3306.
Or choose any other local port.


Top
   
 Post subject:
PostPosted: Wed Feb 15, 2012 2:47 pm 
Offline
Senior Newbie

Joined: Tue Feb 14, 2012 2:54 am
Posts: 7
Ok, thank you for your answer.

I will try to modify the Java app to do the tunneling, using the JSch library.

Thanks in advance.

R. Campos.


Top
   
 Post subject:
PostPosted: Wed Feb 15, 2012 3:32 pm 
Offline
Junior Member
User avatar

Joined: Wed Nov 16, 2011 11:41 am
Posts: 37
Website: http://empoweringmedia.com
Location: United States
newer versions of mysql offer SSL support. IMHO better than SSH (because of the overhead of SSH).

_________________
Larry Ludwig
Empowering Media
Managed Cloud Services and Managed VPS


Last edited by empoweringmedia on Wed Feb 15, 2012 5:08 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Wed Feb 15, 2012 4:45 pm 
Offline
Senior Member

Joined: Sun May 23, 2010 1:57 pm
Posts: 315
Website: http://www.jebblue.net
empoweringmedia wrote:
newer versions of mysql offer SSL support. IMHO the better than SSH (because of the overhead of SSH).


The advantage of JSch is that the server continues to only expose SSH, your solution requires exposing a new SSL server, one more thing to worry about being exposed to the Internet.


Top
   
 Post subject:
PostPosted: Fri Feb 17, 2012 6:26 am 
Offline
Senior Newbie

Joined: Fri Apr 15, 2011 6:18 am
Posts: 8
Another way of doing this might have been through OpenVPN (or any VPN solution) then you could have firewalled the VPN so that only the MySQL port was available over it.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group