I have a web server that connects to a 3rd party database server and is granted permission to do so via a firewall rule on the database server.
When I'm developing locally on my laptop, I use an SSH tunnel to connect to the database server via the web server.
ssh web.server.com -L 5678:database.server.com:1234
What I would like to do, if it's even possible, is to set up a firewall rule on the web server that essentially accomplishes the same thing persistently.
So connecting to web.server.com:5678 forwards my connection on to database.server.com:1234 and the database server allows the connection as it's coming from the web server.
Problem is, I'm not really sure where I should start looking for ways to do this.
I'm running Shorewall 3.2.6 on the web server to configure my firewall.
Do I need to start with a VPN or can this be achieved without one?