Remotely Access Server using SSH with OpenVPN Client Running The 2019 Stack Overflow Developer Survey Results Are InHow to install openVPN server in Ubuntu 12.04 to have PPTP access using username and password?Can't access any remote network routes using OpenVPN clientOpenVPN TLS HandShake Failed with Linux Server/Windows ClientAccessing SSH server outside the local networkAdding a exception on the client side of OpenVPNConnecting to SSH server which is behind VPNCannot Access Remote Network IP & Host from Openvpn serverHow to make a killswitch for OpenVPN client running on a server that allows SSH connections into the server?Can't connect to VPS server (Ivacy using OpenVPN, Vultr VPS)Connected to OpenVPN Server but can't SSH

Limit the amount of RAM Mathematica may access?

I looked up a future colleague on LinkedIn before I started a job. I told my colleague about it and he seemed surprised. Should I apologize?

Should I use my personal or workplace e-mail when registering to external websites for work purpose?

Why isn't airport relocation done gradually?

Realistic Alternatives to Dust: What Else Could Feed a Plankton Bloom?

Monty Hall variation

What do the Banks children have against barley water?

What can other administrators access on my machine?

Lethal sonic weapons

Is this food a bread or a loaf?

Why can Shazam do this?

CiviEvent: Public link for events of a specific type

How to manage monthly salary

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

I see my dog run

How was Skylab's orbit inclination chosen?

How are circuits which use complex ICs normally simulated?

Unbreakable Formation vs. Cry of the Carnarium

What does "rabbited" mean/imply in this sentence?

Adding labels to a table: columns and rows

Why do some words that are not inflected have an umlaut?

What is the best strategy for white in this position?

"To split hairs" vs "To be pedantic"

Are there any other methods to apply to solving simultaneous equations?



Remotely Access Server using SSH with OpenVPN Client Running



The 2019 Stack Overflow Developer Survey Results Are InHow to install openVPN server in Ubuntu 12.04 to have PPTP access using username and password?Can't access any remote network routes using OpenVPN clientOpenVPN TLS HandShake Failed with Linux Server/Windows ClientAccessing SSH server outside the local networkAdding a exception on the client side of OpenVPNConnecting to SSH server which is behind VPNCannot Access Remote Network IP & Host from Openvpn serverHow to make a killswitch for OpenVPN client running on a server that allows SSH connections into the server?Can't connect to VPS server (Ivacy using OpenVPN, Vultr VPS)Connected to OpenVPN Server but can't SSH



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I've been using Ubuntu for years but still consider myself and newbie.



Prior to installing OpenVPN I used to be able to access my Ubuntu file server from the outside world by port forwarding port 22 on my ISP router to the IP address of my Ubuntu server. Worked perfectly.



However, I was looking at using an OpenVPN tunnel for a backup process I'm doing.
On my home network (behind the ISP Router) I've created a OpenVPN server using an old laptop. I then installed OpenVPN on my Ubuntu file server and ran it as a client. Once connected I'm able to access the VPN server laptop no trouble over tun0. However, I am no longer able to remotely access my file server from the outside world. I can SSH to it from inside my network using the non VPN IP address (using a computer not on the VPN).



After reading a number of posts I'm thinking that the Ubuntu file server is no longer using the router gateway for sending data, it using the VPN... which of course won't work. There are posts relating to using routing tables to change this but from what I understand this doesn't work with netplan... which is now used by Ubuntu?



I have no idea what to try and do next to get this work. Thanks in advance.










share|improve this question







New contributor




Andrew Blundon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    1















    I've been using Ubuntu for years but still consider myself and newbie.



    Prior to installing OpenVPN I used to be able to access my Ubuntu file server from the outside world by port forwarding port 22 on my ISP router to the IP address of my Ubuntu server. Worked perfectly.



    However, I was looking at using an OpenVPN tunnel for a backup process I'm doing.
    On my home network (behind the ISP Router) I've created a OpenVPN server using an old laptop. I then installed OpenVPN on my Ubuntu file server and ran it as a client. Once connected I'm able to access the VPN server laptop no trouble over tun0. However, I am no longer able to remotely access my file server from the outside world. I can SSH to it from inside my network using the non VPN IP address (using a computer not on the VPN).



    After reading a number of posts I'm thinking that the Ubuntu file server is no longer using the router gateway for sending data, it using the VPN... which of course won't work. There are posts relating to using routing tables to change this but from what I understand this doesn't work with netplan... which is now used by Ubuntu?



    I have no idea what to try and do next to get this work. Thanks in advance.










    share|improve this question







    New contributor




    Andrew Blundon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      1












      1








      1








      I've been using Ubuntu for years but still consider myself and newbie.



      Prior to installing OpenVPN I used to be able to access my Ubuntu file server from the outside world by port forwarding port 22 on my ISP router to the IP address of my Ubuntu server. Worked perfectly.



      However, I was looking at using an OpenVPN tunnel for a backup process I'm doing.
      On my home network (behind the ISP Router) I've created a OpenVPN server using an old laptop. I then installed OpenVPN on my Ubuntu file server and ran it as a client. Once connected I'm able to access the VPN server laptop no trouble over tun0. However, I am no longer able to remotely access my file server from the outside world. I can SSH to it from inside my network using the non VPN IP address (using a computer not on the VPN).



      After reading a number of posts I'm thinking that the Ubuntu file server is no longer using the router gateway for sending data, it using the VPN... which of course won't work. There are posts relating to using routing tables to change this but from what I understand this doesn't work with netplan... which is now used by Ubuntu?



      I have no idea what to try and do next to get this work. Thanks in advance.










      share|improve this question







      New contributor




      Andrew Blundon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I've been using Ubuntu for years but still consider myself and newbie.



      Prior to installing OpenVPN I used to be able to access my Ubuntu file server from the outside world by port forwarding port 22 on my ISP router to the IP address of my Ubuntu server. Worked perfectly.



      However, I was looking at using an OpenVPN tunnel for a backup process I'm doing.
      On my home network (behind the ISP Router) I've created a OpenVPN server using an old laptop. I then installed OpenVPN on my Ubuntu file server and ran it as a client. Once connected I'm able to access the VPN server laptop no trouble over tun0. However, I am no longer able to remotely access my file server from the outside world. I can SSH to it from inside my network using the non VPN IP address (using a computer not on the VPN).



      After reading a number of posts I'm thinking that the Ubuntu file server is no longer using the router gateway for sending data, it using the VPN... which of course won't work. There are posts relating to using routing tables to change this but from what I understand this doesn't work with netplan... which is now used by Ubuntu?



      I have no idea what to try and do next to get this work. Thanks in advance.







      networking server ssh vpn openvpn






      share|improve this question







      New contributor




      Andrew Blundon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Andrew Blundon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Andrew Blundon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 days ago









      Andrew BlundonAndrew Blundon

      63




      63




      New contributor




      Andrew Blundon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Andrew Blundon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Andrew Blundon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes


















          0














          Of course netplan works and you can set routing with it. But for this use case there is much easier solution, use sshuttle.



          • establish your VPN tunnel

          • sshuttle -r user@ip_of_vpn_server your_home_network_address

          • and suddenly your machine behaves like it was in your home network, you can access all your home IPs like from home

          Example



          • conenction to VPN server established

          • lets say VPN server address on VPN tunnel is 10.0.0.1

          • lets say your home network is 192.168.10.0/24

          • lets say you ssh to vpn server using user ubuntu

          • sshuttle -r ubuntu@10.0.0.1 192.168.10.0/24

          • that's it

          note: sshuttle will run iptables commands so it will use sudo






          share|improve this answer























          • Thanks... after I posted the question last night I realized that I may need more than SSH. For example, my file server runs insync (which is a linux intereface for Google Drive). It syncs some of my drive data with Google Drive online. Therefore, it also would need insync to have access to the outside world as well. Is there where I would need to use routing? Another option I thought of was that I only need my tunnel during a backup (middle of the night). I guess my backup script could turn the VPN client on before the backup and off after the backup???

            – Andrew Blundon
            yesterday












          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',
          autoActivateHeartbeat: false,
          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
          );



          );






          Andrew Blundon is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1132009%2fremotely-access-server-using-ssh-with-openvpn-client-running%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









          0














          Of course netplan works and you can set routing with it. But for this use case there is much easier solution, use sshuttle.



          • establish your VPN tunnel

          • sshuttle -r user@ip_of_vpn_server your_home_network_address

          • and suddenly your machine behaves like it was in your home network, you can access all your home IPs like from home

          Example



          • conenction to VPN server established

          • lets say VPN server address on VPN tunnel is 10.0.0.1

          • lets say your home network is 192.168.10.0/24

          • lets say you ssh to vpn server using user ubuntu

          • sshuttle -r ubuntu@10.0.0.1 192.168.10.0/24

          • that's it

          note: sshuttle will run iptables commands so it will use sudo






          share|improve this answer























          • Thanks... after I posted the question last night I realized that I may need more than SSH. For example, my file server runs insync (which is a linux intereface for Google Drive). It syncs some of my drive data with Google Drive online. Therefore, it also would need insync to have access to the outside world as well. Is there where I would need to use routing? Another option I thought of was that I only need my tunnel during a backup (middle of the night). I guess my backup script could turn the VPN client on before the backup and off after the backup???

            – Andrew Blundon
            yesterday
















          0














          Of course netplan works and you can set routing with it. But for this use case there is much easier solution, use sshuttle.



          • establish your VPN tunnel

          • sshuttle -r user@ip_of_vpn_server your_home_network_address

          • and suddenly your machine behaves like it was in your home network, you can access all your home IPs like from home

          Example



          • conenction to VPN server established

          • lets say VPN server address on VPN tunnel is 10.0.0.1

          • lets say your home network is 192.168.10.0/24

          • lets say you ssh to vpn server using user ubuntu

          • sshuttle -r ubuntu@10.0.0.1 192.168.10.0/24

          • that's it

          note: sshuttle will run iptables commands so it will use sudo






          share|improve this answer























          • Thanks... after I posted the question last night I realized that I may need more than SSH. For example, my file server runs insync (which is a linux intereface for Google Drive). It syncs some of my drive data with Google Drive online. Therefore, it also would need insync to have access to the outside world as well. Is there where I would need to use routing? Another option I thought of was that I only need my tunnel during a backup (middle of the night). I guess my backup script could turn the VPN client on before the backup and off after the backup???

            – Andrew Blundon
            yesterday














          0












          0








          0







          Of course netplan works and you can set routing with it. But for this use case there is much easier solution, use sshuttle.



          • establish your VPN tunnel

          • sshuttle -r user@ip_of_vpn_server your_home_network_address

          • and suddenly your machine behaves like it was in your home network, you can access all your home IPs like from home

          Example



          • conenction to VPN server established

          • lets say VPN server address on VPN tunnel is 10.0.0.1

          • lets say your home network is 192.168.10.0/24

          • lets say you ssh to vpn server using user ubuntu

          • sshuttle -r ubuntu@10.0.0.1 192.168.10.0/24

          • that's it

          note: sshuttle will run iptables commands so it will use sudo






          share|improve this answer













          Of course netplan works and you can set routing with it. But for this use case there is much easier solution, use sshuttle.



          • establish your VPN tunnel

          • sshuttle -r user@ip_of_vpn_server your_home_network_address

          • and suddenly your machine behaves like it was in your home network, you can access all your home IPs like from home

          Example



          • conenction to VPN server established

          • lets say VPN server address on VPN tunnel is 10.0.0.1

          • lets say your home network is 192.168.10.0/24

          • lets say you ssh to vpn server using user ubuntu

          • sshuttle -r ubuntu@10.0.0.1 192.168.10.0/24

          • that's it

          note: sshuttle will run iptables commands so it will use sudo







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 days ago









          marosgmarosg

          44437




          44437












          • Thanks... after I posted the question last night I realized that I may need more than SSH. For example, my file server runs insync (which is a linux intereface for Google Drive). It syncs some of my drive data with Google Drive online. Therefore, it also would need insync to have access to the outside world as well. Is there where I would need to use routing? Another option I thought of was that I only need my tunnel during a backup (middle of the night). I guess my backup script could turn the VPN client on before the backup and off after the backup???

            – Andrew Blundon
            yesterday


















          • Thanks... after I posted the question last night I realized that I may need more than SSH. For example, my file server runs insync (which is a linux intereface for Google Drive). It syncs some of my drive data with Google Drive online. Therefore, it also would need insync to have access to the outside world as well. Is there where I would need to use routing? Another option I thought of was that I only need my tunnel during a backup (middle of the night). I guess my backup script could turn the VPN client on before the backup and off after the backup???

            – Andrew Blundon
            yesterday

















          Thanks... after I posted the question last night I realized that I may need more than SSH. For example, my file server runs insync (which is a linux intereface for Google Drive). It syncs some of my drive data with Google Drive online. Therefore, it also would need insync to have access to the outside world as well. Is there where I would need to use routing? Another option I thought of was that I only need my tunnel during a backup (middle of the night). I guess my backup script could turn the VPN client on before the backup and off after the backup???

          – Andrew Blundon
          yesterday






          Thanks... after I posted the question last night I realized that I may need more than SSH. For example, my file server runs insync (which is a linux intereface for Google Drive). It syncs some of my drive data with Google Drive online. Therefore, it also would need insync to have access to the outside world as well. Is there where I would need to use routing? Another option I thought of was that I only need my tunnel during a backup (middle of the night). I guess my backup script could turn the VPN client on before the backup and off after the backup???

          – Andrew Blundon
          yesterday











          Andrew Blundon is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          Andrew Blundon is a new contributor. Be nice, and check out our Code of Conduct.












          Andrew Blundon is a new contributor. Be nice, and check out our Code of Conduct.











          Andrew Blundon is a new contributor. Be nice, and check out our Code of Conduct.














          Thanks for contributing an answer to Ask Ubuntu!


          • 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%2faskubuntu.com%2fquestions%2f1132009%2fremotely-access-server-using-ssh-with-openvpn-client-running%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

          Tamil (spriik) Luke uk diar | Nawigatjuun

          Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

          Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?