I'm doing a reverse port forward with putty from my local machine to a server, I want every request on port 8002 to be forwarded to my local machine.
I set the destination port on the tunnel tab to 127.0.0.1:8002 and the source port to 8002. I tick both the; "Local ports accept connections from other hosts" and the "Remote ports do the same (SSH-2 only)"
Once I initiate the connection I see on the event log that the connection works;
2022-06-07 11:49:58 Access granted
2022-06-07 11:49:58 Requesting remote port 8002 forward to 127.0.0.1:8002
2022-06-07 11:49:58 Opening main session channel
2022-06-07 11:49:58 Remote debug message: /home/emre/.ssh/authorized_keys:2: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
2022-06-07 11:49:58 Remote debug message: /home/emre/.ssh/authorized_keys:2: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
2022-06-07 11:49:58 Remote port forwarding from 8002 enabled
2022-06-07 11:49:58 Opened main channel
2022-06-07 11:49:58 Allocated pty
2022-06-07 11:49:58 Started a shell/command
I pop a couple postman get requests to see if they get through, on the server I can see them come in. However they never reach my local machine, and this is the error I get.
Error: connect ECONNREFUSED 104.196.37.236:8002
What methods could I do to figure out what is wrong? The relevant ports are all forwarded on my router and I don't see any reason why it wouldn't forward. I'd appreciate any input as I'm completely stuck on this.
Edit: The gatewayports variable on my ssh config on the server is equal to "no" could this be causing the issue?