On Sun, Jul 02, 2017 at 08:27:36AM +0000, Stuart Henderson wrote: > On 2017-07-01, Claudio Jeker <[email protected]> wrote: > > On Sat, Jul 01, 2017 at 04:48:05PM +0200, [email protected] wrote: > >> I use an ssh tunnel for a VPN on OpenBSD 6.1. To initiate the VPN > >> connection, I type the following on the local machine > >> > >> # ssh -f -w 0:1 R true > >> # ifconfig tun0 10.1.1.1 10.1.1.2 netmask 255.255.255.252 > >> # route add R G > >> # route change default 10.1.1.2 > >> > >> where R is the IP address of the remote server, and where G is the IP > >> address of the local gateway. > >> > >> Usually, this works well. But I occasionally have a problem where the > >> default address in the routing table will spontaneously change from > >> 10.1.1.2 to G. What could be causing the routing table to spontaneously > >> change in this manner without my intervention? > >> > > > > Most probably dhclient(8). > > A hackish workaround to this would be to add routes for 0.0.0.0/1 > and 128.0.0.0/1 instead of changing the default route. >
Or even better use the -priority and add it with a lower prio (e.g. 2). -- :wq Claudio

