I have a MySQL server on a VPS that I am replicating to a slave on my home network as a backup. The problem is that I do not have a static IP address so I have configured the replication user to be allowed to connect from any host.
I don't like this because of the security implications.
Will setting a host name for the slave server using DynDNS work?
Asked
Active
Viewed 611 times
0
![](../../users/profiles/5200.webp)
bkoch
- 239
- 2
- 6
1 Answers
2
You could configure a simple openvpn setup between the two machines, then no matter what the home machine's public routable IP address is at the time it can still have the same address on the VPN that exists between the two machines.
A simpler alternative would be to use tunnelling down SSH, but this is less reliable in the presence of intermittent connectivity problems.
Both solutions have the added advantage of the data not being transferred over any public network segment in the plain - IIRC the replication protocol for mysql is not encrypted at all in its own right.
![](../../users/profiles/5221.webp)
David Spillett
- 22,534
- 42
- 66
-
I really like your first solution of the OpenVPN. That would solve the dynamic IP issue and provide me with another layer of security. Thanks. – bkoch Dec 17 '09 at 12:42
-
It way also save you a bit of bandwidth if you turn the comp-lzo option on. – David Spillett Dec 17 '09 at 13:45