Hello.
My problem is, to forward from wan through myport to lan myport. (7000)
I have 2 servers:
server1, user1: This is Openwrt on Raspberry, and I can acces this from wan with global-ip.
server2, user2: This is behind a firewall, and I cant acces it from wan.
I want acces server 2 from wan, therefore:
I have set up a ssh -R tunnel on server2 something like this:
autossh -vv -M 0 -R 7000:localhost:22 user1@server1-global-ip
and it works :
"debug1: remote forward success for: listen 7000, connect localhost:22"
"debug1: All remote forwarding requests processed"
On server1 I can ssh to server2: ssh user2@localhost -p 7000
It works fine, and I get connected to server2.
On server1 with Openwrt I have portforwarded 7000 on the wan to 7000 on the lan-ip (192.168.1.1) with Openwrt.
When I from wan do: ssh -v user2@server1-global-ip -p 7000
I get:
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to server1 [global-ip] port 7000.
debug1: connect to address global-ip port 7000: Connection refused
ssh: connect to host server1 port 7000: Connection refused
So... it dont work.
I have tryed many things, but without result....
It looks like the port forwarding is not accepted on 192.168.1.1, but why?
Please.... Can anyone here help?