How do I set systemwide connection over a proxy server

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











up vote
5
down vote

favorite
6












My Internet access is through a proxy, my OS is Debian 8, each application must configure it to use the proxy, but there are some that are a headache to make it work with a proxy, then my question is: is there any way or a program to send all my connections(tcp, udp, etc.) to the proxy? that is to say, how do I set systemwide connection over a proxy server?










share|improve this question

























    up vote
    5
    down vote

    favorite
    6












    My Internet access is through a proxy, my OS is Debian 8, each application must configure it to use the proxy, but there are some that are a headache to make it work with a proxy, then my question is: is there any way or a program to send all my connections(tcp, udp, etc.) to the proxy? that is to say, how do I set systemwide connection over a proxy server?










    share|improve this question























      up vote
      5
      down vote

      favorite
      6









      up vote
      5
      down vote

      favorite
      6






      6





      My Internet access is through a proxy, my OS is Debian 8, each application must configure it to use the proxy, but there are some that are a headache to make it work with a proxy, then my question is: is there any way or a program to send all my connections(tcp, udp, etc.) to the proxy? that is to say, how do I set systemwide connection over a proxy server?










      share|improve this question













      My Internet access is through a proxy, my OS is Debian 8, each application must configure it to use the proxy, but there are some that are a headache to make it work with a proxy, then my question is: is there any way or a program to send all my connections(tcp, udp, etc.) to the proxy? that is to say, how do I set systemwide connection over a proxy server?







      linux debian proxy






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 3 '15 at 12:40









      rpayanm

      2392614




      2392614




















          4 Answers
          4






          active

          oldest

          votes

















          up vote
          5
          down vote













          There are various solutions for this:



          1. Configuring http_proxy variables



          You can set $http_proxy and other such variables. Most applications will pick this variable automatically. To set it system-wide, you can set this variable in either your ~/.bashrc file or /etc/profile. Set it as:



          http_proxy=http://user:password@proxyserver.com:3128
          https_proxy=https://user:password@proxyserver.com:3128
          export http_proxy
          export https_proxy


          2. Using proxy_chains



          Some applications would not use your proxy variable and they might not even have settings to use a proxy server. In such a case, you can direct all your PC traffic through a proxy server by using proxy_chains.



          I've never used proxy_chains, however their homepage seems to tell it all in one single page: http://proxychains.sourceforge.net/howto.html



          3. Using transparent proxy



          To force all your PC connection through a proxy, you can also use transparent proxy as an alternative to proxy_chains. I don't have much idea how to set this up (I did this a long time back though and it worked!) so you'll have to look on your own.






          share|improve this answer
















          • 1




            proxychains works flawlessly on FreeBSD, it is awesome.
            – user3405291
            Oct 16 '17 at 22:29







          • 1




            Is there a way to do this without plaintexting the password?
            – samthebest
            Jun 27 at 9:06

















          up vote
          1
          down vote













          As shivams said there are various solutions for this.Just by exporting http_proxy you can't setup the connection. The way I will do setup the proxy will be as below,




          1. First I will setup the authentication by running the cntlm.



            a. To do that edit the /etc/cntlm.conf file by adding your username, password(you can also use hash generated for your password), domain, workstation and the proxy etc...



            b. And I will listen to the port 3128.



          2. I will setup the proxy for different applications or programs like for wget I will setup inside /etc/wgetrc, if it is curl then in curlrc etc...


          3. I will export the http(s)_proxy with http://localhost:3128.You can set this environment variable for a particular session or you can set it putting it inside /etc/profile.d/

          4. Done





          share|improve this answer



























            up vote
            0
            down vote













            To setup the proxy environment variable as a global variable, open /etc/profile file:



            # vi /etc/profile


            Add the following information:



            export http_proxy=http://proxy-server.mycorp.com:3128/


            OR



            export http_proxy=http://USERNAME:PASSOWRD@proxy-server.mycorp.com:3128/





            share|improve this answer





























              up vote
              0
              down vote













              You can set proxy in settings preference and it will reflect everywhere



              enter image description here






              share|improve this answer




















                Your Answer








                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "106"
                ;
                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: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                imageUploader:
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                ,
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );













                draft saved

                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f213737%2fhow-do-i-set-systemwide-connection-over-a-proxy-server%23new-answer', 'question_page');

                );

                Post as a guest















                Required, but never shown

























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes








                up vote
                5
                down vote













                There are various solutions for this:



                1. Configuring http_proxy variables



                You can set $http_proxy and other such variables. Most applications will pick this variable automatically. To set it system-wide, you can set this variable in either your ~/.bashrc file or /etc/profile. Set it as:



                http_proxy=http://user:password@proxyserver.com:3128
                https_proxy=https://user:password@proxyserver.com:3128
                export http_proxy
                export https_proxy


                2. Using proxy_chains



                Some applications would not use your proxy variable and they might not even have settings to use a proxy server. In such a case, you can direct all your PC traffic through a proxy server by using proxy_chains.



                I've never used proxy_chains, however their homepage seems to tell it all in one single page: http://proxychains.sourceforge.net/howto.html



                3. Using transparent proxy



                To force all your PC connection through a proxy, you can also use transparent proxy as an alternative to proxy_chains. I don't have much idea how to set this up (I did this a long time back though and it worked!) so you'll have to look on your own.






                share|improve this answer
















                • 1




                  proxychains works flawlessly on FreeBSD, it is awesome.
                  – user3405291
                  Oct 16 '17 at 22:29







                • 1




                  Is there a way to do this without plaintexting the password?
                  – samthebest
                  Jun 27 at 9:06














                up vote
                5
                down vote













                There are various solutions for this:



                1. Configuring http_proxy variables



                You can set $http_proxy and other such variables. Most applications will pick this variable automatically. To set it system-wide, you can set this variable in either your ~/.bashrc file or /etc/profile. Set it as:



                http_proxy=http://user:password@proxyserver.com:3128
                https_proxy=https://user:password@proxyserver.com:3128
                export http_proxy
                export https_proxy


                2. Using proxy_chains



                Some applications would not use your proxy variable and they might not even have settings to use a proxy server. In such a case, you can direct all your PC traffic through a proxy server by using proxy_chains.



                I've never used proxy_chains, however their homepage seems to tell it all in one single page: http://proxychains.sourceforge.net/howto.html



                3. Using transparent proxy



                To force all your PC connection through a proxy, you can also use transparent proxy as an alternative to proxy_chains. I don't have much idea how to set this up (I did this a long time back though and it worked!) so you'll have to look on your own.






                share|improve this answer
















                • 1




                  proxychains works flawlessly on FreeBSD, it is awesome.
                  – user3405291
                  Oct 16 '17 at 22:29







                • 1




                  Is there a way to do this without plaintexting the password?
                  – samthebest
                  Jun 27 at 9:06












                up vote
                5
                down vote










                up vote
                5
                down vote









                There are various solutions for this:



                1. Configuring http_proxy variables



                You can set $http_proxy and other such variables. Most applications will pick this variable automatically. To set it system-wide, you can set this variable in either your ~/.bashrc file or /etc/profile. Set it as:



                http_proxy=http://user:password@proxyserver.com:3128
                https_proxy=https://user:password@proxyserver.com:3128
                export http_proxy
                export https_proxy


                2. Using proxy_chains



                Some applications would not use your proxy variable and they might not even have settings to use a proxy server. In such a case, you can direct all your PC traffic through a proxy server by using proxy_chains.



                I've never used proxy_chains, however their homepage seems to tell it all in one single page: http://proxychains.sourceforge.net/howto.html



                3. Using transparent proxy



                To force all your PC connection through a proxy, you can also use transparent proxy as an alternative to proxy_chains. I don't have much idea how to set this up (I did this a long time back though and it worked!) so you'll have to look on your own.






                share|improve this answer












                There are various solutions for this:



                1. Configuring http_proxy variables



                You can set $http_proxy and other such variables. Most applications will pick this variable automatically. To set it system-wide, you can set this variable in either your ~/.bashrc file or /etc/profile. Set it as:



                http_proxy=http://user:password@proxyserver.com:3128
                https_proxy=https://user:password@proxyserver.com:3128
                export http_proxy
                export https_proxy


                2. Using proxy_chains



                Some applications would not use your proxy variable and they might not even have settings to use a proxy server. In such a case, you can direct all your PC traffic through a proxy server by using proxy_chains.



                I've never used proxy_chains, however their homepage seems to tell it all in one single page: http://proxychains.sourceforge.net/howto.html



                3. Using transparent proxy



                To force all your PC connection through a proxy, you can also use transparent proxy as an alternative to proxy_chains. I don't have much idea how to set this up (I did this a long time back though and it worked!) so you'll have to look on your own.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jul 3 '15 at 13:02









                shivams

                2,86611425




                2,86611425







                • 1




                  proxychains works flawlessly on FreeBSD, it is awesome.
                  – user3405291
                  Oct 16 '17 at 22:29







                • 1




                  Is there a way to do this without plaintexting the password?
                  – samthebest
                  Jun 27 at 9:06












                • 1




                  proxychains works flawlessly on FreeBSD, it is awesome.
                  – user3405291
                  Oct 16 '17 at 22:29







                • 1




                  Is there a way to do this without plaintexting the password?
                  – samthebest
                  Jun 27 at 9:06







                1




                1




                proxychains works flawlessly on FreeBSD, it is awesome.
                – user3405291
                Oct 16 '17 at 22:29





                proxychains works flawlessly on FreeBSD, it is awesome.
                – user3405291
                Oct 16 '17 at 22:29





                1




                1




                Is there a way to do this without plaintexting the password?
                – samthebest
                Jun 27 at 9:06




                Is there a way to do this without plaintexting the password?
                – samthebest
                Jun 27 at 9:06












                up vote
                1
                down vote













                As shivams said there are various solutions for this.Just by exporting http_proxy you can't setup the connection. The way I will do setup the proxy will be as below,




                1. First I will setup the authentication by running the cntlm.



                  a. To do that edit the /etc/cntlm.conf file by adding your username, password(you can also use hash generated for your password), domain, workstation and the proxy etc...



                  b. And I will listen to the port 3128.



                2. I will setup the proxy for different applications or programs like for wget I will setup inside /etc/wgetrc, if it is curl then in curlrc etc...


                3. I will export the http(s)_proxy with http://localhost:3128.You can set this environment variable for a particular session or you can set it putting it inside /etc/profile.d/

                4. Done





                share|improve this answer
























                  up vote
                  1
                  down vote













                  As shivams said there are various solutions for this.Just by exporting http_proxy you can't setup the connection. The way I will do setup the proxy will be as below,




                  1. First I will setup the authentication by running the cntlm.



                    a. To do that edit the /etc/cntlm.conf file by adding your username, password(you can also use hash generated for your password), domain, workstation and the proxy etc...



                    b. And I will listen to the port 3128.



                  2. I will setup the proxy for different applications or programs like for wget I will setup inside /etc/wgetrc, if it is curl then in curlrc etc...


                  3. I will export the http(s)_proxy with http://localhost:3128.You can set this environment variable for a particular session or you can set it putting it inside /etc/profile.d/

                  4. Done





                  share|improve this answer






















                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote









                    As shivams said there are various solutions for this.Just by exporting http_proxy you can't setup the connection. The way I will do setup the proxy will be as below,




                    1. First I will setup the authentication by running the cntlm.



                      a. To do that edit the /etc/cntlm.conf file by adding your username, password(you can also use hash generated for your password), domain, workstation and the proxy etc...



                      b. And I will listen to the port 3128.



                    2. I will setup the proxy for different applications or programs like for wget I will setup inside /etc/wgetrc, if it is curl then in curlrc etc...


                    3. I will export the http(s)_proxy with http://localhost:3128.You can set this environment variable for a particular session or you can set it putting it inside /etc/profile.d/

                    4. Done





                    share|improve this answer












                    As shivams said there are various solutions for this.Just by exporting http_proxy you can't setup the connection. The way I will do setup the proxy will be as below,




                    1. First I will setup the authentication by running the cntlm.



                      a. To do that edit the /etc/cntlm.conf file by adding your username, password(you can also use hash generated for your password), domain, workstation and the proxy etc...



                      b. And I will listen to the port 3128.



                    2. I will setup the proxy for different applications or programs like for wget I will setup inside /etc/wgetrc, if it is curl then in curlrc etc...


                    3. I will export the http(s)_proxy with http://localhost:3128.You can set this environment variable for a particular session or you can set it putting it inside /etc/profile.d/

                    4. Done






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jul 3 '15 at 15:30









                    Thushi

                    6,25921137




                    6,25921137




















                        up vote
                        0
                        down vote













                        To setup the proxy environment variable as a global variable, open /etc/profile file:



                        # vi /etc/profile


                        Add the following information:



                        export http_proxy=http://proxy-server.mycorp.com:3128/


                        OR



                        export http_proxy=http://USERNAME:PASSOWRD@proxy-server.mycorp.com:3128/





                        share|improve this answer


























                          up vote
                          0
                          down vote













                          To setup the proxy environment variable as a global variable, open /etc/profile file:



                          # vi /etc/profile


                          Add the following information:



                          export http_proxy=http://proxy-server.mycorp.com:3128/


                          OR



                          export http_proxy=http://USERNAME:PASSOWRD@proxy-server.mycorp.com:3128/





                          share|improve this answer
























                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            To setup the proxy environment variable as a global variable, open /etc/profile file:



                            # vi /etc/profile


                            Add the following information:



                            export http_proxy=http://proxy-server.mycorp.com:3128/


                            OR



                            export http_proxy=http://USERNAME:PASSOWRD@proxy-server.mycorp.com:3128/





                            share|improve this answer














                            To setup the proxy environment variable as a global variable, open /etc/profile file:



                            # vi /etc/profile


                            Add the following information:



                            export http_proxy=http://proxy-server.mycorp.com:3128/


                            OR



                            export http_proxy=http://USERNAME:PASSOWRD@proxy-server.mycorp.com:3128/






                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Jul 3 '15 at 15:55









                            slm

                            246k66507673




                            246k66507673










                            answered Jul 3 '15 at 15:45









                            Carlos Andres Caro Perez

                            11




                            11




















                                up vote
                                0
                                down vote













                                You can set proxy in settings preference and it will reflect everywhere



                                enter image description here






                                share|improve this answer
























                                  up vote
                                  0
                                  down vote













                                  You can set proxy in settings preference and it will reflect everywhere



                                  enter image description here






                                  share|improve this answer






















                                    up vote
                                    0
                                    down vote










                                    up vote
                                    0
                                    down vote









                                    You can set proxy in settings preference and it will reflect everywhere



                                    enter image description here






                                    share|improve this answer












                                    You can set proxy in settings preference and it will reflect everywhere



                                    enter image description here







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Dec 6 at 11:06









                                    Hitesh Sahu

                                    1011




                                    1011



























                                        draft saved

                                        draft discarded
















































                                        Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid


                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.

                                        To learn more, see our tips on writing great answers.





                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                        Please pay close attention to the following guidance:


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid


                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.

                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f213737%2fhow-do-i-set-systemwide-connection-over-a-proxy-server%23new-answer', 'question_page');

                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown






                                        Popular posts from this blog

                                        How to check contact read email or not when send email to Individual?

                                        Displaying single band from multi-band raster using QGIS

                                        How many registers does an x86_64 CPU actually have?