Arif
-
10:29:58 am on April 11, 2013 | # |
Change internet default route in Mac OS X to USB HSDPA modem stick with LAN’ certain subnet routed via a gateway in WiFi (
en1
).In my case DNS will go with the modem interface setting remain routed via USB modem stick
before routing:
$ netstat -nr Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 10.64.64.64 UGSc 72 137 ppp0 default link#4 UCSI 0 0 en0 default 10.1.1.1 UGScI 0 0 en1
Delete and add routes (desired LAN subnet 192.168.1.0/24:
sudo route -n delete default 10.1.1.1 sudo route -n add default 10.64.64.64 sudo route -n add 192.168.1.0/24 10.1.1.1
after routing:
$ netstat -nr Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 10.64.64.64 UGSc 21 0 ppp0 default link#4 UCSI 0 0 en0 default 10.1.1.1 UGScI 0 0 en1 10.1.1/24 link#5 UCS 6 0 en1 ... 192.168.1 10.1.1.1 UGSc 0 0 en1 ...