I searched the same question ("how to configure nmlm proxy dummy server") and found this. So here is my solution on how to configure NTLM authentication forwarding for a proxy server, without using Microsoft's IIS server. Instead, we will use Apache httpd.exe
Enable proxy server. Be warned, you can open an open proxy server on the Internet ...
ProxyVia On ProxyRequests On <Proxy "*"> AuthName "Private location" AuthType SSPI NTLMAuth On NTLMAuthoritative On <RequireAll> <RequireAny> Require valid-user #require sspi-user EMEA\group_name </RequireAny> <RequireNone> Require user "ANONYMOUS LOGON" Require user "NT-AUTORITÄT\ANONYMOUS-ANMELDUNG" </RequireNone> </RequireAll> </Proxy>
Or, if you just want to protect only one directory, you can copy the code from the mod_authn_ntml configuration example:
<Location /testDirectory > AuthName "Private location for testing NTLM authentication" AuthType SSPI NTLMAuth On NTLMAuthoritative On <RequireAll> <RequireAny> Require valid-user #require sspi-user EMEA\group_name </RequireAny> <RequireNone> Require user "ANONYMOUS LOGON" Require user "NT-AUTORITÄT\ANONYMOUS-ANMELDUNG" </RequireNone> </RequireAll> # use this to add the authenticated username to you header # so any backend system can fetch the current user # rewrite_module needs to be loaded then RewriteEngine On RewriteCond %{LA-U:REMOTE_USER} (.+) RewriteRule . - [E=RU:%1] RequestHeader set X_ISRW_PROXY_AUTH_USER %{RU}e </Location>
To capture the local loopback stream and debug what happens, you need to install Wireshark 2.4.4, and then the special driver npcap-0.97.exe loopback-capture. With this, you can sniff the traffic between your browser and your local web server.
If you want to use NTLM authentication for the proxy server, you will need to follow the tips from the mod_ntlmn_auth GitHub page and set the DisableLoopbackCheck flag to the registry (see https://support.microsoft.com/en-us/kb/896861 ), otherwise In this case, all local authentication requests will fail.
Configure your browser to use the local IP address as a proxy server. If everything works, the browser will send your credentials in the background.
To find out what is happening, you can now check your Wireshark logs, as well as the Apache / access.log logs showing you the domain \ User that was used for authentication.
I hope someone helps to check their proxy scripts, because a lot of proxy software that I come across cannot properly handle NTLM proxies, which is important in a business environment.
source share