Error linux route add command failed external program exited with error status

OpenVPN Support Forum

plagued with ERROR: Linux route add command failed

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.

plagued with ERROR: Linux route add command failed

Post by neuronetv » Tue Nov 04, 2014 9:18 pm

I’ve been hammering at this for hours and trawling google but I can’t clear this error, I’ve seen plenty of forum posts about it but none show a clear solution.
I’m running a centos6 machine with openvpn-2.3.2-2.el6.x86_64, the machine is on 172.16.1.x 255.255.0.0, this is my server.conf:

port 1194 proto tcp dev tun ca ca.crt cert server.crt key server.key tls-auth ta.key 0 dh dh2048.pem server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt cipher AES-256-CBC comp-lzo persist-key persist-tun user nobody group nobody status openvpn-status.log verb 3 #push "redirect-gateway def1" push "route 172.16.0.0 255.255.0.0" push "route 172.16.1.0 255.255.0.0" push "dhcp-option DNS 208.67.222.222" push "dhcp-option DNS 208.67.220.220" keepalive 5 30 log /var/log/openvpn.log
ERROR: Linux route add command failed: external program exited with error status: 2

and thus I can’t get the client to play ball. The client connects fine but cannot see any ip address on the server LAN and I don’t think I’ll sort this until I clear this initial error (which has me baffled).

Источник

OpenVPN Support Forum

ERROR: Linux route add command failed: external program exited with error status: 1

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.

ERROR: Linux route add command failed: external program exited with error status: 1

Post by radu » Tue Oct 25, 2016 6:05 pm

I have a configuration that allowed me to route all traffic through VPN for about a year, but after a dd-wrt update I just couldn’t make it work anymore, was failing to add route. Unortunately had a TP-Link when it worked, did a restore to original firmware and they blocked custom firmware; ow new client router also says «Linux route add command failed» but » external program exited with error status: 1″ instead of status: 2, as TP-Link did:

Читайте также:  Nvidia run linux mint

State
Client: CONNECTED SUCCESS
Local Address: 10.1.1.2
Remote Address: 10.1.1.2

Status
VPN Client Stats
TUN/TAP read bytes 17171
TUN/TAP write bytes 0
TCP/UDP read bytes 3735
TCP/UDP write bytes 23022
Auth read bytes 64
pre-compress bytes 7914
post-compress bytes 7988
pre-decompress bytes 0
post-decompress bytes 0

Log
Clientlog:
20161025 20:20:17 I OpenVPN 2.3.12 arm-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Oct 18 2016
20161025 20:20:17 I library versions: OpenSSL 1.0.2j 26 Sep 2016 LZO 2.09
20161025 20:20:17 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:16
20161025 20:20:17 W WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
20161025 20:20:17 W NOTE: the current —script-security setting may allow this configuration to call user-defined scripts
20161025 20:20:17 W WARNING: file ‘/tmp/openvpncl/client.key’ is group or others accessible
20161025 20:20:17 Socket Buffers: R=[87380->87380] S=[16384->16384]
20161025 20:20:17 I Attempting to establish TCP connection with [AF_INET]82.xx.xx.48:443 [nonblock]
20161025 20:20:18 I TCP connection established with [AF_INET]82.xx.xx.48:443
20161025 20:20:18 I TCPv4_CLIENT link local: [undef]
20161025 20:20:18 I TCPv4_CLIENT link remote: [AF_INET]82.xx.xx.48:443
20161025 20:20:18 TLS: Initial packet from [AF_INET]82.xx.xx.48:443 sid=7e483803 e26adfea
20161025 20:20:18 VERIFY OK: depth=1 C=xx ST=xx L=xxx O=Radu OU=HomeServer CN=HomeServer name=HomeServer emailAddress=xx@xx.com
20161025 20:20:18 VERIFY OK: depth=0 C=xx ST=xx L=xx O=Radu OU=HomeServer CN=NightHawk name=NightHawk emailAddress=xx@oxx.com
20161025 20:20:18 NOTE: —mute triggered.
20161025 20:20:18 1 variation(s) on previous 3 message(s) suppressed by —mute
20161025 20:20:18 W WARNING: this cipher’s block size is less than 128 bit (64 bit). Consider using a —cipher with a larger block size.
20161025 20:20:18 Data Channel Encrypt: Using 160 bit message hash ‘SHA1’ for HMAC authentication
20161025 20:20:18 Data Channel Decrypt: Cipher ‘BF-CBC’ initialized with 128 bit key
20161025 20:20:18 W WARNING: this cipher’s block size is less than 128 bit (64 bit). Consider using a —cipher with a larger block size.
20161025 20:20:18 Data Channel Decrypt: Using 160 bit message hash ‘SHA1’ for HMAC authentication
20161025 20:20:18 Control Channel: TLSv1.2 cipher TLSv1/SSLv3 DHE-RSA-AES256-GCM-SHA384 1024 bit RSA
20161025 20:20:18 I [NightHawk] Peer Connection Initiated with [AF_INET]82.xx.xx.48:443
20161025 20:20:20 SENT CONTROL [NightHawk]: ‘PUSH_REQUEST’ (status=1)
20161025 20:20:20 PUSH: Received control message: ‘PUSH_REPLY route 192.168.1.1 255.255.255.0 redirect-gateway def1 dhcp-option DNS 193.xx.xx.1 route-gateway 10.1.1.1 topology subnet ping 10 ping-restart 120 socket-flags TCP_NODELAY ifconfig 10.1.1.2 255.255.255.0’
20161025 20:20:20 OPTIONS IMPORT: timers and/or timeouts modified
20161025 20:20:20 NOTE: —mute triggered.
20161025 20:20:20 5 variation(s) on previous 3 message(s) suppressed by —mute
20161025 20:20:20 I TUN/TAP device tun1 opened
20161025 20:20:20 TUN/TAP TX queue length set to 100
20161025 20:20:20 I do_ifconfig tt->ipv6=1 tt->did_ifconfig_ipv6_setup=0
20161025 20:20:20 I /sbin/ifconfig tun1 10.1.1.2 netmask 255.255.255.0 mtu 1500 broadcast 10.1.1.255
20161025 20:20:20 /sbin/route add -net 82.79.46.48 netmask 255.255.255.255 gw 192.168.0.1
20161025 20:20:20 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 10.1.1.1
20161025 20:20:20 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 10.1.1.1
20161025 20:20:20 /sbin/route add -net 192.168.1.1 netmask 255.255.255.0 gw 10.1.1.1
20161025 20:20:20 W ERROR: Linux route add command failed: external program exited with error status: 1
20161025 20:20:20 I Initialization Sequence Completed
20161025 20:20:22 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:16
20161025 20:20:22 D MANAGEMENT: CMD ‘state’
20161025 20:20:22 MANAGEMENT: Client disconnected

Читайте также:  Dts linux что это

This would be the server log:
20161025 20:20:17 I TCP connection established with [AF_INET]95.xx.xx.1:60182
20161025 20:20:18 95.91.250.1:60182 TLS: Initial packet from [AF_INET]95.xx.xx.1:60182 sid=ca05dfea e5bb0e4e
20161025 20:20:18 95.91.250.1:60182 VERIFY OK: depth=1 C=xx ST=xx L=xx O=Radu OU=HomeServer CN=HomeServer name=HomeServer emailAddress=xx@xx.com
20161025 20:20:18 95.91.250.1:60182 VERIFY OK: depth=0 C=xx ST=xx L=xx O=Radu OU=HomeServer CN=Archer name=Archer emailAddress=xx@xx.com
20161025 20:20:18 95.91.250.1:60182 NOTE: —mute triggered.
20161025 20:20:18 95.91.250.1:60182 5 variation(s) on previous 3 message(s) suppressed by —mute
20161025 20:20:18 I 95.91.250.1:60182 [Archer] Peer Connection Initiated with [AF_INET]95.xx.xx.1:60182
20161025 20:20:18 I Archer/95.xx.xx.1:60182 MULTI_sva: pool returned IPv4=10.1.1.2 IPv6=(Not enabled)
20161025 20:20:18 Archer/95.xx.xx.1:60182 OPTIONS IMPORT: reading client specific options from: /tmp/openvpn_cc_044afbfeb0c46a9ca6edba6296966941.tmp
20161025 20:20:18 Archer/95.xx.xx.1:60182 MULTI: Learn: 10.1.1.2 -> Archer/95.xx.xx.1:60182
20161025 20:20:18 Archer/95.xx.xx.1:60182 MULTI: primary virtual IP for Archer/95.xx.xx.1:60182: 10.1.1.2
20161025 20:20:20 Archer/95.xx.xx.1:60182 PUSH: Received control message: ‘PUSH_REQUEST’
20161025 20:20:20 I Archer/95.xx.xx.1:60182 send_push_reply(): safe_cap=940
20161025 20:20:20 Archer/95.xx.xx.1:60182 SENT CONTROL [Archer]: ‘PUSH_REPLY route 192.168.1.1 255.255.255.0 redirect-gateway def1 dhcp-option DNS 193.xx.xx.1 route-gateway 10.1.1.1 topology subnet ping 10 ping-restart 120 socket-flags TCP_NODELAY ifconfig 10.1.1.2 255.255.255.0’ (status=1)

Here are the configs (firewall and IP v6 off):

SERVER CONFIG (Home Location router); LAN IP: 192.168.1.1

Start Type: System
Config as: Server
Server Mode: Router (TUN)
Network: 10.1.1.0
Netmask: 255.255.255.0
Port: 443
Tunnel Protocol: TCP
Encryptions Cipher: Blowfish CBC
Hash Algorithm: SHA1
Advanced Options: Disable

Additional Config:
push «route 192.168.1.0 255.255.255.0»
push «dhcp-option DNS [provider dns]»
push «dhcp-option DNS [2nd provider dns]»
push «redirect-gateway def1»
server 10.1.1.0 255.255.255.0
dev tun0
proto tcp-server
keepalive 10 120
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem

CLIENT CONFIG (roaming location router); LAN IP: 192.168.2.1

Server IP/Name: [ddns link]
Port: 443
Tunnel Device: TUN
Tunnel Protocol: TCP
Encryption Cipher: Blowfish CBC
Hash Algorithm: SHA1
Advanced Options: Disable

Читайте также:  Astra linux проверить домен

Источник

OpenVPN Support Forum

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

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.

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

Post by Anna Gz » Wed May 16, 2018 4:06 pm

RTNETLINK answers: File exists Tue May 15 23:45:19 2018 ERROR: Linux route add command failed: external program exited with error status: 2
port 16122 proto udp dev tun sndbuf 0 rcvbuf 0 ca ca.crt cert server.crt key server.key # This file should be kept secret dh dh2048.pem topology subnet server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "redirect-gateway def1 bypass-dhcp" push "dhcp-option DNS 208.67.222.222" push "dhcp-option DNS 208.67.220.220" keepalive 10 120 tls-auth ta.key 0 # This file is secret key-direction 0 cipher AES-256-CBC # AES auth SHA512 comp-lzo user nobody group nogroup persist-key persist-tun status /var/log/openvpn-status.log log /var/log/openvpn.log verb 3 mssfix 0
client dev tun proto udp sndbuf 0 rcvbuf 0 remote xxx.xx.xx.xx 16122 resolv-retry infinite nobind user nobody group nogroup persist-key persist-tun remote-cert-tls server key-direction 1 cipher AES-256-CBC auth SHA512 comp-lzo verb 3 script-security 2 up /etc/openvpn/update-resolv-conf down /etc/openvpn/update-resolv-conf
$ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 10.8.0.1 128.0.0.0 UG 0 0 0 tun0 default gateway 0.0.0.0 UG 600 0 0 wlp3s0 10.8.0.0 * 255.255.255.0 U 0 0 0 tun0 128.0.0.0 10.8.0.1 128.0.0.0 UG 0 0 0 tun0 link-local * 255.255.0.0 U 1000 0 0 wlp3s0 185.141.27.87 gateway 255.255.255.255 UGH 0 0 0 wlp3s0 192.168.1.0 * 255.255.255.0 U 600 0 0 wlp3s0

I go online through a router from a laptop. I start vnn through the terminal.
Please tell me how can I fix this error?

Источник

Оцените статью
Adblock
detector