Running an OpenVPN server on a VPS and using the same VPS for openvpn socks proxy using ssh

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











up vote
0
down vote

favorite












I have a raspberry pi on which I set up an OpenVPN server (running on por 4444) using PiVPN. It works perefectly fine but I can't connect to it on my University Wifi because of DPI. So I decided to use OpenVPN over SSH.



I made a SOCKS proxy using the following command:



ssh -D8123 pi@my-pi-domain


I edited my client ovpn file to use this socks proxy:



client
dev tun
proto tcp
remote localhost 4444
socks-proxy localhost 8123
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
tls-version-min 1.2


The problem is, whenever I start openvpn client, my ssh prompt becomes inactive hence openvpn can't use my socks proxy. Is there any way to have my pi run the OpenVPN server while using itself for the SOCKS proxy?










share|improve this question







New contributor




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























    up vote
    0
    down vote

    favorite












    I have a raspberry pi on which I set up an OpenVPN server (running on por 4444) using PiVPN. It works perefectly fine but I can't connect to it on my University Wifi because of DPI. So I decided to use OpenVPN over SSH.



    I made a SOCKS proxy using the following command:



    ssh -D8123 pi@my-pi-domain


    I edited my client ovpn file to use this socks proxy:



    client
    dev tun
    proto tcp
    remote localhost 4444
    socks-proxy localhost 8123
    resolv-retry infinite
    nobind
    persist-key
    persist-tun
    remote-cert-tls server
    tls-version-min 1.2


    The problem is, whenever I start openvpn client, my ssh prompt becomes inactive hence openvpn can't use my socks proxy. Is there any way to have my pi run the OpenVPN server while using itself for the SOCKS proxy?










    share|improve this question







    New contributor




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





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a raspberry pi on which I set up an OpenVPN server (running on por 4444) using PiVPN. It works perefectly fine but I can't connect to it on my University Wifi because of DPI. So I decided to use OpenVPN over SSH.



      I made a SOCKS proxy using the following command:



      ssh -D8123 pi@my-pi-domain


      I edited my client ovpn file to use this socks proxy:



      client
      dev tun
      proto tcp
      remote localhost 4444
      socks-proxy localhost 8123
      resolv-retry infinite
      nobind
      persist-key
      persist-tun
      remote-cert-tls server
      tls-version-min 1.2


      The problem is, whenever I start openvpn client, my ssh prompt becomes inactive hence openvpn can't use my socks proxy. Is there any way to have my pi run the OpenVPN server while using itself for the SOCKS proxy?










      share|improve this question







      New contributor




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











      I have a raspberry pi on which I set up an OpenVPN server (running on por 4444) using PiVPN. It works perefectly fine but I can't connect to it on my University Wifi because of DPI. So I decided to use OpenVPN over SSH.



      I made a SOCKS proxy using the following command:



      ssh -D8123 pi@my-pi-domain


      I edited my client ovpn file to use this socks proxy:



      client
      dev tun
      proto tcp
      remote localhost 4444
      socks-proxy localhost 8123
      resolv-retry infinite
      nobind
      persist-key
      persist-tun
      remote-cert-tls server
      tls-version-min 1.2


      The problem is, whenever I start openvpn client, my ssh prompt becomes inactive hence openvpn can't use my socks proxy. Is there any way to have my pi run the OpenVPN server while using itself for the SOCKS proxy?







      ssh openvpn ssh-tunneling






      share|improve this question







      New contributor




      John Leaf 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




      John Leaf 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




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









      asked 25 mins ago









      John Leaf

      11




      11




      New contributor




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





      New contributor





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






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

























          active

          oldest

          votes











          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
          );



          );






          John Leaf 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%2funix.stackexchange.com%2fquestions%2f479783%2frunning-an-openvpn-server-on-a-vps-and-using-the-same-vps-for-openvpn-socks-prox%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          John Leaf is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          John Leaf is a new contributor. Be nice, and check out our Code of Conduct.












          John Leaf is a new contributor. Be nice, and check out our Code of Conduct.











          John Leaf 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%2funix.stackexchange.com%2fquestions%2f479783%2frunning-an-openvpn-server-on-a-vps-and-using-the-same-vps-for-openvpn-socks-prox%23new-answer', 'question_page');

          );

          Post as a guest