Welcome! Log In Create A New Profile

Advanced

nginx reverse proxy for ssh reverse tunnel?

July 19, 2020 02:45AM
* 192.168.1.100 (reverse proxy and ssh tunnel server) : centos 8 + sshd 8 + nginx 1.14.1 + firewalld disabled
* 192.168.1.101 (local web server) : windows 10 + web App (port 80) exposed to remote access with SSH reverse tunnel (port 6033)
* 192.168.1.102 (remote machine) : Ubuntu + curl
curl http://192.168.1.100:6033/api/Users ==> works well
curl http://192.168.1.100/tunnel/api/Users ==> "the page you are looking for is temporarily unavailable" !!!

tried with this [/etc/nginx/nginx.conf]

...
http {
...
server {
...
location /tunnel/ {
proxy_pass http://127.0.0.1:6033;
}
}
}

then with this [/etc/nginx/nginx.conf]

...
http {
...

upstream tunnel {
server 127.0.0.1:6033;
}

server {
...
location /tunnel/ {
proxy_pass http://tunnel;
}
}
}

how to make a working nginx configuration that forward server port 80 to the ssh tunnel port 6033?
Subject Author Posted

nginx reverse proxy for ssh reverse tunnel?

jalil1408 July 19, 2020 02:45AM

Re: nginx reverse proxy for ssh reverse tunnel?

Francis Daly July 19, 2020 04:30AM

Re: nginx reverse proxy for ssh reverse tunnel?

jalil1408 July 19, 2020 02:53PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready