mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #2366] Default site redirect #1674
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#1674
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NA3 on GitHub (Nov 3, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2366
i want to redirect all request who dont have a proxy configuration to a local honeypot, when i put my local ip on the redirect to, the call it made on internet dns server and get no host found, how can i redirect to a local http server? and can i got 1 redirect for http and another to https?
Regards.
@the1ts commented on GitHub (Nov 6, 2022):
Perhaps use the custom page option with a simple html redirect?
<meta http-equiv="Refresh" content="0; url='https://www.w3docs.com'" />This would redirect anyone to
https://www.w3docs.com.You will only see traffic to the redirected webserver if the bad actor is looking at the redirect and following and not simply probing your ports. I'm not 100% sure what you are trying to do with this honeypot over getting bad actor IP addresses which are available from the nginx access logs.
So if you want to do the redirect, setup a honeypot hostname inside NPM to proxy to this local http server. Then use the default site custom page to redirect to that honeypot hostname.
As to different for http and https not without using NPM custom nginx configuration for that honeypot hostname.
@NA3 commented on GitHub (Nov 6, 2022):
i will try to explain better,
i have a www vlan on my network, my opnsene redirect 80 and 443 on npm and 1-64000 to t-pot,
the lan rule are like that :
but when i try access an unknow vhost on my wan ip i got redirect to the default page of npm
i want to be redirect to they 2 honeypot on t-pot who trap 80 and 443 in place of the default page
can i use proxy_pass , proxy_redirect to the local ip of t-pot if the vhost dont match with one is configured?
@the1ts commented on GitHub (Nov 6, 2022):
Using NPM the only way I can see is to use the method I described. Any other way would require changing default NPM files which would break on updating NPM. (i.e. the files to change this behaviour are files inside the container, not files on /data outside the container).
So:
As you said, you cannot use the local IP of t-pot directly because you are going to need to redirect the web browser so it must be a internet routeable IP/hostname. But this will mean any web browser hitting your IP directly (i.e. not hitting a valid domain with a vhost setup in NPM) will get the default web page which redirects them to the honeypot hostname and therefore t-pot.
@NA3 commented on GitHub (Nov 6, 2022):
thx