Announcement

Collapse
No announcement yet.

pptp vpn can't connect most of the times

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    pptp vpn can't connect most of the times

    Hello,
    When I try to connect to my work pptp\vpn in Kubuntu 15.04 it works like 1 time out of 10. It doesn't depend on number of tries or wifi network I use and I don't touch any settings during that. It can connect one day and don't work completely another whehter I reboot or not. My guess is that something's wrong with routing table but i'm not shure how to fix it. Routing was done through GUI network manager. sudo tail -f /var/log/syslog during fault connection shows me this:

    Code:
    [FONT=monospace]Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <info> VPN Gateway: 37.16.80.130
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <info> Tunnel Device: ppp0
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <info> IPv4 configuration:
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <info>   Internal Address: 10.16.10.15
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <info>   Internal Prefix: 32
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <info>   Internal Point-to-Point Address: 10.1.1.1
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <info>   Maximum Segment Size (MSS): 0
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <info>   Static Route: 172.25.6.60/32   Next Hop: 1
    0.16.10.6
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <info>   Static Route: 172.25.6.231/32   Next Hop: 
    10.16.10.6
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <info>   Forbid Default Route: yes
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <info>   Internal DNS: 172.16.5.65
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <info>   DNS Domain: '(none)'
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <info> No IPv6 configuration
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <error> [1435565880.411289] [platform/nm-linux-plat
    form.c:1714] add_object(): Netlink error adding 172.25.6.60/32 via 10.16.10.6 dev ppp0 metric 1024 mss 0 src user:
     Unspecific failure
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: <warn> VPN connection 'ASD' did not receive valid I
    P config information.
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: inet 172.25.6.60 table main
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: priority 0x400 protocol static
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s NetworkManager[933]: nexthop via 10.16.10.6 dev 12
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s pppd[5529]: Terminating on signal 15
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s pppd[5529]: Connect time 0.0 minutes.
    Jun 29 11:18:00 ifirstov-HP-ProBook-4740s pppd[5529]: Sent 0 bytes, received 0 bytes.
    
    [/FONT]
    I can always connect if i'll delete routing settings but then I can't work. It also works ok on Win or Ubuntu.

    #2
    As a test, does it work if you remove the two static routes?

    Comment


      #3
      It does. My guess is that it's this infamous bug, but I can't figure out what a workaround would be for my network configuration.

      Comment


        #4
        What happens if you open a console window and manually add the routes after the VPN is up?

        Comment


          #5
          Sorry, I'm not quite shure how to do this. A simple
          route add 172.25.6.60 mask 255.255.255.255 10.16.10.6
          doesn't work.

          Comment


            #6
            Check man route for the syntax.

            The newer command is ip. Check man ip route.

            Comment


              #7
              Well, there's SIOCAART: network unavailable for both of routes.

              Comment


                #8
                When the VPN is connected, what's the output of
                Code:
                ip addr
                
                ip route
                And what was the command you typed that generated the error?

                Comment


                  #9
                  for ip addr:

                  Code:
                  [FONT=monospace]1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default  
                      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
                      inet 127.0.0.1/8 scope host lo
                         valid_lft forever preferred_lft forever
                      inet6 ::1/128 scope host  
                         valid_lft forever preferred_lft forever
                  2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
                      link/ether b4:b5:2f:7b:c1:d7 brd ff:ff:ff:ff:ff:ff
                  3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
                      link/ether 20:68:9d:2e:87:26 brd ff:ff:ff:ff:ff:ff
                      inet 192.168.1.173/24 brd 192.168.1.255 scope global dynamic wlan0
                         valid_lft 85931sec preferred_lft 85931sec
                      inet6 fe80::2268:9dff:fe2e:8726/64 scope link  
                         valid_lft forever preferred_lft forever
                  4: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1400 qdisc pfifo_fast state UNKNOWN group default qlen 3
                      link/ppp  
                      inet 10.16.10.11 peer 10.1.1.1/32 scope global ppp0
                         valid_lft forever preferred_lft forever
                      inet 10.16.10.11/32 brd 10.16.10.11 scope global ppp0
                         valid_lft forever preferred_lft forever
                  
                  [/FONT]
                  ip route:
                  Code:
                  [FONT=monospace]default via 192.168.1.1 dev wlan0  proto static  metric 1024  [/FONT][FONT=monospace]10.1.1.1 dev ppp0  proto kernel  scope link  src 10.16.10.11  
                  37.16.80.130 via 192.168.1.1 dev wlan0  src 192.168.1.173  
                  169.254.0.0/16 dev wlan0  scope link  metric 1000  
                  192.168.1.0/24 dev wlan0  proto kernel  scope link  src 192.168.1.173 
                  
                  [/FONT]
                  the command was
                  Code:
                  [FONT=monospace]sudo route add -net 172.25.6.60 netmask 255.255.255.255 gw 10.16.10.6   
                  [/FONT]

                  Comment


                    #10
                    Ok, I found the solution.
                    Code:
                    [FONT=monospace]~$ sudo route add 10.16.10.6 ppp0
                    ~$ sudo route add -net 172.25.6.60 netmask 255.255.255.255 gw 10.16.10.6 ppp0
                    ~$ sudo route add -net 172.25.6.231 netmask 255.255.255.255 gw 10.16.10.6 ppp0  [/FONT]
                    But how do I save those routes permanently so i won't have to add them after every reboot?
                    P.S. I don't know routing tables syntax
                    Last edited by fearstaff; Jul 06, 2015, 06:53 AM.

                    Comment


                      #11
                      Try this. Create a script in /etc/network/if-up.d. It should contain:
                      Code:
                      #!/bin/sh
                      
                      if [ "$IFACE" = "ppp0" ]; then
                          route add 10.16.10.6 ppp0
                          route add -net 172.25.6.60 netmask 255.255.255.255 gw 10.16.10.6 ppp0
                          route add -net 172.25.6.231 netmask 255.255.255.255 gw 10.16.10.6 ppp0
                      fi
                      Make it executable.

                      Comment


                        #12
                        Works like a charm! Thanks a lot for your support, Steve! Can you recommend any dummy level manual for Linux networking?

                        Comment


                          #13
                          Glad it's working for you.

                          I'm not aware of any specific manual like you're asking about. Perhaps the Ubuntu wiki and official documentation pages would be good places to start.

                          Comment

                          Working...
                          X