I am trying to connect a client to a vpn network without openvpn forwarding all my traffic into the network. The point being is I want to be able to connect and communicate with all the other connected vpn machines and their services, but I want all my regular traffic (http, etc) leaving and entering through my default route/network like it normally would when not connected to the vpn.

Here are my configs and routes if they help any (all routes relating to tun0 are added by openvpn):

user@machine:~# ip route via dev tun0
default via dev wlan0  proto static via dev tun0 dev tun0  proto kernel  scope link  src
xx.xx.xx.xx via dev wlan0 via dev tun0 dev wlan0  proto kernel  scope link  src dev wlan0-1  proto kernel  scope link  src

I have tried to use the route-nopull config option, and while I was able to connect to the vpn and obtain an ip address, other vpn users were not able access my services such as ssh. If I removed the route-nopull option they can access my ssh service, but now all of the boxes traffic is now being redirected through the vpn.

dev tun
proto udp
remote xx.xx.xx.xx YYYYY
resolv-retry infinite
verb 3
ca ca.crt
cert vpn.crt

Overall I am looking for a way to connect to the vpn network and allow other vpn users access my services without redirecting all my regular traffic into the vpn network.

Hopefully what I am trying to achieve makes sense.

Thank you for your time.


I very strongly suspect your server has push "redirect-gateway in its config, thats adding a default route ( to your clients routing table.

Delete that default route and add an appropriate rout for VPN only traffic. I'm more a windblows head but it'd be something like route add so that traffic for VPN clients goes to the tunnel and everything else just goes to the internet via your router.

NB: your VPN host will have to be configure to allow client to client comms, thats OFF by default.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.