I am not sure how to put it in words, so created a illustration to show what my setup is like.
DB Server and Web Server are in a VLAN, Web Server has a public IP, but DB Server does not. Normally DB can only talk to Web Server. Exception is that it should also be able to talk to Main Server, yet it should be inaccessible remotely.
I thought of it could be setup as DB>>Web>>Main Server, but I am at very beginner level with SSH configuration, so cant do anything on my own.
DB to Main connection should be permanent two way and is only needed via port 80.
DB and Web Server are CentOS 7.2, Main Server is Debian 8
Is this actually possible and if so, how? Any help is very much appreciated. Thanks.