No internet over VPN connection

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








up vote
0
down vote

favorite












After setting up a connection to a VPN network, I can not make internet connection over the VPN. I get no response from network commands like e.g. tracepath ubuntu.com.

The protocol is pptp. My system is lubuntu 17.10, 32-bit (reviving an old pc).

Please provide guidelines for a correct installation, or debugging hints.










share|improve this question























  • Your title generally should not contain more information than the body of the question. :) Please add a lot more detail to your question. What you tried, what went wrong, command lines used, outputs, etc.
    – dpb
    Feb 18 at 20:22














up vote
0
down vote

favorite












After setting up a connection to a VPN network, I can not make internet connection over the VPN. I get no response from network commands like e.g. tracepath ubuntu.com.

The protocol is pptp. My system is lubuntu 17.10, 32-bit (reviving an old pc).

Please provide guidelines for a correct installation, or debugging hints.










share|improve this question























  • Your title generally should not contain more information than the body of the question. :) Please add a lot more detail to your question. What you tried, what went wrong, command lines used, outputs, etc.
    – dpb
    Feb 18 at 20:22












up vote
0
down vote

favorite









up vote
0
down vote

favorite











After setting up a connection to a VPN network, I can not make internet connection over the VPN. I get no response from network commands like e.g. tracepath ubuntu.com.

The protocol is pptp. My system is lubuntu 17.10, 32-bit (reviving an old pc).

Please provide guidelines for a correct installation, or debugging hints.










share|improve this question















After setting up a connection to a VPN network, I can not make internet connection over the VPN. I get no response from network commands like e.g. tracepath ubuntu.com.

The protocol is pptp. My system is lubuntu 17.10, 32-bit (reviving an old pc).

Please provide guidelines for a correct installation, or debugging hints.







lubuntu vpn pptp






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 19 at 18:49

























asked Feb 17 at 19:11









oscar1919

29226




29226











  • Your title generally should not contain more information than the body of the question. :) Please add a lot more detail to your question. What you tried, what went wrong, command lines used, outputs, etc.
    – dpb
    Feb 18 at 20:22
















  • Your title generally should not contain more information than the body of the question. :) Please add a lot more detail to your question. What you tried, what went wrong, command lines used, outputs, etc.
    – dpb
    Feb 18 at 20:22















Your title generally should not contain more information than the body of the question. :) Please add a lot more detail to your question. What you tried, what went wrong, command lines used, outputs, etc.
– dpb
Feb 18 at 20:22




Your title generally should not contain more information than the body of the question. :) Please add a lot more detail to your question. What you tried, what went wrong, command lines used, outputs, etc.
– dpb
Feb 18 at 20:22










1 Answer
1






active

oldest

votes

















up vote
1
down vote













Finally, I got this up and running and want to share my findings on this forum.
The info I needed seems to be scattered around different sites.




  • Configure VPN ... in VPN Connections is greyed out.

    Inconvenient, and I don't know how to solve, but there is a workaround.

    Go through Edit Connections... and press +. However, in the Connection Type, no VPN's are listed.

  • I (re-)installed the necessary modules for vpn connection, with
    sudo apt-get install --reinstall network-manager network-manager-gnome openvpn
    network-manager-openvpn network-manager-openvpn-gnome
    network-manager-pptp network-manager-pptp-gnome pptp-linux


  • Now it is possible to add a pptp connection as described under the first bullet. Configure it with credentials and settings as given by the VPN provider.

  • To avoid firewall problems, try first with UncomplicatedFirewall off. sudo ufw disable and reboot.

  • After this : VPN Connections -> new_vpn establishes the VPN connection. However, in my case it was not possible to access the internet.
    It feels like the connection breaks after the first site, or it takes forever to load any site.

  • The cure for this problem I found here.
    Apparently the mtu, maximum transmission unit, for the vpn port is too high. In my case I have to lower it manually by executing
    ifconfig ppp0 mtu 1388

  • The maximum mtu which is suitable can be found by connecting to the vpn and then pinging some site (e.g. ubuntu.com) by executing
    ping -M do -s <number> -c 1 ubuntu.com. Increase <number> by 10 until the connection is lost (once it is lost, in my case it also fails when lowering again)
    I had to revive the connection by sudo service network-manager restart and connecting again to the vpn. Once you find the highest usable <number>, add 28 and that
    is the mtu to use with the vpn port. See also here.


  • Still two problems left, how to automate the setting of the mtu value when connecting to the VPN, and DNS seems to be gone after disconnecting from the VPN.
    The latter can be solved by sudo service network-manager restart. Both tasks can be automated as suggested in script
    /etc/NetworkManager/dispatcher.d/01-ifupdown. Scripts in the dispatcher.d folder are called with the port and event as argument.
    So, I create an executable script in this folder, as below
    #!/bin/sh



    #info : pre-up and pre-down are not implemented in network-manager

    if [ "$2" = "vpn-up" ]; then
    /sbin/ifconfig "$1" mtu 1388
    fi

    if [ "$2" = "vpn-down" ]; then
    /usr/sbin/service network-manager restart
    fi


  • Finally, I want to enable ufw again. For this I need to add -A ufw-before-input -p 47 -j ACCEPT in file /etc/ufw/before.rules, just before
    # drop invalid packets and do sudo ufw enable, and reboot.
    Now everything works fine, in my case.


  • Later I found that another (and probably better) way to get the dns back is to store the package resolvconf.
    sudo apt install resolvconf
    sudo dpkg-reconfigure resolvconf

    Then the vpn-down part of the script can be deleted.






share|improve this answer






















    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%2f1007171%2fno-internet-over-vpn-connection%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
    1
    down vote













    Finally, I got this up and running and want to share my findings on this forum.
    The info I needed seems to be scattered around different sites.




    • Configure VPN ... in VPN Connections is greyed out.

      Inconvenient, and I don't know how to solve, but there is a workaround.

      Go through Edit Connections... and press +. However, in the Connection Type, no VPN's are listed.

    • I (re-)installed the necessary modules for vpn connection, with
      sudo apt-get install --reinstall network-manager network-manager-gnome openvpn
      network-manager-openvpn network-manager-openvpn-gnome
      network-manager-pptp network-manager-pptp-gnome pptp-linux


    • Now it is possible to add a pptp connection as described under the first bullet. Configure it with credentials and settings as given by the VPN provider.

    • To avoid firewall problems, try first with UncomplicatedFirewall off. sudo ufw disable and reboot.

    • After this : VPN Connections -> new_vpn establishes the VPN connection. However, in my case it was not possible to access the internet.
      It feels like the connection breaks after the first site, or it takes forever to load any site.

    • The cure for this problem I found here.
      Apparently the mtu, maximum transmission unit, for the vpn port is too high. In my case I have to lower it manually by executing
      ifconfig ppp0 mtu 1388

    • The maximum mtu which is suitable can be found by connecting to the vpn and then pinging some site (e.g. ubuntu.com) by executing
      ping -M do -s <number> -c 1 ubuntu.com. Increase <number> by 10 until the connection is lost (once it is lost, in my case it also fails when lowering again)
      I had to revive the connection by sudo service network-manager restart and connecting again to the vpn. Once you find the highest usable <number>, add 28 and that
      is the mtu to use with the vpn port. See also here.


    • Still two problems left, how to automate the setting of the mtu value when connecting to the VPN, and DNS seems to be gone after disconnecting from the VPN.
      The latter can be solved by sudo service network-manager restart. Both tasks can be automated as suggested in script
      /etc/NetworkManager/dispatcher.d/01-ifupdown. Scripts in the dispatcher.d folder are called with the port and event as argument.
      So, I create an executable script in this folder, as below
      #!/bin/sh



      #info : pre-up and pre-down are not implemented in network-manager

      if [ "$2" = "vpn-up" ]; then
      /sbin/ifconfig "$1" mtu 1388
      fi

      if [ "$2" = "vpn-down" ]; then
      /usr/sbin/service network-manager restart
      fi


    • Finally, I want to enable ufw again. For this I need to add -A ufw-before-input -p 47 -j ACCEPT in file /etc/ufw/before.rules, just before
      # drop invalid packets and do sudo ufw enable, and reboot.
      Now everything works fine, in my case.


    • Later I found that another (and probably better) way to get the dns back is to store the package resolvconf.
      sudo apt install resolvconf
      sudo dpkg-reconfigure resolvconf

      Then the vpn-down part of the script can be deleted.






    share|improve this answer


























      up vote
      1
      down vote













      Finally, I got this up and running and want to share my findings on this forum.
      The info I needed seems to be scattered around different sites.




      • Configure VPN ... in VPN Connections is greyed out.

        Inconvenient, and I don't know how to solve, but there is a workaround.

        Go through Edit Connections... and press +. However, in the Connection Type, no VPN's are listed.

      • I (re-)installed the necessary modules for vpn connection, with
        sudo apt-get install --reinstall network-manager network-manager-gnome openvpn
        network-manager-openvpn network-manager-openvpn-gnome
        network-manager-pptp network-manager-pptp-gnome pptp-linux


      • Now it is possible to add a pptp connection as described under the first bullet. Configure it with credentials and settings as given by the VPN provider.

      • To avoid firewall problems, try first with UncomplicatedFirewall off. sudo ufw disable and reboot.

      • After this : VPN Connections -> new_vpn establishes the VPN connection. However, in my case it was not possible to access the internet.
        It feels like the connection breaks after the first site, or it takes forever to load any site.

      • The cure for this problem I found here.
        Apparently the mtu, maximum transmission unit, for the vpn port is too high. In my case I have to lower it manually by executing
        ifconfig ppp0 mtu 1388

      • The maximum mtu which is suitable can be found by connecting to the vpn and then pinging some site (e.g. ubuntu.com) by executing
        ping -M do -s <number> -c 1 ubuntu.com. Increase <number> by 10 until the connection is lost (once it is lost, in my case it also fails when lowering again)
        I had to revive the connection by sudo service network-manager restart and connecting again to the vpn. Once you find the highest usable <number>, add 28 and that
        is the mtu to use with the vpn port. See also here.


      • Still two problems left, how to automate the setting of the mtu value when connecting to the VPN, and DNS seems to be gone after disconnecting from the VPN.
        The latter can be solved by sudo service network-manager restart. Both tasks can be automated as suggested in script
        /etc/NetworkManager/dispatcher.d/01-ifupdown. Scripts in the dispatcher.d folder are called with the port and event as argument.
        So, I create an executable script in this folder, as below
        #!/bin/sh



        #info : pre-up and pre-down are not implemented in network-manager

        if [ "$2" = "vpn-up" ]; then
        /sbin/ifconfig "$1" mtu 1388
        fi

        if [ "$2" = "vpn-down" ]; then
        /usr/sbin/service network-manager restart
        fi


      • Finally, I want to enable ufw again. For this I need to add -A ufw-before-input -p 47 -j ACCEPT in file /etc/ufw/before.rules, just before
        # drop invalid packets and do sudo ufw enable, and reboot.
        Now everything works fine, in my case.


      • Later I found that another (and probably better) way to get the dns back is to store the package resolvconf.
        sudo apt install resolvconf
        sudo dpkg-reconfigure resolvconf

        Then the vpn-down part of the script can be deleted.






      share|improve this answer
























        up vote
        1
        down vote










        up vote
        1
        down vote









        Finally, I got this up and running and want to share my findings on this forum.
        The info I needed seems to be scattered around different sites.




        • Configure VPN ... in VPN Connections is greyed out.

          Inconvenient, and I don't know how to solve, but there is a workaround.

          Go through Edit Connections... and press +. However, in the Connection Type, no VPN's are listed.

        • I (re-)installed the necessary modules for vpn connection, with
          sudo apt-get install --reinstall network-manager network-manager-gnome openvpn
          network-manager-openvpn network-manager-openvpn-gnome
          network-manager-pptp network-manager-pptp-gnome pptp-linux


        • Now it is possible to add a pptp connection as described under the first bullet. Configure it with credentials and settings as given by the VPN provider.

        • To avoid firewall problems, try first with UncomplicatedFirewall off. sudo ufw disable and reboot.

        • After this : VPN Connections -> new_vpn establishes the VPN connection. However, in my case it was not possible to access the internet.
          It feels like the connection breaks after the first site, or it takes forever to load any site.

        • The cure for this problem I found here.
          Apparently the mtu, maximum transmission unit, for the vpn port is too high. In my case I have to lower it manually by executing
          ifconfig ppp0 mtu 1388

        • The maximum mtu which is suitable can be found by connecting to the vpn and then pinging some site (e.g. ubuntu.com) by executing
          ping -M do -s <number> -c 1 ubuntu.com. Increase <number> by 10 until the connection is lost (once it is lost, in my case it also fails when lowering again)
          I had to revive the connection by sudo service network-manager restart and connecting again to the vpn. Once you find the highest usable <number>, add 28 and that
          is the mtu to use with the vpn port. See also here.


        • Still two problems left, how to automate the setting of the mtu value when connecting to the VPN, and DNS seems to be gone after disconnecting from the VPN.
          The latter can be solved by sudo service network-manager restart. Both tasks can be automated as suggested in script
          /etc/NetworkManager/dispatcher.d/01-ifupdown. Scripts in the dispatcher.d folder are called with the port and event as argument.
          So, I create an executable script in this folder, as below
          #!/bin/sh



          #info : pre-up and pre-down are not implemented in network-manager

          if [ "$2" = "vpn-up" ]; then
          /sbin/ifconfig "$1" mtu 1388
          fi

          if [ "$2" = "vpn-down" ]; then
          /usr/sbin/service network-manager restart
          fi


        • Finally, I want to enable ufw again. For this I need to add -A ufw-before-input -p 47 -j ACCEPT in file /etc/ufw/before.rules, just before
          # drop invalid packets and do sudo ufw enable, and reboot.
          Now everything works fine, in my case.


        • Later I found that another (and probably better) way to get the dns back is to store the package resolvconf.
          sudo apt install resolvconf
          sudo dpkg-reconfigure resolvconf

          Then the vpn-down part of the script can be deleted.






        share|improve this answer














        Finally, I got this up and running and want to share my findings on this forum.
        The info I needed seems to be scattered around different sites.




        • Configure VPN ... in VPN Connections is greyed out.

          Inconvenient, and I don't know how to solve, but there is a workaround.

          Go through Edit Connections... and press +. However, in the Connection Type, no VPN's are listed.

        • I (re-)installed the necessary modules for vpn connection, with
          sudo apt-get install --reinstall network-manager network-manager-gnome openvpn
          network-manager-openvpn network-manager-openvpn-gnome
          network-manager-pptp network-manager-pptp-gnome pptp-linux


        • Now it is possible to add a pptp connection as described under the first bullet. Configure it with credentials and settings as given by the VPN provider.

        • To avoid firewall problems, try first with UncomplicatedFirewall off. sudo ufw disable and reboot.

        • After this : VPN Connections -> new_vpn establishes the VPN connection. However, in my case it was not possible to access the internet.
          It feels like the connection breaks after the first site, or it takes forever to load any site.

        • The cure for this problem I found here.
          Apparently the mtu, maximum transmission unit, for the vpn port is too high. In my case I have to lower it manually by executing
          ifconfig ppp0 mtu 1388

        • The maximum mtu which is suitable can be found by connecting to the vpn and then pinging some site (e.g. ubuntu.com) by executing
          ping -M do -s <number> -c 1 ubuntu.com. Increase <number> by 10 until the connection is lost (once it is lost, in my case it also fails when lowering again)
          I had to revive the connection by sudo service network-manager restart and connecting again to the vpn. Once you find the highest usable <number>, add 28 and that
          is the mtu to use with the vpn port. See also here.


        • Still two problems left, how to automate the setting of the mtu value when connecting to the VPN, and DNS seems to be gone after disconnecting from the VPN.
          The latter can be solved by sudo service network-manager restart. Both tasks can be automated as suggested in script
          /etc/NetworkManager/dispatcher.d/01-ifupdown. Scripts in the dispatcher.d folder are called with the port and event as argument.
          So, I create an executable script in this folder, as below
          #!/bin/sh



          #info : pre-up and pre-down are not implemented in network-manager

          if [ "$2" = "vpn-up" ]; then
          /sbin/ifconfig "$1" mtu 1388
          fi

          if [ "$2" = "vpn-down" ]; then
          /usr/sbin/service network-manager restart
          fi


        • Finally, I want to enable ufw again. For this I need to add -A ufw-before-input -p 47 -j ACCEPT in file /etc/ufw/before.rules, just before
          # drop invalid packets and do sudo ufw enable, and reboot.
          Now everything works fine, in my case.


        • Later I found that another (and probably better) way to get the dns back is to store the package resolvconf.
          sudo apt install resolvconf
          sudo dpkg-reconfigure resolvconf

          Then the vpn-down part of the script can be deleted.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Sep 19 at 12:57

























        answered Feb 17 at 19:11









        oscar1919

        29226




        29226



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1007171%2fno-internet-over-vpn-connection%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