Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

If you use "redirect-gateway def1" option in openvpn config file,the server will add a default gateway on your route table, what i want to konw is Why openvpn did not use network 0.0.0.0 netmask 0.0.0.0 as default gateway instead of netmask 128.0.0.0 ?

share|improve this question

migrated from stackoverflow.com Sep 19 '11 at 5:12

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

up vote 3 down vote accepted

OpenVPN isn't using 0.0.0.0/0 as the route on the default gateway because you told it not to, with the redirect-gateway def1 config option. The manpage explains more, but basically by putting in two /1 routes covering the entire IPv4 address space, you get the same end result, but as it's more specific than a standard default route, it gets used in preference, so you don't have to either delete the existing default route, nor do you have to play games with routing metrics to get your OpenVPN route preferred.

share|improve this answer
add comment

Your Answer

 
discard

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.