Last active
April 4, 2023 11:19
-
-
Save cpthooch/706943dfe9a62771f4c3ab5adecf2b5b to your computer and use it in GitHub Desktop.
Revisions
-
cpthooch revised this gist
Aug 21, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,8 +3,8 @@ # NOTE: wifi network interface is: en1 wifi_router=192.168.200.1 wifi_address=en1:ec.35.86.4f.00.bc TOADDR=`ifconfig en1 inet | sed -nl 's/\w*inet \([^ ]*\).*/\1/p'` TO=`echo -n ${TOADDR//[[:space:]]}` echo "ADDING ROUTE TO $1 VIA en1 (wi-fi): $TO" route -n add -host $1 $wifi_router -ifp $wifi_address -ifa $TO -static -
cpthooch created this gist
Aug 21, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #!/bin/bash # NOTE: wifi network interface is: en1 wifi_router=192.168.200.1 wifi_address=en1:ec.35.86.4f.00.bc export TOADDR=`ifconfig en1 inet | sed -nl 's/\w*inet \([^ ]*\).*/\1/p'` export TO=`echo -n ${TOADDR//[[:space:]]}` echo "ADDING ROUTE TO $1 VIA en1 (wi-fi): $TO" route -n add -host $1 $wifi_router -ifp $wifi_address -ifa $TO -static echo "" echo "ROUTE ADDED:" route get $1