Command line connect to L2TP Windows Server VPN

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








up vote
3
down vote

favorite
1












I have been searching for a couple of days not much luck as and everything i come across relies on using the Network Manager UI.



Could someone provide me with a noobish tutorial on how I would configure the ubuntu server to automatically (on startup) connect to an L2TP over IPSec VPN with Windows Login credentials?



It does not have to be L2TP over IPSec, I do also have the Windows Server configured to allow PPTP VPN connections but I would prefer L2TP as it's more secure.



I would also need to know if there is a special configuration I need to prevent the Internet connection being tunneled through the VPN as I know windows does this by default and it has to be turned off on the VPN Network Adapter in windows if the same need to happen on the Ubuntu server I will need to know how to do that so I don't lock myself out of the server by it losing its internet connection :D



The reason for this is that I have quite a lot of attempts on the SSH Port's so I want to set the Hardware Firewall in front of the server to not allow SSH through it and make it so the only way to connect to the SSH server is via the Corporate VPN.










share|improve this question



























    up vote
    3
    down vote

    favorite
    1












    I have been searching for a couple of days not much luck as and everything i come across relies on using the Network Manager UI.



    Could someone provide me with a noobish tutorial on how I would configure the ubuntu server to automatically (on startup) connect to an L2TP over IPSec VPN with Windows Login credentials?



    It does not have to be L2TP over IPSec, I do also have the Windows Server configured to allow PPTP VPN connections but I would prefer L2TP as it's more secure.



    I would also need to know if there is a special configuration I need to prevent the Internet connection being tunneled through the VPN as I know windows does this by default and it has to be turned off on the VPN Network Adapter in windows if the same need to happen on the Ubuntu server I will need to know how to do that so I don't lock myself out of the server by it losing its internet connection :D



    The reason for this is that I have quite a lot of attempts on the SSH Port's so I want to set the Hardware Firewall in front of the server to not allow SSH through it and make it so the only way to connect to the SSH server is via the Corporate VPN.










    share|improve this question

























      up vote
      3
      down vote

      favorite
      1









      up vote
      3
      down vote

      favorite
      1






      1





      I have been searching for a couple of days not much luck as and everything i come across relies on using the Network Manager UI.



      Could someone provide me with a noobish tutorial on how I would configure the ubuntu server to automatically (on startup) connect to an L2TP over IPSec VPN with Windows Login credentials?



      It does not have to be L2TP over IPSec, I do also have the Windows Server configured to allow PPTP VPN connections but I would prefer L2TP as it's more secure.



      I would also need to know if there is a special configuration I need to prevent the Internet connection being tunneled through the VPN as I know windows does this by default and it has to be turned off on the VPN Network Adapter in windows if the same need to happen on the Ubuntu server I will need to know how to do that so I don't lock myself out of the server by it losing its internet connection :D



      The reason for this is that I have quite a lot of attempts on the SSH Port's so I want to set the Hardware Firewall in front of the server to not allow SSH through it and make it so the only way to connect to the SSH server is via the Corporate VPN.










      share|improve this question















      I have been searching for a couple of days not much luck as and everything i come across relies on using the Network Manager UI.



      Could someone provide me with a noobish tutorial on how I would configure the ubuntu server to automatically (on startup) connect to an L2TP over IPSec VPN with Windows Login credentials?



      It does not have to be L2TP over IPSec, I do also have the Windows Server configured to allow PPTP VPN connections but I would prefer L2TP as it's more secure.



      I would also need to know if there is a special configuration I need to prevent the Internet connection being tunneled through the VPN as I know windows does this by default and it has to be turned off on the VPN Network Adapter in windows if the same need to happen on the Ubuntu server I will need to know how to do that so I don't lock myself out of the server by it losing its internet connection :D



      The reason for this is that I have quite a lot of attempts on the SSH Port's so I want to set the Hardware Firewall in front of the server to not allow SSH through it and make it so the only way to connect to the SSH server is via the Corporate VPN.







      16.04 command-line vpn






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 20 at 19:06

























      asked Mar 20 at 19:00









      Martin Barker

      665




      665

























          active

          oldest

          votes











          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',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2faskubuntu.com%2fquestions%2f1017717%2fcommand-line-connect-to-l2tp-windows-server-vpn%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1017717%2fcommand-line-connect-to-l2tp-windows-server-vpn%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491