Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a server in internet that must have all data synced (dont need to be in realtime) from a server from a intranet (obviously has internet connection). Is it possible?

How about sync both sides, master-master?

I havent tried yet because my internal server is behind a NAT and I dont have access to it.

share|improve this question
    
Have you tried? What did you try, and what happened? –  Andrew Schulman Jan 8 at 19:42
    
@AndrewSchulman I havent tried yet because my problem is how can I sent data from internet to intranet, as my internal server is behind a NAT and I dont have access to it. –  Erick Engelhardt Jan 9 at 1:08

2 Answers 2

up vote 1 down vote accepted

Two ways to do it:

  1. Configure the NAT router to forward the MySQL port (3306/tcp) from the internet to your intranet server. In general this is a risky thing to do; obviously you don't want the whole internet to be able to connect to your database server. So you'll need strong authentication, and strong encryption too as EEAA said.

  2. Have a client inside the LAN connect out by ssh to the internet server, then tunnel port 3306 over that connection back to the intranet MySQL server:

    ssh -R 3306:intranetmysql:3306 internetmysql
    
share|improve this answer
    
Thanks for the tunneling idea. Sounds good! –  Erick Engelhardt Jan 9 at 2:04

I have a server in internet that must have all data synced (dont need to be in realtime) from a server from a intranet (obviously has internet connection). Is it possible?

Yes.

How about sync both sides, master-master?

Yes.

You need to consider encryption, though, as you don't want cleartext data going out over the internet.

share|improve this answer
    
Will also need to consider bandwidth requirements. A large heavily used db with a 56k modem between the servers will never catch up. –  Grant Jan 8 at 19:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.