Can't do reverse SSH tunneling in LOCAL network

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











up vote
-1
down vote

favorite












I want to do reverse SSH tunneling in Local Network.



Machine_A = 192.168.0.3 running SSH server behind firewall,

Machine_B = 192.168.0.5 is allowed to access SSH server and is behind the firewall.
Machine_C = 192.168.0.2 can't connect B or C directly



192.168.0.3 has two users: userB, userC i.e., userB can access 192.168.0.3 but userC can't.



All machines are running LINUX. How can Machine_C achieve SSH connection using reverse SSH ? Do I need to enable Port forwarding in ROUTER?



In Machine_B I have to use: ssh -R 12345:localhost:22 _____? from Machine_C : ssh -p 12345 _______?










share|improve this question



























    up vote
    -1
    down vote

    favorite












    I want to do reverse SSH tunneling in Local Network.



    Machine_A = 192.168.0.3 running SSH server behind firewall,

    Machine_B = 192.168.0.5 is allowed to access SSH server and is behind the firewall.
    Machine_C = 192.168.0.2 can't connect B or C directly



    192.168.0.3 has two users: userB, userC i.e., userB can access 192.168.0.3 but userC can't.



    All machines are running LINUX. How can Machine_C achieve SSH connection using reverse SSH ? Do I need to enable Port forwarding in ROUTER?



    In Machine_B I have to use: ssh -R 12345:localhost:22 _____? from Machine_C : ssh -p 12345 _______?










    share|improve this question

























      up vote
      -1
      down vote

      favorite









      up vote
      -1
      down vote

      favorite











      I want to do reverse SSH tunneling in Local Network.



      Machine_A = 192.168.0.3 running SSH server behind firewall,

      Machine_B = 192.168.0.5 is allowed to access SSH server and is behind the firewall.
      Machine_C = 192.168.0.2 can't connect B or C directly



      192.168.0.3 has two users: userB, userC i.e., userB can access 192.168.0.3 but userC can't.



      All machines are running LINUX. How can Machine_C achieve SSH connection using reverse SSH ? Do I need to enable Port forwarding in ROUTER?



      In Machine_B I have to use: ssh -R 12345:localhost:22 _____? from Machine_C : ssh -p 12345 _______?










      share|improve this question















      I want to do reverse SSH tunneling in Local Network.



      Machine_A = 192.168.0.3 running SSH server behind firewall,

      Machine_B = 192.168.0.5 is allowed to access SSH server and is behind the firewall.
      Machine_C = 192.168.0.2 can't connect B or C directly



      192.168.0.3 has two users: userB, userC i.e., userB can access 192.168.0.3 but userC can't.



      All machines are running LINUX. How can Machine_C achieve SSH connection using reverse SSH ? Do I need to enable Port forwarding in ROUTER?



      In Machine_B I have to use: ssh -R 12345:localhost:22 _____? from Machine_C : ssh -p 12345 _______?







      ssh






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 28 at 17:02

























      asked Aug 28 at 16:20









      Biplab

      11




      11




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          On Machine_B



          ssh -g -L 12345:localhost:22 Machine_A


          On Machine_C



          ssh -p 12345 Machine_B





          share|improve this answer




















          • Sorry, I just realized that I asked the question wrong. Actually I want to establish reverse SSH tunnel where A,B both are behind firewall and A blocks all incoming request from C but allows OUTGOING connection. Sorry for inconvenience.
            – Biplab
            Aug 28 at 17:09










          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%2f465340%2fcant-do-reverse-ssh-tunneling-in-local-network%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













          On Machine_B



          ssh -g -L 12345:localhost:22 Machine_A


          On Machine_C



          ssh -p 12345 Machine_B





          share|improve this answer




















          • Sorry, I just realized that I asked the question wrong. Actually I want to establish reverse SSH tunnel where A,B both are behind firewall and A blocks all incoming request from C but allows OUTGOING connection. Sorry for inconvenience.
            – Biplab
            Aug 28 at 17:09














          up vote
          0
          down vote













          On Machine_B



          ssh -g -L 12345:localhost:22 Machine_A


          On Machine_C



          ssh -p 12345 Machine_B





          share|improve this answer




















          • Sorry, I just realized that I asked the question wrong. Actually I want to establish reverse SSH tunnel where A,B both are behind firewall and A blocks all incoming request from C but allows OUTGOING connection. Sorry for inconvenience.
            – Biplab
            Aug 28 at 17:09












          up vote
          0
          down vote










          up vote
          0
          down vote









          On Machine_B



          ssh -g -L 12345:localhost:22 Machine_A


          On Machine_C



          ssh -p 12345 Machine_B





          share|improve this answer












          On Machine_B



          ssh -g -L 12345:localhost:22 Machine_A


          On Machine_C



          ssh -p 12345 Machine_B






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 28 at 16:33









          RalfFriedl

          3,9151625




          3,9151625











          • Sorry, I just realized that I asked the question wrong. Actually I want to establish reverse SSH tunnel where A,B both are behind firewall and A blocks all incoming request from C but allows OUTGOING connection. Sorry for inconvenience.
            – Biplab
            Aug 28 at 17:09
















          • Sorry, I just realized that I asked the question wrong. Actually I want to establish reverse SSH tunnel where A,B both are behind firewall and A blocks all incoming request from C but allows OUTGOING connection. Sorry for inconvenience.
            – Biplab
            Aug 28 at 17:09















          Sorry, I just realized that I asked the question wrong. Actually I want to establish reverse SSH tunnel where A,B both are behind firewall and A blocks all incoming request from C but allows OUTGOING connection. Sorry for inconvenience.
          – Biplab
          Aug 28 at 17:09




          Sorry, I just realized that I asked the question wrong. Actually I want to establish reverse SSH tunnel where A,B both are behind firewall and A blocks all incoming request from C but allows OUTGOING connection. Sorry for inconvenience.
          – Biplab
          Aug 28 at 17:09

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f465340%2fcant-do-reverse-ssh-tunneling-in-local-network%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)