[GH-ISSUE #2020] 400 error for admin panel over SSH tunnel #1461

Closed
opened 2026-02-26 07:31:09 +03:00 by kerem · 2 comments
Owner

Originally created by @itsKV on GitHub (Apr 21, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2020

I have not forwarded port 81 on VPS for internal security reasons.
I have logged in via SSH with tunnel setting as L81-->127.0.0.1:81
But the browser is giving Bad Request - Invalid Hostname error when I open http://127.0.0.1:81 in browser.
How to access Admin web panel using ssh tunnel?

Originally created by @itsKV on GitHub (Apr 21, 2022). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2020 I have not forwarded port 81 on VPS for internal security reasons. I have logged in via SSH with tunnel setting as L81-->127.0.0.1:81 But the browser is giving _Bad Request - Invalid Hostname_ error when I open http://127.0.0.1:81 in browser. How to access Admin web panel using ssh tunnel?
kerem closed this issue 2026-02-26 07:31:09 +03:00
Author
Owner

@stk21 commented on GitHub (Apr 24, 2022):

@itsKV What is your connection string to the VPS?

I just did this on mine it worked find.

I would recommend port forwarding a higher port than 81. your host operating system might have an issue with :81

ssh -L8181::81 user@

this assumes that :81 is the management port that docker is listening to for management of the NPM container.

<!-- gh-comment-id:1107916858 --> @stk21 commented on GitHub (Apr 24, 2022): @itsKV What is your connection string to the VPS? I just did this on mine it worked find. I would recommend port forwarding a higher port than 81. your host operating system might have an issue with :81 ssh -L8181:<ip address of where NPM is running>:81 user@<ip address of machine you are connecting to> this assumes that :81 is the management port that docker is listening to for management of the NPM container.
Author
Owner

@itsKV commented on GitHub (Apr 26, 2022):

Sorry, my bad.
The port I was trying to use on local machine was hogged by local application which was giving 400 error. Changed the port no 'free' one. That solved the issue.

<!-- gh-comment-id:1110084830 --> @itsKV commented on GitHub (Apr 26, 2022): Sorry, my bad. The port I was trying to use on local machine was hogged by local application which was giving 400 error. Changed the port no 'free' one. That solved the issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#1461
No description provided.