How to Use Proxy on WSL 2

1. Install cntlm.sudo 

apt-get install cntlm

2. Configure the permission for cntlm.conf file.

sudo chmod 644 /etc/cntlm.conf

3. Configure proxy settings. 

sudo vi /etc/cntlm.conf

4. Make sure the following parameters are configured.

Domain XXX
Username XXX
Proxy 1.2.3.4:5678
NoProxy localhost, 127.0.0., 10.
Listen 3128

5. Test connectivity. (Hit enter key if it asks a password)

cntlm -M http://www.google.com

6. Generate hashed passwords.

cntlm -H

7. Paste the generated passwords to the cntlm configuration file.

8. Configure proxy.

export http_proxy=http://localhost:3128/
export https_proxy=http://localhost:3128

9. Start cntlm

sudo cntlm -v -c /etc/cntlm.conf

Popular posts from this blog

Moving to Blogger.com

Connect-NsxtServer shows "Unable to connect to the remote server"