Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    ERROR: Linux route delete command failure

    Scheduled Pinned Locked Moved OpenVPN
    10 Posts 2 Posters 8.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      altiris
      last edited by

      So I set up OpenVPN following this guide, https://www.highlnk.com/2013/12/configuring-openvpn-on-pfsense/

      For Tunnel Network, I put "10.0.8.0/24" and I set local network to "192.168.10.0/24" (My LAN interface already uses subnet 192.168.10 …so I am not sure if I that will cause a conflict). Everything else is set up in the way of the guide except for the Dynamic DNS part (I am using same static IP assigned to pfsense WAN...that shouldnt cause a conflict I would think). Now the first time I tried connecting I used this command on my arch linux computer "sudo openvpn --config myconfignamehere.ovpn" and it worked out fine, I used wireshark to check if my data was encrypted and I used the route command to check my IPs and gateways, no errors in terminal either. Now its been a few days (Only I connect) when I use the same command I still get connected to the VPN and encryption is fine but I get this error message

      ERROR: Linux route delete command failed: external program exited with error status: 2
      
      

      Here is the full output when running the command I listed above,

      sudo openvpn --config myconfigfile.ovpn 
      [sudo] password for joobala: 
      Tue Jan 20 21:58:14 2015 OpenVPN 2.3.6 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Dec  2 2014
      Tue Jan 20 21:58:14 2015 library versions: OpenSSL 1.0.1k 8 Jan 2015, LZO 2.08
      Enter Auth Username: *****************************
      Enter Auth Password: ******************************
      Tue Jan 20 21:58:19 2015 Control Channel Authentication: tls-auth using INLINE static key file
      Tue Jan 20 21:58:19 2015 UDPv4 link local (bound): [undef]
      Tue Jan 20 21:58:19 2015 UDPv4 link remote: [AF_INET]MYEXTERNALIPHERE:1194
      Tue Jan 20 21:58:19 2015 [myconfigfile] Peer Connection Initiated with [AF_INET]MYEXTERNALIPHERE:1194
      Tue Jan 20 21:58:21 2015 TUN/TAP device tun0 opened
      Tue Jan 20 21:58:21 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
      Tue Jan 20 21:58:21 2015 /usr/bin/ip link set dev tun0 up mtu 1500
      Tue Jan 20 21:58:21 2015 /usr/bin/ip addr add dev tun0 local 10.0.8.6 peer 10.0.8.5
      RTNETLINK answers: File exists
      Tue Jan 20 21:58:21 2015 ERROR: Linux route add command failed: external program exited with error status: 2
      Tue Jan 20 21:58:21 2015 Initialization Sequence Completed
      
      

      .ovpn config file

      dev tun
      persist-tun
      persist-key
      cipher AES-256-CBC
      auth SHA1
      tls-client
      client
      remote MYEXTERNALIP 1194 udp
      lport 0
      verify-x509-name "myconfigfile" name
      auth-user-pass
      auth-nocache
      ns-cert-type server
      comp-lzo adaptive
      
       <ca>-----BEGIN CERTIFICATE-----
      -----END CERTIFICATE-----</ca> 
       <cert>-----BEGIN CERTIFICATE-----
      -----END CERTIFICATE-----</cert> 
       <key>-----BEGIN PRIVATE KEY-----
      -----END PRIVATE KEY-----</key> 
       <tls-auth>#
      # 2048 bit OpenVPN static key
      #
      -----BEGIN OpenVPN Static key V1-----
      -----END OpenVPN Static key V1-----</tls-auth> 
       key-direction 1
      

      Now I dont know if this is client or server related, I tried looking for /usr/bin/ip link but nothing on the client machine….I also read online somewhere that this has to do with the server. Anyway, whats the fix?

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        Looks like your linux already has that ip address assigned to an interface.  Is OpenVPN running twice?

        Did you turn it off and back on again?

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        1 Reply Last reply Reply Quote 0
        • A
          altiris
          last edited by

          @Derelict:

          Looks like your linux already has that ip address assigned to an interface.  Is OpenVPN running twice?

          Did you turn it off and back on again?

          No openvpn is not running twice, I have tried resetting the machine several times and same problem, this happens on my desktop which runs same distribution of linux on laptop also.

          1 Reply Last reply Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            Post the routing table of the computer doing this.

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            1 Reply Last reply Reply Quote 0
            • A
              altiris
              last edited by

              @Derelict:

              Post the routing table of the computer doing this.

              um..I don't really know what that is lol. Are you referring to /etc/iproute2/rt_tables  ?

              /etc/iproute2/rt_tables

              
              # reserved values
              #
              255     local
              254     main
              253     default
              0       unspec
              #
              # local
              #
              #1      inr.ruhep
              
              

              route

              Kernel IP routing table
              Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
              default         gateway         0.0.0.0         UG    1024   0        0 enp7s0
              10.0.8.0        10.0.8.5        255.255.255.0   UG    20     0        0 tun0
              10.0.8.5        *               255.255.255.255 UH    0      0        0 tun0
              static-92.452.1 gateway         255.255.255.255 UGH   0      0        0 enp7s0
              128.0.0.0       10.0.8.5        128.0.0.0       UG    20     0        0 tun0
              192.168.10.0    *               255.255.255.0   U     0      0        0 enp7s0
              

              (I changed static ip to random numbers)

              1 Reply Last reply Reply Quote 0
              • DerelictD
                Derelict LAYER 8 Netgate
                last edited by

                That looks fine.  What's not working?

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                1 Reply Last reply Reply Quote 0
                • A
                  altiris
                  last edited by

                  @Derelict:

                  That looks fine.  What's not working?

                  everything seems to be working, it's just that the error (in op) I got in the terminal was of concern to me, I thought something was wrong either on client or server end.

                  1 Reply Last reply Reply Quote 0
                  • DerelictD
                    Derelict LAYER 8 Netgate
                    last edited by

                    Linux or OpenVPN forum might get you an answer.

                    Chattanooga, Tennessee, USA
                    A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                    DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

                    1 Reply Last reply Reply Quote 0
                    • A
                      altiris
                      last edited by

                      @Derelict:

                      Linux or OpenVPN forum might get you an answer.

                      alright I will give it a shot, thank you for assisting me though!

                      1 Reply Last reply Reply Quote 0
                      • DerelictD
                        Derelict LAYER 8 Netgate
                        last edited by

                        You know what.  I think a lot of people get strange errors at that point.  Not really an error but OpenVPN trying to do something that's already been done or something.

                        Chattanooga, Tennessee, USA
                        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                        Do Not Chat For Help! NO_WAN_EGRESS(TM)

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.