/usr/local/opnsense/service/templates/OPNsense/Nginx/http.conf
# TODO add when core is ready for allowing nginx to serve the web interface
include http_post/*.conf;# TODO add when core is ready for allowing nginx to serve the web interface
/usr/local/opnsense/service/templates/OPNsense/Nginx/location.conf
{% endif %}{# honeypot #} include {{ location['@uuid'] }}_post/*.conf;}
/usr/local/etc/nginx/nginx.conf
map $status $forceBasic{ 401 'Basic realm=mail.xxx.com';}
proxy_hide_header WWW-Authenticate;add_header WWW-Authenticate $forceBasic always;
OK. then let's try1. You need to create a hooks in the http block to read additional configuration (maps in this case) and in location block to read additional config (headers directives in this case):in http template fileCode: [Select]/usr/local/opnsense/service/templates/OPNsense/Nginx/http.confright above the lineCode: [Select]# TODO add when core is ready for allowing nginx to serve the web interfaceadd a hook line. so it should look likeCode: [Select]include http_post/*.conf;# TODO add when core is ready for allowing nginx to serve the web interfacein location template fileQuote/usr/local/opnsense/service/templates/OPNsense/Nginx/location.confright above the last curly brace add a hook line for location _post-config.it should look likeCode: [Select]{% endif %}{# honeypot #} include {{ location['@uuid'] }}_post/*.conf;}then click Apply in Nginx->Configuration->General Settings in GUI. the templates should apply and in the config fileCode: [Select]/usr/local/etc/nginx/nginx.confyou should see the hooks that appear:"include http_post/*.conf;" above upstreams part and "include *someUIDdigits*_pre/*.conf;" in the end of each locationif everything worked out, then you can create dirs and files2. Add extra configIn /usr/local/etc/nginx/ dir make "http_post" dir and "yourlocationUID_post" dir.the last dir name you can take from hook string in your location block in nginx.conf.in "http_post" dir you can put a file with the name say maps.conf with content:Code: [Select]map $status $forceBasic{ 401 'Basic realm=mail.xxx.com';}in ""yourlocationUID_post"" dir you can put a file with the name say autodisco_location.conf with content:Code: [Select]proxy_hide_header WWW-Authenticate;add_header WWW-Authenticate $forceBasic always;hit Apply in Nginx->Configuration->General Settings in GUI.if everything worked out, then the M$ connectivity test should be happy )
root@cerberus:~ # grep -n -A1 -B1 _post /usr/local/opnsense/service/templates/OPNsense/Nginx/location.conf208-{% endif %}{# honeypot #}209: include {{ location['@uuid'] }}_post/*.conf;210-}
the last few lines of the running configinclude opnsense_stream_vhost_plugins/*.conf;
root@cerberus:~ # grep include /usr/local/etc/nginx/nginx.confinclude mime.types;js_include /usr/local/opnsense/scripts/nginx/ngx_functions.js;include http_post/*.conf;# include nginx_web.conf;include opnsense_http_vhost_plugins/*.conf; #include tls.conf; include fastcgi_params; include fastcgi_params; include b21a09c6-db5d-4ce0-bfe0-dd7e31d89811_pre/*.conf; include 7b884db8-eafa-43d0-bdae-ec4a66a97cad_post/*.conf; include b21a09c6-db5d-4ce0-bfe0-dd7e31d89811_post/*.conf; #include tls.conf; include fastcgi_params; include fastcgi_params; include 7b844599-dbd4-4b45-ad56-e22dd094d6d5_pre/*.conf; include 016848f7-b0de-401b-b961-b7bfeed575ab_post/*.conf; include 7b844599-dbd4-4b45-ad56-e22dd094d6d5_post/*.conf; #include tls.conf; include fastcgi_params; include fastcgi_params; include f94e4a2e-e9ea-419b-a5b8-763890eaa89b_pre/*.conf; include d9acf7d4-f0b5-4530-b574-ad4b28375e18_post/*.conf; include f94e4a2e-e9ea-419b-a5b8-763890eaa89b_post/*.conf; #include tls.conf; include fastcgi_params; include fastcgi_params; include f857a060-bf3e-4d6d-af2a-5073ee117b2d_pre/*.conf; include cc8de2e8-3e31-4994-bd0c-5712a874fb04_post/*.conf; include f857a060-bf3e-4d6d-af2a-5073ee117b2d_post/*.conf; #include tls.conf; include fastcgi_params; include fastcgi_params; include 040f7fe9-396e-4b8e-8e4c-19a3eff357c4_pre/*.conf; include 5eeb9519-02e7-4dee-9368-f5dd50f5779d_post/*.conf; include 040f7fe9-396e-4b8e-8e4c-19a3eff357c4_post/*.conf; #include tls.conf; include fastcgi_params; include fastcgi_params; include fcdd1729-8503-4055-80e3-cf74112ca928_pre/*.conf; include 8498a998-7bbf-4401-80aa-7498170d3a34_post/*.conf; include fcdd1729-8503-4055-80e3-cf74112ca928_post/*.conf; include opnsense_stream_vhost_plugins/*.conf;
what should I look for as I have other services besides exchange
Attempting to ping the MAPI Mail Store endpoint with identity: xxxxx-9188-4474-9811-0ef5db77cf19@xxx.com:6001.The attempt to ping the endpoint failed.Additional DetailsAn RPC error was thrown by the RPC Runtime process. Error 1818 CallCancelledRPC Status: 1818 CallCancelledTimestamp: 2/9/2021 5:33:20 PMGenerating Component: 14 (WinHttp)Status: 1818Detection Location: 1390 (HTTP2ClientVirtualConnection__ClientOpenInternal10)Flags: 0Parameters:30000
168.61.212.41 - - [09/Feb/2021:12:22:14 -0600] "POST /Autodiscover/Autodiscover.xml HTTP/1.1" 405 150 "-" "Microsoft Office/15.0 (Windows NT 6.2; Microsoft Outlook 15.0.4615; Pro; MS Connectivity Analyzer)" "-"168.61.212.41 - - [09/Feb/2021:12:22:14 -0600] "POST /Autodiscover/Autodiscover.xml HTTP/1.1" 405 175 "-" "Microsoft Office/15.0 (Windows NT 6.2; Microsoft Outlook 15.0.4615; Pro; MS Connectivity Analyzer)" "-"168.61.212.41 - - [09/Feb/2021:12:22:15 -0600] "POST /Autodiscover/Autodiscover.xml HTTP/1.1" 405 150 "-" "Microsoft Office/15.0 (Windows NT 6.2; Microsoft Outlook 15.0.4615; Pro; MS Connectivity Analyzer)" "-"168.61.212.41 - - [09/Feb/2021:12:22:15 -0600] "POST /Autodiscover/Autodiscover.xml HTTP/1.1" 405 175 "-" "Microsoft Office/15.0 (Windows NT 6.2; Microsoft Outlook 15.0.4615; Pro; MS Connectivity Analyzer)" "-"
request buffering, and set the Maximum Body Size to 2G
enabling WAF without any rules selected makes the remote connectivity tester to fail