While using wget with ISA proxy server, it throws an error '407: Proxy Authentication Required'

Solution Verified - Updated

Environment

  • Red Hat Entprise Linux(RHEL)
  • Microsoft ISA Proxy with NTLM Authentication

Issue

  • While using wget with ISA proxy server, it throws below error
407: Proxy Authentication Required

Resolution

Note: The following information has been provided by Red Hat, but is outside the scope of the posted This content is not included.Service Level Agreements and support procedures. The information is provided as-is and any configuration settings or installed applications made from the information in this article could make the Operating System unsupported by Red Hat Global Support Services. The intent of this article is to provide information to accomplish the system's needs. Use of the information in this article at the user's own risk.

As a workaround, a third party program called 'ntlamps' can be used. ntlmaps handles the communication and authentication with the ISA server.

  • Go to: <Content from ntlmaps.sourceforge.net is not included.http://ntlmaps.sourceforge.net/> and Scroll down to “Download.” Download the ntlmaps package and unpack it.

  • Go to ntlmaps directory and edit 'server.cfg' with following settings:

    PARENT_PROXY:
    PARENT_PROXY_PORT:
    NT_DOMAIN:
    USER:
    PASSWORD:your_nt_password
    
  • Start NTLMaps (as root) using below command.

    # ./main.py
    

    It will show port number on which NTLM authentication proxy server is listening for. Use the same port number and hostname while using wget command.

  • Configure wget to use NTLMaps

    Create a .wgetrc file in home directory and export enviornment variables which are given by ./main.py

    $ vi ~/.wgetrc
    http_proxy=http://localhost:5865/
    ftp_proxy=http://localhost:5865/
    use_proxy=on
    wait=15
    
  • Next, try to issue a wget of a known webpage, like www.yahoo.com:

    $ wget www.yahoo.com
    

Root Cause

  • Microsoft proxy servers like the ISA line default to NTLM based authentication and this is not something which is native to linux-like os.
SBR
Components
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.