Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Oct 04, 2012 6:33 am 
Offline
Newbie

Joined: Sun Jan 29, 2012 4:16 pm
Posts: 3
Location: Copenhagen, Denmark
Hi there

I have a standalone mysql server and an 'app' server running php/apache. I've set this up according to the instructions set out here: http://library.linode.com/databases/mys ... sql-server

However, since installing a firewall on the mysql server (using exactly the steps shown here: http://library.linode.com/securing-your ... a-firewall) I can no longer access the mysql server from my app server.

Can anyone with iptables knowledge help me out?

Cheers


Jim


Top
   
PostPosted: Thu Oct 04, 2012 7:52 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Add a rule like this
Code:
-A INPUT -s <your app server ip>/32 -p tcp -m tcp --dport 3306 -j ACCEPT 
to your firewall config

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Fri Oct 05, 2012 8:39 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
Or you could tunnel traffic over an ssh session like this:
Code:
ssh -L 3306:localhost:3306 user@your.mysql.server.name

You would run this from the app server, and then set the app to connect to localhost for the database. Keep in mind that you would probably want some automatic way to re-establish the ssh session in case it gets closed.


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


Who is online

Users browsing this forum: No registered users and 2 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