-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58b4ef2
commit 8ef170c
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
#################################################################### | ||
# Tunnel only UCSF intranet | ||
# | ||
# Install: | ||
# mkdir -p ~/.config/ucsf-vpn/flavors/localdns/ | ||
# cp connect.sh ~/.config/ucsf-vpn/flavors/localdns/ | ||
# | ||
# Requires: | ||
# https://github.com/HenrikBengtsson/ucsf-vpn | ||
# | ||
# Description: | ||
# This script overrides parts of the default behavior of | ||
# /usr/share/vpnc-scripts/vpnc-script. It's been verified to | ||
# to work on Ubuntu 22.04. | ||
# | ||
# Authors: Henrik Bengtsson | ||
# Version: 2024-05-22 | ||
# License: GPL | ||
#################################################################### | ||
|
||
#------------------------------------------------------------------- | ||
# Tweak DNS lookup | ||
#------------------------------------------------------------------- | ||
# Tricks modify_resolvconf_generic() to prepend the local nameserver | ||
# before the ones that the VPN server provides. | ||
_nameservers_=$(grep "^nameserver[[:blank:]]" /etc/resolv.conf | sed -E 's/nameserver[[:blank:]]+//') | ||
INTERNAL_IP4_DNS="${_nameservers_} $INTERNAL_IP4_DNS" |