Skip to contentSkip to conversation

--redirect-gateway, was: Re: [Openvpn-users] Use at hotels

Openvpn-devel James Yonan 1 participant 1 message Feb 7, 2004 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 6 lines · Tuc at the Beach House

Hi,

--redirect-gateway
Automatically execute routing commands to cause all outgoing IP
traffic to be redirected over the VPN. Currently implemented
only on Linux and Windows.

Ah, yes, that's a problem.

The --redirect-gateway implementation needs to be able to get the IP address of the current default gateway. Unfortunately the standard Berkeley sockets API doesn't give us a portable way of doing this. Anyone know how to do this on FreeBSD?

Having said that, all is not lost. If you know your gateway address and you know your DHCP server address (and if they are both relatively static), you can write an --up script with route commands to do this.

James