[GH-ISSUE #2366] Default site redirect #1674

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

Originally created by @NA3 on GitHub (Nov 3, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2366

image

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.

Originally created by @NA3 on GitHub (Nov 3, 2022). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2366 ![image](https://user-images.githubusercontent.com/3059879/199833860-f3e7d26f-2893-401c-9d68-ff3d7819fe2f.png) 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.
kerem 2026-02-26 07:31:59 +03:00
Author
Owner

@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.

<!-- gh-comment-id:1304828067 --> @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.
Author
Owner

@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 :

  • 1st 80 and 443 to npm
  • 2nd all other on t-pot

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?

<!-- gh-comment-id:1304850183 --> @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 : - 1st 80 and 443 to npm - 2nd all other on t-pot 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?
Author
Owner

@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:

  1. Create a DNS hostname for the honeypot in your DNS provider
  2. Create an NPM proxy host for that honeypot hostname pointing at t-pot IP and port
  3. Use a redirect as the default page to your honey pot hostname.

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.

<!-- gh-comment-id:1304884510 --> @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: 1. Create a DNS hostname for the honeypot in your DNS provider 2. Create an NPM proxy host for that honeypot hostname pointing at t-pot IP and port 3. Use a redirect as the default page to your honey pot hostname. 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.
Author
Owner

@NA3 commented on GitHub (Nov 6, 2022):

thx

<!-- gh-comment-id:1304887490 --> @NA3 commented on GitHub (Nov 6, 2022): thx
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#1674
No description provided.