I have a couple of servers in amazon EC2
- One server is a Windows Server 2012, is used to host a web application, there is an elastic ip address attached to this server.
- The second server is a linux server, to host the database, this server do not have a public ip address, this database server only listen using private network interface.
I need to expose the database server through web server, I mean, I like to connect to a particular port in windows server and create a port forwarding to reach linux server.
I tried to use this command:
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=4638
connectaddress=172.30.10.70 connectport=3306
Locally, in windows server, I cant connect to mysql server using the windows server private address and port 4638, I can run queries without problems.
The problem is when I try to connect using the attached elastic ip address, I cannot reach mysql server, the port 4638 is opened in the Windows server security group.
Thanks for your help.