Remote access to the MySQL database

6

I have a DB inside a corporate network on a local machine serving as a MySQL server.

The structure of the network works like this!

Ineedtoaccessforexamplethemachinethatismarkedinred,andinthisenvironmentthe"Server" has its static IP "10.10.10.10", and the machine marked "192.168.0.34".

Can anyone help me with how to get access to this Mysql server?

    
asked by anonymous 23.09.2016 / 21:51

1 answer

1

Your question is related to networks, looking at your figure you have a server on the edge, surely you are effecting NAT from your internal network ips so that all your internal computers can access the Internet.

Your server has two interfaces, one that goes out to the internet and another that should serve as a gateway for the computers on the network 192.168.0.0/24, It turns out that the static IP that is on your wan interface (10.10.10.10) is not a public IP so it is very likely that it has a router on the other end, to make it work correctly I recommend that this router is in bridge mode, this will deliver a public IP (static or not, depends on the contract of your link) directly on your server's wan interface!

With this step completed you must make a redirect rule in your firewall, this rule will open in the Wan interface the port of your Mysql and redirect the connection to the machine that has mysql running on your internal network.

So when someone makes an access from outside your network to the public IP of your link on the specific port the connection will be redirected to the internal IP on the specific port.

(user on the internet) ----- > (public IP connection and mysql port of your link) --- > (redirection to IP and PC port on your internal network)

    
13.01.2017 / 22:57