Registered Member
|
omg sorry guys, this forum log in is so complicated, I found out that my username is "erikasb" instead of "erkexzcx".... :'( ok, time to modify it... keep reading ;)
Introduction what is it, what is it for, and how it works. You will need to download an application - cntlm (All info how below) After reading Google how to enable authentication, I haven't got any luck by adding info to apt.conf file, by creating new scripts etc... This is just the only one way how it worked for me, and now I have great working computer on school network through proxy! This is tutorial how to set authentication for proxy system wide. This is usually for schools, when students are supposed to use their proxy with authentication. NTLM is by Microsoft, so Linux doesn't work very well with it. The best thing that this app will not change any dangerous system files. :) Turns on Automatically on start-up. (It should does, on some Linux OS it doesn't). How to download The magic name of that application is CNTLM. It's original webpage is http://cntlm.sourceforge.net/ Download links are here http://sourceforge.net/projects/cntlm/f ... %200.92.3/ If you have no idea, click on one of those links: 64Bit DEB installation file: http://sourceforge.net/projects/cntlm/files/cntlm/cntlm%200.92.3/cntlm_0.92.3_amd64.deb/download 32Bit DEB installation file: http://sourceforge.net/projects/cntlm/files/cntlm/cntlm%200.92.3/cntlm_0.92.3_i386.deb/download Or, if you are not Debian/Ubuntu based OS user (like wifislax), you can download source and compile it. The best thing that source doesn't need any external libraries, just gcc (or g++)compiler, that usually all Linux distributions has (except Lubuntu :D ). Download source and compile yourself: http://sourceforge.net/projects/cntlm/files/cntlm/cntlm%200.92.3/cntlm-0.92.3.tar.gz/download How to install/compile I hope you all guys know how to use terminal main commands, like cd or ls For deb files: Simple:
How to compile source code (do copy-paste, start at the same directory where file is):
How to configure I always use this method below and always works. READ carefully, because it has unpatched bug. Open terminal and paste this code (as text editor am using default kate)
Then, some text will popup. Delete EVERYTHING and copy-paste text from below. (I also added picture even below to see what I am talking about)
Attention! Ensure that you've left an empty line at the end of file. I found in Google that this is bug. Without that empty line it doesn't work! And save file. I suggest to leave terminal opened for a while. Sorry after edit I was too lazy to change picture to remove a password line... Whatever, ignore, continue... ;) Now go back to terminal. Type this:
and then type your proxy password. Click enter and then cntlm will print out 3 text lines. Copy all three lines from terminal and and paste to /etc/cntlm.conf file under Domain, so it will look like this
Explanation of
Enabling proxy under KDE Ok, we have all the settings we need for cntlm application. There you go two commands.
At first time, I suggest kill cntlm, and then run from terminal. See how terminal prints result. If it doesn't say much about errors and keeps running (after cntlm activation command you should not be able to write anymore commands, you may open new tab or terminal instead). So if it happened - I suggest reboot your computer and after logging in to your computer, check task manager for cntlm (As default, task manager is CTRL+ESC). If you see it running, everything is 99,9% OK! :) Step 1 - proxy in KDE Go to System settings --> Network settings --> Proxy (You are here as default) --> Use manually specified proxy settings Enter this proxy to first line and click on Use this proxy for all protocols.
Example: Remember when we set listening port to 3310? You can set anything you want, that is not used. :) So if you left 3310 port, your local proxy is now 127.0.0.1:3310 Step 2 - proxy in Terminal I understand that sometimes is not enough simply change proxy in settings. Terminal ignores them :P However, terminal apps like ping or add-repository (I don't remember correct name) still doesn't work through proxy. I have no idea, probably doesn't support, but things like apt-get works fine! Enter this command in terminal:
An empty file will popup. It might not even exists! Now copy/paste those commands into that file and save it (save and create it).
Example: Tips and tricks - for other Linux distributions - workarounds Something not working? 1. Check if you've left an empty line in file /etc/cntlm.conf 2. Try to run CNTLM from terminal (kill it before doing that if it's running), check terminal input. 3. Check /etc/cntlm.conf if you have entered all settings correctly (use my picture example) + if you haven't accidentally deleted field. 4. Reboot your pc. 5. On some Linux OS some programs, like google-chrome-stable ignores proxy settings. Doesn't it happening to you? Set proxy for terminal. Turn off terminal, turn it on again and try sudo apt-get update. See if it works. Doesn't start automatically after PC boot? Two ways: 1. Go to your Desktop Environment settings and add startup command: cntlm -v -c /etc/cntlm.conf Or if you can't find it, just manipulate applications. Add any application to startup, then just change it's command. ;) 2. Go to google and search for file which contains commands at startup. Search something like that: http://bit.ly/LN1avN Then simply follow instructions and add command somewhere where you should do: cntlm -v -c /etc/cntlm.conf Simply step how to reverse proxy for terminal You set proxy for terminal that 3 commands in /etc/apt/apt.conf. Now you want to disable proxy for terminal. But later you will want to enable it back. Simply add # symbol before everyline:
and Linux OS ignores those lines, and result is the same as empty file ;) |
Registered Member
|
However, we can add a line to
and cntlm will be available for other devices which have proxy settings but doesn't have authentication options.! Another way to get your laptop running cntlm to act as proxy is run
but what proxy settings to use on other devices after I set up cntlm to work in gateway mode? Attention it's actually confusing - it's not gateway, it works as a proxy! simple way - must be on LAN! Go to your laptop terminal, type
so proxy for other devices on the same network would be
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]