configuration-templates – Diff between revs 24 and 25

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 24 Rev 25
Line 4... Line 4...
4 ## Please see: http://www.gnu.org/licenses/gpl.html for legal details, ## 4 ## Please see: http://www.gnu.org/licenses/gpl.html for legal details, ##
5 ## rights of fair usage, the disclaimer and warranty conditions. ## 5 ## rights of fair usage, the disclaimer and warranty conditions. ##
6 ########################################################################### 6 ###########################################################################
7 # openvpn-osx-tuntap.sh # 7 # openvpn-osx-tuntap.sh #
8 # Up / Down script for OpenVPN running on OSX as a client. # 8 # Up / Down script for OpenVPN running on OSX as a client. #
-   9 # #
9 # The OpenVPN server is expected to serve clients with IP addresses via # 10 # The OpenVPN server is expected to serve clients with IP addresses via #
10 # a previously configured DHCP server. # 11 # a previously configured DHCP server. #
-   12 # #
11 # Note that this script does not replace the default route but instead # 13 # Note that this script does not replace the default route but instead #
12 # uses the Mac OS capability of using scoped DNS servers to make the # 14 # uses the Mac OS capability of using scoped DNS resolution in order to #
13 # remote network available whilst preserving the default route. # 15 # make the remote network available whilst preserving the default route. #
-   16 # #
-   17 # To use this script on an OS X OpenVPN client, the following changes to #
-   18 # your OpenVPN configuration are required: #
-   19 # #
-   20 # up-restart #
-   21 # up openvpn-osx-tuntap.sh #
-   22 # down openvpn-osx-tuntap.sh #
-   23 # ipchange openvpn-osx-tuntap.sh #
-   24 # #
-   25 # where openvpn-osx-tuntap.sh is the filesystem path to this script. #
14 # # 26 # #
15 # Based on: # 27 # Based on: #
16 # - 2006-09-21, Ben Low - original version # 28 # - 2006-09-21, Ben Low - original version #
17 # - Nick Williams - for TunnelBrick # 29 # - Nick Williams - for TunnelBrick #
18 # - Jonathan K. Bullard - additions for Mountain Lion # 30 # - Jonathan K. Bullard - additions for Mountain Lion #
Line 355... Line 367...
355 exit 1; 367 exit 1;
356 fi 368 fi
Line 357... Line 369...
357   369  
358 # OpenVPN passes $script_type set to the script method. 370 # OpenVPN passes $script_type set to the script method.
-   371 case "$script_type" in
-   372 ipchange)
-   373 # Set the MAC address for the tuntap device for static DHCP bindings
-   374 /sbin/ifconfig "$dev" ether $STATIC_TUNTAP_MAC_ADDRESS
-   375 # Set the interface to NONE
-   376 /usr/sbin/ipconfig set "$dev" NONE
-   377 # Set the interface to DHCP
-   378 /usr/sbin/ipconfig set "$dev" DHCP
359 case "$script_type" in 379 ;;
Line 360... Line 380...
360 up) 380 up)
361   381  
-   382 # Set the MAC address for the tuntap device for static DHCP bindings
-   383 /sbin/ifconfig "$dev" ether $STATIC_TUNTAP_MAC_ADDRESS
362 # Set the MAC address for the tuntap device for static DHCP bindings 384 # Set the interface to NONE
363 /sbin/ifconfig "$dev" ether $STATIC_TUNTAP_MAC_ADDRESS 385 /usr/sbin/ipconfig set "$dev" NONE
Line 364... Line 386...
364 # Set the interface to DHCP 386 # Set the interface to DHCP
365 /usr/sbin/ipconfig set "$dev" DHCP 387 /usr/sbin/ipconfig set "$dev" DHCP