Connecting to a headless machine that is connected to a hotspot connected to my main network











up vote
0
down vote

favorite












Sorry for the mouthful of a title, hopefully this diagram will make some sense of it;



Network Diagram



The solution I have right now is to connect my main workstation to the Raspberry Pi network, then connect to the headless machine via local remote desktop (as both my main workstation and headless workstation are connected to the Raspberry Pi) via this local IP, 192.168.42.1 which works fine.



I would like to be able to connect to the headless machine from my main workstation without having to switch to the Raspberry Pi network thus staying connected to my main host network. I would use a program like Teamviewer but I need the remote connection to be done locally for latency reasons. Of course the IP 192.168.42.1 wont work when connected to my home network is there some way of bridging or making this sort of a connection even possible?










share|improve this question




























    up vote
    0
    down vote

    favorite












    Sorry for the mouthful of a title, hopefully this diagram will make some sense of it;



    Network Diagram



    The solution I have right now is to connect my main workstation to the Raspberry Pi network, then connect to the headless machine via local remote desktop (as both my main workstation and headless workstation are connected to the Raspberry Pi) via this local IP, 192.168.42.1 which works fine.



    I would like to be able to connect to the headless machine from my main workstation without having to switch to the Raspberry Pi network thus staying connected to my main host network. I would use a program like Teamviewer but I need the remote connection to be done locally for latency reasons. Of course the IP 192.168.42.1 wont work when connected to my home network is there some way of bridging or making this sort of a connection even possible?










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Sorry for the mouthful of a title, hopefully this diagram will make some sense of it;



      Network Diagram



      The solution I have right now is to connect my main workstation to the Raspberry Pi network, then connect to the headless machine via local remote desktop (as both my main workstation and headless workstation are connected to the Raspberry Pi) via this local IP, 192.168.42.1 which works fine.



      I would like to be able to connect to the headless machine from my main workstation without having to switch to the Raspberry Pi network thus staying connected to my main host network. I would use a program like Teamviewer but I need the remote connection to be done locally for latency reasons. Of course the IP 192.168.42.1 wont work when connected to my home network is there some way of bridging or making this sort of a connection even possible?










      share|improve this question















      Sorry for the mouthful of a title, hopefully this diagram will make some sense of it;



      Network Diagram



      The solution I have right now is to connect my main workstation to the Raspberry Pi network, then connect to the headless machine via local remote desktop (as both my main workstation and headless workstation are connected to the Raspberry Pi) via this local IP, 192.168.42.1 which works fine.



      I would like to be able to connect to the headless machine from my main workstation without having to switch to the Raspberry Pi network thus staying connected to my main host network. I would use a program like Teamviewer but I need the remote connection to be done locally for latency reasons. Of course the IP 192.168.42.1 wont work when connected to my home network is there some way of bridging or making this sort of a connection even possible?







      networking remote-desktop raspberry-pi hostapd






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 3 at 6:10









      grawity

      230k35486544




      230k35486544










      asked Dec 3 at 3:24









      MrBlobby

      52




      52






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          This already sounds like a duplicate of so many questions... but here you go anyway:




          is there some way of bridging or making this sort of a connection even possible?




          Yes, it's literally what a router is there to do.



          The main router, labelled "Home Network (Router)", needs a route describing this connection:




          • Destination: 192.168.42.0/24 (mask 255.255.255.0)

          • Gateway: 192.168.1.65


          Add this through the router's "Static Routes" configuration page. I tried to guess the destination network's prefixlen (netmask), adjust if necessary.



          If the "router" doesn't offer this function, plan B is to add the route directly on the Main Workstation instead (e.g. using route -p add if it runs Windows). Of course, that way it'll only affect this one computer.



          The Raspberry Pi, and/or the Headless Machine, also need a route in the inverse direction. However, in your case that's already covered by an automatic "local subnet" route on the Pi (or in many other cases by the "default gateway" route), so you don't need to do anything special.



          The firewall configuration on Raspberry Pi must allow connections from the home network's IP address range. Ideally, it should also avoid performing NAT for packets to this range (that is, a subnet-specific 'ACCEPT' rule above the generic 'MASQUERADE' one), but thanks to conntrack, outbound replies to inbound connections already bypass it anyway.






          share|improve this answer



















          • 1




            Thank you, to confirm I did not have the ability to set a Static Route via my router so I went ahead and launched an elevated command prompt from my main workstation (windows 10) and my input was "route -p add 192.168.42.0/24 MASK 255.255.255.0 192.168.1.65". I am now able to connect to the headless machine that is connected to the Raspberry Pi (by proxy to my home network). I did try to look up for solutions but peoples use cases seemed to be different and I was only able to find information on what I now know would have been setting a static route via the router settings. Again, thank you.
            – MrBlobby
            Dec 3 at 6:56










          • For the record, since Windows understands 192.168.42.0/24, you do not need to specify the mask ... anymore, because the prefix length "/24" provides the same information. (On the other hand, many home routers don't have a field for prefix length, so they require the mask instead.)
            – grawity
            Dec 3 at 8:48













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          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: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2fsuperuser.com%2fquestions%2f1380305%2fconnecting-to-a-headless-machine-that-is-connected-to-a-hotspot-connected-to-my%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          This already sounds like a duplicate of so many questions... but here you go anyway:




          is there some way of bridging or making this sort of a connection even possible?




          Yes, it's literally what a router is there to do.



          The main router, labelled "Home Network (Router)", needs a route describing this connection:




          • Destination: 192.168.42.0/24 (mask 255.255.255.0)

          • Gateway: 192.168.1.65


          Add this through the router's "Static Routes" configuration page. I tried to guess the destination network's prefixlen (netmask), adjust if necessary.



          If the "router" doesn't offer this function, plan B is to add the route directly on the Main Workstation instead (e.g. using route -p add if it runs Windows). Of course, that way it'll only affect this one computer.



          The Raspberry Pi, and/or the Headless Machine, also need a route in the inverse direction. However, in your case that's already covered by an automatic "local subnet" route on the Pi (or in many other cases by the "default gateway" route), so you don't need to do anything special.



          The firewall configuration on Raspberry Pi must allow connections from the home network's IP address range. Ideally, it should also avoid performing NAT for packets to this range (that is, a subnet-specific 'ACCEPT' rule above the generic 'MASQUERADE' one), but thanks to conntrack, outbound replies to inbound connections already bypass it anyway.






          share|improve this answer



















          • 1




            Thank you, to confirm I did not have the ability to set a Static Route via my router so I went ahead and launched an elevated command prompt from my main workstation (windows 10) and my input was "route -p add 192.168.42.0/24 MASK 255.255.255.0 192.168.1.65". I am now able to connect to the headless machine that is connected to the Raspberry Pi (by proxy to my home network). I did try to look up for solutions but peoples use cases seemed to be different and I was only able to find information on what I now know would have been setting a static route via the router settings. Again, thank you.
            – MrBlobby
            Dec 3 at 6:56










          • For the record, since Windows understands 192.168.42.0/24, you do not need to specify the mask ... anymore, because the prefix length "/24" provides the same information. (On the other hand, many home routers don't have a field for prefix length, so they require the mask instead.)
            – grawity
            Dec 3 at 8:48

















          up vote
          0
          down vote



          accepted










          This already sounds like a duplicate of so many questions... but here you go anyway:




          is there some way of bridging or making this sort of a connection even possible?




          Yes, it's literally what a router is there to do.



          The main router, labelled "Home Network (Router)", needs a route describing this connection:




          • Destination: 192.168.42.0/24 (mask 255.255.255.0)

          • Gateway: 192.168.1.65


          Add this through the router's "Static Routes" configuration page. I tried to guess the destination network's prefixlen (netmask), adjust if necessary.



          If the "router" doesn't offer this function, plan B is to add the route directly on the Main Workstation instead (e.g. using route -p add if it runs Windows). Of course, that way it'll only affect this one computer.



          The Raspberry Pi, and/or the Headless Machine, also need a route in the inverse direction. However, in your case that's already covered by an automatic "local subnet" route on the Pi (or in many other cases by the "default gateway" route), so you don't need to do anything special.



          The firewall configuration on Raspberry Pi must allow connections from the home network's IP address range. Ideally, it should also avoid performing NAT for packets to this range (that is, a subnet-specific 'ACCEPT' rule above the generic 'MASQUERADE' one), but thanks to conntrack, outbound replies to inbound connections already bypass it anyway.






          share|improve this answer



















          • 1




            Thank you, to confirm I did not have the ability to set a Static Route via my router so I went ahead and launched an elevated command prompt from my main workstation (windows 10) and my input was "route -p add 192.168.42.0/24 MASK 255.255.255.0 192.168.1.65". I am now able to connect to the headless machine that is connected to the Raspberry Pi (by proxy to my home network). I did try to look up for solutions but peoples use cases seemed to be different and I was only able to find information on what I now know would have been setting a static route via the router settings. Again, thank you.
            – MrBlobby
            Dec 3 at 6:56










          • For the record, since Windows understands 192.168.42.0/24, you do not need to specify the mask ... anymore, because the prefix length "/24" provides the same information. (On the other hand, many home routers don't have a field for prefix length, so they require the mask instead.)
            – grawity
            Dec 3 at 8:48















          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          This already sounds like a duplicate of so many questions... but here you go anyway:




          is there some way of bridging or making this sort of a connection even possible?




          Yes, it's literally what a router is there to do.



          The main router, labelled "Home Network (Router)", needs a route describing this connection:




          • Destination: 192.168.42.0/24 (mask 255.255.255.0)

          • Gateway: 192.168.1.65


          Add this through the router's "Static Routes" configuration page. I tried to guess the destination network's prefixlen (netmask), adjust if necessary.



          If the "router" doesn't offer this function, plan B is to add the route directly on the Main Workstation instead (e.g. using route -p add if it runs Windows). Of course, that way it'll only affect this one computer.



          The Raspberry Pi, and/or the Headless Machine, also need a route in the inverse direction. However, in your case that's already covered by an automatic "local subnet" route on the Pi (or in many other cases by the "default gateway" route), so you don't need to do anything special.



          The firewall configuration on Raspberry Pi must allow connections from the home network's IP address range. Ideally, it should also avoid performing NAT for packets to this range (that is, a subnet-specific 'ACCEPT' rule above the generic 'MASQUERADE' one), but thanks to conntrack, outbound replies to inbound connections already bypass it anyway.






          share|improve this answer














          This already sounds like a duplicate of so many questions... but here you go anyway:




          is there some way of bridging or making this sort of a connection even possible?




          Yes, it's literally what a router is there to do.



          The main router, labelled "Home Network (Router)", needs a route describing this connection:




          • Destination: 192.168.42.0/24 (mask 255.255.255.0)

          • Gateway: 192.168.1.65


          Add this through the router's "Static Routes" configuration page. I tried to guess the destination network's prefixlen (netmask), adjust if necessary.



          If the "router" doesn't offer this function, plan B is to add the route directly on the Main Workstation instead (e.g. using route -p add if it runs Windows). Of course, that way it'll only affect this one computer.



          The Raspberry Pi, and/or the Headless Machine, also need a route in the inverse direction. However, in your case that's already covered by an automatic "local subnet" route on the Pi (or in many other cases by the "default gateway" route), so you don't need to do anything special.



          The firewall configuration on Raspberry Pi must allow connections from the home network's IP address range. Ideally, it should also avoid performing NAT for packets to this range (that is, a subnet-specific 'ACCEPT' rule above the generic 'MASQUERADE' one), but thanks to conntrack, outbound replies to inbound connections already bypass it anyway.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 3 at 8:55

























          answered Dec 3 at 6:09









          grawity

          230k35486544




          230k35486544








          • 1




            Thank you, to confirm I did not have the ability to set a Static Route via my router so I went ahead and launched an elevated command prompt from my main workstation (windows 10) and my input was "route -p add 192.168.42.0/24 MASK 255.255.255.0 192.168.1.65". I am now able to connect to the headless machine that is connected to the Raspberry Pi (by proxy to my home network). I did try to look up for solutions but peoples use cases seemed to be different and I was only able to find information on what I now know would have been setting a static route via the router settings. Again, thank you.
            – MrBlobby
            Dec 3 at 6:56










          • For the record, since Windows understands 192.168.42.0/24, you do not need to specify the mask ... anymore, because the prefix length "/24" provides the same information. (On the other hand, many home routers don't have a field for prefix length, so they require the mask instead.)
            – grawity
            Dec 3 at 8:48
















          • 1




            Thank you, to confirm I did not have the ability to set a Static Route via my router so I went ahead and launched an elevated command prompt from my main workstation (windows 10) and my input was "route -p add 192.168.42.0/24 MASK 255.255.255.0 192.168.1.65". I am now able to connect to the headless machine that is connected to the Raspberry Pi (by proxy to my home network). I did try to look up for solutions but peoples use cases seemed to be different and I was only able to find information on what I now know would have been setting a static route via the router settings. Again, thank you.
            – MrBlobby
            Dec 3 at 6:56










          • For the record, since Windows understands 192.168.42.0/24, you do not need to specify the mask ... anymore, because the prefix length "/24" provides the same information. (On the other hand, many home routers don't have a field for prefix length, so they require the mask instead.)
            – grawity
            Dec 3 at 8:48










          1




          1




          Thank you, to confirm I did not have the ability to set a Static Route via my router so I went ahead and launched an elevated command prompt from my main workstation (windows 10) and my input was "route -p add 192.168.42.0/24 MASK 255.255.255.0 192.168.1.65". I am now able to connect to the headless machine that is connected to the Raspberry Pi (by proxy to my home network). I did try to look up for solutions but peoples use cases seemed to be different and I was only able to find information on what I now know would have been setting a static route via the router settings. Again, thank you.
          – MrBlobby
          Dec 3 at 6:56




          Thank you, to confirm I did not have the ability to set a Static Route via my router so I went ahead and launched an elevated command prompt from my main workstation (windows 10) and my input was "route -p add 192.168.42.0/24 MASK 255.255.255.0 192.168.1.65". I am now able to connect to the headless machine that is connected to the Raspberry Pi (by proxy to my home network). I did try to look up for solutions but peoples use cases seemed to be different and I was only able to find information on what I now know would have been setting a static route via the router settings. Again, thank you.
          – MrBlobby
          Dec 3 at 6:56












          For the record, since Windows understands 192.168.42.0/24, you do not need to specify the mask ... anymore, because the prefix length "/24" provides the same information. (On the other hand, many home routers don't have a field for prefix length, so they require the mask instead.)
          – grawity
          Dec 3 at 8:48






          For the record, since Windows understands 192.168.42.0/24, you do not need to specify the mask ... anymore, because the prefix length "/24" provides the same information. (On the other hand, many home routers don't have a field for prefix length, so they require the mask instead.)
          – grawity
          Dec 3 at 8:48




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • 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%2fsuperuser.com%2fquestions%2f1380305%2fconnecting-to-a-headless-machine-that-is-connected-to-a-hotspot-connected-to-my%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

          Mouse cursor on multiple screens with different PPI

          Agildo Ribeiro

          Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”