Direct traffic through remote machine

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











up vote
1
down vote

favorite












I have Machine A, which has internet access and has Tor running on port 9150. I have Machine B, which can't access the internet but can access Machine A via SSH. I want to run a command on Machine B (no internet machine); this command on Machine B accesses the internet. I want this command to go through Machine A port 9150. I don't have sudo access on Machine B, but I have sudo access on machine A.



How do I go about setting this up?







share|improve this question
























    up vote
    1
    down vote

    favorite












    I have Machine A, which has internet access and has Tor running on port 9150. I have Machine B, which can't access the internet but can access Machine A via SSH. I want to run a command on Machine B (no internet machine); this command on Machine B accesses the internet. I want this command to go through Machine A port 9150. I don't have sudo access on Machine B, but I have sudo access on machine A.



    How do I go about setting this up?







    share|improve this question






















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have Machine A, which has internet access and has Tor running on port 9150. I have Machine B, which can't access the internet but can access Machine A via SSH. I want to run a command on Machine B (no internet machine); this command on Machine B accesses the internet. I want this command to go through Machine A port 9150. I don't have sudo access on Machine B, but I have sudo access on machine A.



      How do I go about setting this up?







      share|improve this question












      I have Machine A, which has internet access and has Tor running on port 9150. I have Machine B, which can't access the internet but can access Machine A via SSH. I want to run a command on Machine B (no internet machine); this command on Machine B accesses the internet. I want this command to go through Machine A port 9150. I don't have sudo access on Machine B, but I have sudo access on machine A.



      How do I go about setting this up?









      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 25 '17 at 17:57









      sanjeev mk

      1061




      1061




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          If Tor is listening on localhost only, use SSH local port forwarding from Machine B:



          ssh user@machineA -L9150:localhost:9150


          This will effectively bind port 9150 on Machine B to port 9150 on Machine A.



          Or, if you can change the Tor daemon to listen on all interfaces on Machine A and no inbound firewall blocking this, you can ignore the SSH forwarding.



          In either case, you can then use a tool such as proxychains, configured appropriately, to prepend your commands such that they go over Tor:



          proxychains curl http://example.onion


          Proxychains is likely available through your package manager, but a newer version exists on GitHub at https://github.com/rofl0r/proxychains-ng. The default configuration will try to connect to a Tor SOCKS server on localhost, but this can be changed by modifying proxychains.conf if necessary.






          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: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f412994%2fdirect-traffic-through-remote-machine%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            If Tor is listening on localhost only, use SSH local port forwarding from Machine B:



            ssh user@machineA -L9150:localhost:9150


            This will effectively bind port 9150 on Machine B to port 9150 on Machine A.



            Or, if you can change the Tor daemon to listen on all interfaces on Machine A and no inbound firewall blocking this, you can ignore the SSH forwarding.



            In either case, you can then use a tool such as proxychains, configured appropriately, to prepend your commands such that they go over Tor:



            proxychains curl http://example.onion


            Proxychains is likely available through your package manager, but a newer version exists on GitHub at https://github.com/rofl0r/proxychains-ng. The default configuration will try to connect to a Tor SOCKS server on localhost, but this can be changed by modifying proxychains.conf if necessary.






            share|improve this answer
























              up vote
              0
              down vote













              If Tor is listening on localhost only, use SSH local port forwarding from Machine B:



              ssh user@machineA -L9150:localhost:9150


              This will effectively bind port 9150 on Machine B to port 9150 on Machine A.



              Or, if you can change the Tor daemon to listen on all interfaces on Machine A and no inbound firewall blocking this, you can ignore the SSH forwarding.



              In either case, you can then use a tool such as proxychains, configured appropriately, to prepend your commands such that they go over Tor:



              proxychains curl http://example.onion


              Proxychains is likely available through your package manager, but a newer version exists on GitHub at https://github.com/rofl0r/proxychains-ng. The default configuration will try to connect to a Tor SOCKS server on localhost, but this can be changed by modifying proxychains.conf if necessary.






              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                If Tor is listening on localhost only, use SSH local port forwarding from Machine B:



                ssh user@machineA -L9150:localhost:9150


                This will effectively bind port 9150 on Machine B to port 9150 on Machine A.



                Or, if you can change the Tor daemon to listen on all interfaces on Machine A and no inbound firewall blocking this, you can ignore the SSH forwarding.



                In either case, you can then use a tool such as proxychains, configured appropriately, to prepend your commands such that they go over Tor:



                proxychains curl http://example.onion


                Proxychains is likely available through your package manager, but a newer version exists on GitHub at https://github.com/rofl0r/proxychains-ng. The default configuration will try to connect to a Tor SOCKS server on localhost, but this can be changed by modifying proxychains.conf if necessary.






                share|improve this answer












                If Tor is listening on localhost only, use SSH local port forwarding from Machine B:



                ssh user@machineA -L9150:localhost:9150


                This will effectively bind port 9150 on Machine B to port 9150 on Machine A.



                Or, if you can change the Tor daemon to listen on all interfaces on Machine A and no inbound firewall blocking this, you can ignore the SSH forwarding.



                In either case, you can then use a tool such as proxychains, configured appropriately, to prepend your commands such that they go over Tor:



                proxychains curl http://example.onion


                Proxychains is likely available through your package manager, but a newer version exists on GitHub at https://github.com/rofl0r/proxychains-ng. The default configuration will try to connect to a Tor SOCKS server on localhost, but this can be changed by modifying proxychains.conf if necessary.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 25 '17 at 18:08









                multithr3at3d

                37618




                37618






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412994%2fdirect-traffic-through-remote-machine%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)