OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: itngo on July 26, 2022, 08:33:24 am

Title: NGINX Reverse Proxy and /autodiscover/autodiscover.xml
Post by: itngo on July 26, 2022, 08:33:24 am
Hello everyone...

we use DNS SRV-Entry for autodiscover and do not Publish "Exchange-Autodiscover" on our Webpage.
However, we have plenty of requests for fqdn/autodiscover/autodiscover.xml which reach the Webserver and get answered with 404 not found.

Is it possible with some URL-Rewrite-Rule to answer this request directly on the nginx-reverse-proxy with 403 (forbidden).

How is this be done?

Thank you.
Title: Re: NGINX Reverse Proxy and /autodiscover/autodiscover.xml
Post by: fabian on July 26, 2022, 05:43:10 pm
you can actually use a location with this URL and say exact match and route it to wherever you like. I guess return code is not implemented in the plugin but nginx would be capable of doing so.

As an alternative you could use the WAF to block it.
Title: Re: NGINX Reverse Proxy and /autodiscover/autodiscover.xml
Post by: itngo on July 26, 2022, 08:50:48 pm
Ok understood.
But the return-code 403 is important for us, as this will tell "possible" outlook Clients to continue with the SRV-Record without any delay. This keeps Outlook-Clients fast on start and discovery. So I guess we have to put an include-file in the Location to set return code?
Title: Re: NGINX Reverse Proxy and /autodiscover/autodiscover.xml
Post by: fabian on August 01, 2022, 11:20:58 pm
Would likely be the easiest solution