I found a solution which involves several steps.
Step 1: Create proper SOCKS tunneling:
Don't forget to click the 'Add' button in the end.
Step 2: Modify the JProfiler's startup script and add the SOCKS proxy settings:
java -Xmx512m -classpath "%LOCALCLASSPATH%" -DsocksProxyHost=localhost -DsocksProxyPort=8849 com.jprofiler.frontend.FrontendApplication
The above code snippet should be placed in jprofiler.bat which is located here:
\Program Files\jprofiler8\bin\windows
Step 3: Open remote JProfiler session and use the original remote host and the original remote port. In other words, start normal remote profiling session with no deviations from the original process. The PuTTY tunneling will take care of the firewall problem for you automatically.