My iptables block everything except several ports like 80, 22, etc.
It's running my java servlet. I need to connect to that servlet using jconsole. I don't want to allow external connections for jmx ports. I should be the only one to be able to connect.
Is it possible to somehow tunnel those blocked jmx ports via ssh so I can connect to the process from my laptop? (I don't have constant ip address on my laptop)
PS. commands like: ssh -L 2100:localhost:2100 -L 2099:localhost:2099
doesn't seem to work here. If the firewall is active it won't allow to connect to those ports.