SSH remote port forwarding
The problem: when you set up SSH remote port forwarding, for example

or, put another way,
ssh user@front-server -R "0.0.0.0:12345:local-env-server:12345" -NCv
the listening port (12345 in our example) is bound to 127.0.0.1 (checked on Ubuntu 18.04 and CentOS 6/7), which in turn makes outside connections impossible:
~# netstat -tan|grep 12345
tcp 0 0 127.0.0.1:12345 0.0.0.0:* LISTEN
The fix:
Set in /etc/ssh/sshd_config:
GatewayPorts clientspecifiedRestart sshd:
~# systemctl restart sshd
After that all is well:
~# netstat -tan|grep 12345
tcp 0 0 0.0.0.0:12345 0.0.0.0:* LISTEN
Originally published in Russian on LiveJournal.