Björn Ketelaars [Sat, 14 Mar 2015 18:31:38 +0000 (19:31 +0100)]
OSX - Fix split DNS when doing split routing
Currently one can choose between two scenarios:
- overriding the default gateway, which breaks split routing, and honoring the
DNS server as proposed by the server
- not overriding the default gateway, which enables split routing, but without
honoring the DNS server as proposed by the server
446 # next line overrides the default gateway and breaks split routing
447 # d.add Router $INTERNAL_IP4_ADDRESS
Split DNS, when doing split routing, is enabled by adding INTERNAL_IP4_DNS to
the list of DNS servers.
Signed-off-by: Björn Ketelaars <bjorn.ketelaars@hydroxide.nl> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
John Baldwin [Thu, 12 Mar 2015 15:28:51 +0000 (15:28 +0000)]
Enable resolvconf on FreeBSD too
According to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195359
this should work fine. I've no idea why it wasn't enable for FreeBSD
in the first place; perhaps just lack of testing and conservatism.
Signed-off-by: John Baldwin <jhb@FreeBSD.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Antonio Borneo [Sun, 1 Dec 2013 07:06:41 +0000 (15:06 +0800)]
Add support for "unbound" DNS resolver
Original patch from Erinn Looney-Triggs <erinn.looneytriggs@gmail.com>
posted at Red Hat Bugzilla - Bug #865092
https://bugzilla.redhat.com/show_bug.cgi?id=865092
Removed bashism, removed trailing spaces, use tab for indentation.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Emanuel Haupt [Mon, 28 Jan 2013 15:33:38 +0000 (15:33 +0000)]
Fix various issues on FreeBSD
- duplicate creation of tun devices
- cleanup of created tun device
- deadlock of vpnc holding an open file descriptor on /dev/tunN
- properly restoring /etc/resolv.conf
Signed-off-by: Emanuel Haupt <ehaupt@FreeBSD.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Woodhouse [Mon, 23 Apr 2012 00:20:34 +0000 (01:20 +0100)]
Add script hooks
This is based loosely in concept on the Debian patch, and is also needed for
OpenWrt unless we want to add a bunch of OpenWrt-specific stuff in here too.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
David Woodhouse [Tue, 13 Dec 2011 23:39:14 +0000 (23:39 +0000)]
No need to add link-local address on Solaris.
Revert commit 9e277b5e64315aa3e1a2f2472e9c2d55f9b0f788. Now that we plumb
the interface from openconnect instead of with ifconfig from vpnc-script,
the issues with link-local addresses no longer seem to bother us.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Antonio Borneo [Mon, 12 Dec 2011 20:39:06 +0000 (04:39 +0800)]
vpnc-script: fix for Suse pre 11.1
To handle /etc/resolv.conf file, Suse Linux pre 11.1
uses /sbin/modify_resolvconf script.
The same parameter "-s <service>" have to be passed
to modify_resolvconf on both "modify" and "restore".
Original vpnc-script.in from vpnc project runs:
/sbin/modify_resolvconf modify -s $SCRIPTNAME ...
/sbin/modify_resolvconf restore -s vpnc ...
with $SCRIPTNAME=="vpnc".
In this repository, vpnc-script.in has been converted
to vpnc-script. Doing this, the value $SCRIPTNAME has
changed from "vpnc" to "vpnc-script".
This breaks the "restore" and left /etc/resolv.conf
modified for the (already closed) VPN tunnel.
Replace "-s $SCRIPTNAME" with fixed value "-s vpnc".
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Fred Wittekind IV [Sun, 4 Sep 2011 22:10:40 +0000 (23:10 +0100)]
Fix MTU calculation (Red Hat bug #693235)
Newer iproute doesn't give the mtu in 'ip route get' output, so get the
device and then get the device's MTU (which theoretically could be
different to the route MTU but this is good enough for now).
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Dave Reisner [Mon, 15 Aug 2011 00:01:24 +0000 (20:01 -0400)]
vpnc-script: prevent negative MTU
We can't be sure that the route shown by 'ip route get' will return
anything. Restructure the logic to only perform the subtraction if it
does. Otherwise, fall back to the default 1412.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Bernhard Schmidt [Tue, 23 Feb 2010 18:11:53 +0000 (18:11 +0000)]
Set route to VPN gateway before configuring tunnel
In some circumstances (with $VPNGATEWAY being inside of
$INTERNAL_IP4_ADDRESS/$INTERNAL_IP4_NETMASK, for example when the netmask
was set incorrectly) the hostroute to $VPNGATEWAY pointed to the
tunnel device, creating a routing recursion.
Set the host route before configuring the tun interface to fix this.
Signed-off-by: Bernhard Schmidt <berni@birkenwald.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>