0

I want to create an OpenVPN config entry which looks like this:

route 255.255.255.255 255.255.255.255 {CLIENT_IP_ADDRES}

Is there any way to accomplish this without hard-coding the client ip into the configuration?

If not do you have any other ideas how to add this route (on aWindows client) without assigning a static ip to the client?

Background: I want Windows to send UDP broadcasts to the tap-device.

Manuel
  • 1
  • Broadcasts will be forwarded to every recipient inside a broadcast domain. What do you really want to achieve with wanting "to send UDP broadcasts to the tap-device"? – ErikE Jun 11 '15 at 18:31

1 Answers1

0

To tell a client to apply some route after connecting to OpenVPN, you have to use the push command, something like push "route <address> <netmask> vpn_gateway"

But the end result doesn't appear to match what you say you want to do - usually the Windows IP stack will create such a routing table entry for every interface anyway? Maybe you need to fiddle with route metrics on the client?

Josip Rodin
  • 1,695
  • 13
  • 18
  • Indeed the route is created when the connection is established. But the metric is too high so other interfaces are prefered over my tap device. I foud out that setting the route as mentioned in the configuration will decrease the metric considerably. But any other reliable method to reduce the metric should be fine too. – Manuel Jun 11 '15 at 23:22
  • @Manuel do also note that metrics in Windows may not be doing what you expect them to do, see e.g. http://serverfault.com/questions/255799/windows-vista-and-7-dont-honor-routing-table-metric – Josip Rodin Jun 12 '15 at 06:36