Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like my OpenVPN server to push a route down to the client with a different default gateway.

Specifically, my OpenVPN server has an internal IP address of, and I would like it to push a route of using gateway

Is it possible to do this by specifying a push route in the server config file?

share|improve this question
Based on man openvpn you should be able to push routes to clients using something like: push 'network/IP [netmask] [gateway] [metric]' – jersten Sep 17 '13 at 15:58
Are you saying you want to push "route" to the client, and then the VPN clients traffic to have a different default gateway ( on the VPN server network? – Drav Sloan Sep 17 '13 at 16:02
@DravSloan I want the client to access IP addresses on the network via, but I don't want to change any of the other routing behavior of the VPN. – Lorin Hochstein Sep 17 '13 at 16:46
@josten I tried doing: push "route", no go. – Lorin Hochstein Sep 17 '13 at 17:03
@LorinHochstein that should probably be push route " 1" – Drav Sloan Sep 17 '13 at 17:12
up vote 7 down vote accepted
push route " 1"

From the openvpn man page:

--route network/IP [netmask] [gateway] [metric]

This tells the server config to "push" to the client, the route command which sets a networking route of the subnet via the gateway with a metric of 1. Metrics are used to give "preference" if multiple routes exist (such that the lowest cost wins).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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