i have a situation where i have a server on the IP range of and a subnet on the range of

I state the problem here before adding the config. I am pushing the route to the server network with push "route" this I tested with 2 different client machines

TEST 1 the first throws an error telling RTNETLINK answers: Network is unreachable the ip routes table does not get any related entry

root@127:/etc/openvpn/client# ip route
default via dev eth0 proto dhcp metric 100 dev tun0 proto kernel scope link src dev eth0 proto kernel scope link src metric 100 via dev eth0

the same happens when i try to add it manually ip route add via dev tun0

TEST 2 the second is a mac and it throws no error but puts the route in the wrong interface i guess it should be utun3 not en0

Destination        Gateway            Flags           Netif Expire
default         UGScg             en0
10/24               UGSc            utun3            UH              utun3
192.168.255      UGSc              en0

Here my config

verb 3
key /etc/openvpn/pki/private/VPN.greenhive.at.key
ca /etc/openvpn/pki/ca.crt
cert /etc/openvpn/pki/issued/VPN.greenhive.at.crt
dh /etc/openvpn/pki/dh.pem
tls-auth /etc/openvpn/pki/ta.key
key-direction 0
keepalive 10 60

proto udp
port 1194
dev tun
status /tmp/openvpn-status.log
topology subnet
client-config-dir ccd

#user nobody
#group nogroup
comp-lzo no

### Route Configurations Below

### Push Configurations Below
push "dhcp-option DNS"
push "dhcp-option DNS"
push "comp-lzo no"
push "route"
  • 1
    You appear to be using the same subnet as a network physically connected to your server and for your OpenVPN subnet. You can't do that. Pick a different subnet for OpenVPN to connect its clients to the server
    – roaima
    May 3 at 8:38
  • you have to understand that openvpn is a router by itself. So you have to integrate a router (openvpn) within a router (your server), then tell openvpn to instruct the server which route it has ("route ...") and to your client which route it give to them (push "route ...")
    – dominix
    May 3 at 9:14
  • Hi, the client I tested it with is my macbook and it definitively does no have anything on the en0. Moreover it does not even have an ethernet attached. so i have no clue how that entry got there other than via the openvpn script May 3 at 20:01


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.