Proxy with authentication in Ubuntu 18.04

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I have a fresh install of Ubuntu 18.04 and need to configure proxy in a corporate environment which comes with a corporate proxy (I know domain, credentials, proxy server and port).



I copied out proxy url and port from another PC (non linux), and put it inside Firefox in Ubuntu. It asked me for my credentials and after entering them it worked for that Firefox session.



I figured now I can just add that to the Network options in Ubuntu. I chose the manual option in Proxy settings and filled all the protocol options with tested proxy URL and ports. It didn't work.




What I have tried so far:



  1. Inputting username:password@proxyurl and domainusername:password@proxyurl in manual proxy settings for every protocol. Port went to the designated input.

  2. I tried just adding the proxyurl and port in the Manual config of Proxy settings without authorization

  3. Doing the terminal way of export http_proxy="http://username:password@proxyurl:port/" without any success

  4. Setting up cntlm for domain, username, password hash, proxy server with port and rebooting ubuntu, restarting cntlm

  5. Previously tried on Ubuntu Gnome LTS (based off of Ubuntu 16.04 LTS) with all the aforementioned without any success


Question



How can I add a system-wide proxy to Ubuntu 18.04 that works in every app and terminal?







share|improve this question
























    up vote
    0
    down vote

    favorite












    I have a fresh install of Ubuntu 18.04 and need to configure proxy in a corporate environment which comes with a corporate proxy (I know domain, credentials, proxy server and port).



    I copied out proxy url and port from another PC (non linux), and put it inside Firefox in Ubuntu. It asked me for my credentials and after entering them it worked for that Firefox session.



    I figured now I can just add that to the Network options in Ubuntu. I chose the manual option in Proxy settings and filled all the protocol options with tested proxy URL and ports. It didn't work.




    What I have tried so far:



    1. Inputting username:password@proxyurl and domainusername:password@proxyurl in manual proxy settings for every protocol. Port went to the designated input.

    2. I tried just adding the proxyurl and port in the Manual config of Proxy settings without authorization

    3. Doing the terminal way of export http_proxy="http://username:password@proxyurl:port/" without any success

    4. Setting up cntlm for domain, username, password hash, proxy server with port and rebooting ubuntu, restarting cntlm

    5. Previously tried on Ubuntu Gnome LTS (based off of Ubuntu 16.04 LTS) with all the aforementioned without any success


    Question



    How can I add a system-wide proxy to Ubuntu 18.04 that works in every app and terminal?







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a fresh install of Ubuntu 18.04 and need to configure proxy in a corporate environment which comes with a corporate proxy (I know domain, credentials, proxy server and port).



      I copied out proxy url and port from another PC (non linux), and put it inside Firefox in Ubuntu. It asked me for my credentials and after entering them it worked for that Firefox session.



      I figured now I can just add that to the Network options in Ubuntu. I chose the manual option in Proxy settings and filled all the protocol options with tested proxy URL and ports. It didn't work.




      What I have tried so far:



      1. Inputting username:password@proxyurl and domainusername:password@proxyurl in manual proxy settings for every protocol. Port went to the designated input.

      2. I tried just adding the proxyurl and port in the Manual config of Proxy settings without authorization

      3. Doing the terminal way of export http_proxy="http://username:password@proxyurl:port/" without any success

      4. Setting up cntlm for domain, username, password hash, proxy server with port and rebooting ubuntu, restarting cntlm

      5. Previously tried on Ubuntu Gnome LTS (based off of Ubuntu 16.04 LTS) with all the aforementioned without any success


      Question



      How can I add a system-wide proxy to Ubuntu 18.04 that works in every app and terminal?







      share|improve this question












      I have a fresh install of Ubuntu 18.04 and need to configure proxy in a corporate environment which comes with a corporate proxy (I know domain, credentials, proxy server and port).



      I copied out proxy url and port from another PC (non linux), and put it inside Firefox in Ubuntu. It asked me for my credentials and after entering them it worked for that Firefox session.



      I figured now I can just add that to the Network options in Ubuntu. I chose the manual option in Proxy settings and filled all the protocol options with tested proxy URL and ports. It didn't work.




      What I have tried so far:



      1. Inputting username:password@proxyurl and domainusername:password@proxyurl in manual proxy settings for every protocol. Port went to the designated input.

      2. I tried just adding the proxyurl and port in the Manual config of Proxy settings without authorization

      3. Doing the terminal way of export http_proxy="http://username:password@proxyurl:port/" without any success

      4. Setting up cntlm for domain, username, password hash, proxy server with port and rebooting ubuntu, restarting cntlm

      5. Previously tried on Ubuntu Gnome LTS (based off of Ubuntu 16.04 LTS) with all the aforementioned without any success


      Question



      How can I add a system-wide proxy to Ubuntu 18.04 that works in every app and terminal?









      share|improve this question











      share|improve this question




      share|improve this question










      asked May 15 at 14:30









      Leo Napoleon

      1014




      1014




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          I have been able to solve this issue successfully. For anyone facing the same issues, here is what I did:



          Tested on Ubuntu 18.04, 16.04 and CentOS 7




          Instructions



          1. Install cntlm (supplied through Virtualbox Shared Folders)

          2. Specifying username, domain, password hash (PassNTLMv2 - obtained with cntlm -H after setting username and domain), proxy server, noproxy, listen (I used the default 3128)

          3. Launching cntlm in bash

          4. Using your DE's network settings to set system-wide proxy (easy in gnome 3) OR specifying http_proxy and https_proxy in /etc/environment to 127.0.0.1:3128 (cntlm's listening port locally)


          5. [Ubuntu] Specifying proxy settings in /etc/apt/apt.conf (e.g. Acquire::http::Proxy "http://127.0.0.1:3128"; for both http and https separately)

          Now either open a new terminal window to test connection (wget/apt) or sign out and back in to test system-wide settings.




          Setting up with firefox



          Firefox however didn't work with the steps above only. Open settings and on the bottom of the General tab there are proxy settings. Just input the address to your local server manually and check the box to use it for every protocol.






          share|improve this answer





























            up vote
            0
            down vote













            In previous LTS 14.04 and 16.04 I used my custom indicator for it.



            https://github.com/scaamanho/proxy-indicator



            Due 18.04 Gnome Desktop move I found an script that works pretty well while I'm in mod and time to do a gnome shell extension for it.



            https://github.com/himanshub16/ProxyMan






            share|improve this answer




















              Your Answer







              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "89"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );








               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1036562%2fproxy-with-authentication-in-ubuntu-18-04%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              0
              down vote



              accepted










              I have been able to solve this issue successfully. For anyone facing the same issues, here is what I did:



              Tested on Ubuntu 18.04, 16.04 and CentOS 7




              Instructions



              1. Install cntlm (supplied through Virtualbox Shared Folders)

              2. Specifying username, domain, password hash (PassNTLMv2 - obtained with cntlm -H after setting username and domain), proxy server, noproxy, listen (I used the default 3128)

              3. Launching cntlm in bash

              4. Using your DE's network settings to set system-wide proxy (easy in gnome 3) OR specifying http_proxy and https_proxy in /etc/environment to 127.0.0.1:3128 (cntlm's listening port locally)


              5. [Ubuntu] Specifying proxy settings in /etc/apt/apt.conf (e.g. Acquire::http::Proxy "http://127.0.0.1:3128"; for both http and https separately)

              Now either open a new terminal window to test connection (wget/apt) or sign out and back in to test system-wide settings.




              Setting up with firefox



              Firefox however didn't work with the steps above only. Open settings and on the bottom of the General tab there are proxy settings. Just input the address to your local server manually and check the box to use it for every protocol.






              share|improve this answer


























                up vote
                0
                down vote



                accepted










                I have been able to solve this issue successfully. For anyone facing the same issues, here is what I did:



                Tested on Ubuntu 18.04, 16.04 and CentOS 7




                Instructions



                1. Install cntlm (supplied through Virtualbox Shared Folders)

                2. Specifying username, domain, password hash (PassNTLMv2 - obtained with cntlm -H after setting username and domain), proxy server, noproxy, listen (I used the default 3128)

                3. Launching cntlm in bash

                4. Using your DE's network settings to set system-wide proxy (easy in gnome 3) OR specifying http_proxy and https_proxy in /etc/environment to 127.0.0.1:3128 (cntlm's listening port locally)


                5. [Ubuntu] Specifying proxy settings in /etc/apt/apt.conf (e.g. Acquire::http::Proxy "http://127.0.0.1:3128"; for both http and https separately)

                Now either open a new terminal window to test connection (wget/apt) or sign out and back in to test system-wide settings.




                Setting up with firefox



                Firefox however didn't work with the steps above only. Open settings and on the bottom of the General tab there are proxy settings. Just input the address to your local server manually and check the box to use it for every protocol.






                share|improve this answer
























                  up vote
                  0
                  down vote



                  accepted







                  up vote
                  0
                  down vote



                  accepted






                  I have been able to solve this issue successfully. For anyone facing the same issues, here is what I did:



                  Tested on Ubuntu 18.04, 16.04 and CentOS 7




                  Instructions



                  1. Install cntlm (supplied through Virtualbox Shared Folders)

                  2. Specifying username, domain, password hash (PassNTLMv2 - obtained with cntlm -H after setting username and domain), proxy server, noproxy, listen (I used the default 3128)

                  3. Launching cntlm in bash

                  4. Using your DE's network settings to set system-wide proxy (easy in gnome 3) OR specifying http_proxy and https_proxy in /etc/environment to 127.0.0.1:3128 (cntlm's listening port locally)


                  5. [Ubuntu] Specifying proxy settings in /etc/apt/apt.conf (e.g. Acquire::http::Proxy "http://127.0.0.1:3128"; for both http and https separately)

                  Now either open a new terminal window to test connection (wget/apt) or sign out and back in to test system-wide settings.




                  Setting up with firefox



                  Firefox however didn't work with the steps above only. Open settings and on the bottom of the General tab there are proxy settings. Just input the address to your local server manually and check the box to use it for every protocol.






                  share|improve this answer














                  I have been able to solve this issue successfully. For anyone facing the same issues, here is what I did:



                  Tested on Ubuntu 18.04, 16.04 and CentOS 7




                  Instructions



                  1. Install cntlm (supplied through Virtualbox Shared Folders)

                  2. Specifying username, domain, password hash (PassNTLMv2 - obtained with cntlm -H after setting username and domain), proxy server, noproxy, listen (I used the default 3128)

                  3. Launching cntlm in bash

                  4. Using your DE's network settings to set system-wide proxy (easy in gnome 3) OR specifying http_proxy and https_proxy in /etc/environment to 127.0.0.1:3128 (cntlm's listening port locally)


                  5. [Ubuntu] Specifying proxy settings in /etc/apt/apt.conf (e.g. Acquire::http::Proxy "http://127.0.0.1:3128"; for both http and https separately)

                  Now either open a new terminal window to test connection (wget/apt) or sign out and back in to test system-wide settings.




                  Setting up with firefox



                  Firefox however didn't work with the steps above only. Open settings and on the bottom of the General tab there are proxy settings. Just input the address to your local server manually and check the box to use it for every protocol.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited May 16 at 12:49

























                  answered May 16 at 12:04









                  Leo Napoleon

                  1014




                  1014






















                      up vote
                      0
                      down vote













                      In previous LTS 14.04 and 16.04 I used my custom indicator for it.



                      https://github.com/scaamanho/proxy-indicator



                      Due 18.04 Gnome Desktop move I found an script that works pretty well while I'm in mod and time to do a gnome shell extension for it.



                      https://github.com/himanshub16/ProxyMan






                      share|improve this answer
























                        up vote
                        0
                        down vote













                        In previous LTS 14.04 and 16.04 I used my custom indicator for it.



                        https://github.com/scaamanho/proxy-indicator



                        Due 18.04 Gnome Desktop move I found an script that works pretty well while I'm in mod and time to do a gnome shell extension for it.



                        https://github.com/himanshub16/ProxyMan






                        share|improve this answer






















                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          In previous LTS 14.04 and 16.04 I used my custom indicator for it.



                          https://github.com/scaamanho/proxy-indicator



                          Due 18.04 Gnome Desktop move I found an script that works pretty well while I'm in mod and time to do a gnome shell extension for it.



                          https://github.com/himanshub16/ProxyMan






                          share|improve this answer












                          In previous LTS 14.04 and 16.04 I used my custom indicator for it.



                          https://github.com/scaamanho/proxy-indicator



                          Due 18.04 Gnome Desktop move I found an script that works pretty well while I'm in mod and time to do a gnome shell extension for it.



                          https://github.com/himanshub16/ProxyMan







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jun 17 at 10:13









                          scaamanho

                          18114




                          18114






















                               

                              draft saved


                              draft discarded


























                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1036562%2fproxy-with-authentication-in-ubuntu-18-04%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Popular posts from this blog

                              pylint3 and pip3 broken

                              Missing snmpget and snmpwalk

                              How to enroll fingerprints to Ubuntu 17.10 with VFS491