Routing specific web sites through wifi

0

I am using Macbook and it's connected to office Ethernet and wifi (Mobile hotspot). Few website like - https://firebase.google.com/ don't work properly through office ethernet I need to switch to mobile hotspot.

I have very little network knowledge I could not find any step by step solution to do so.

I was thinking is there any way to open few website through wifi only?

Anirban

Posted 2018-05-22T03:52:07.370

Reputation: 101

Its probably not easily possible to route some websites via Wifi - but what you can do is route some IP addresses via WIFI, which effectively does the same thing - provided the IP address does not change, and with the side effect of routing any other sites using that IP address through wifi as well. I don't use a MAC so I can't advise the exact command but it will be something like "route add -host X.X.X.X --interface WIFIIFNAME – davidgo – 2018-05-22T05:09:40.520

so in this case X.X.X.X will be the ip address of https://firebase.google.com/ ?

– Anirban – 2018-05-22T05:43:11.230

@davidgo WIFIIFNAME mean the name of the wifi (Mobile Hotspot name) ? – Anirban – 2018-05-22T06:50:34.637

No, WIFINAME would be either the IP address of the Hotspot or the name of the WIFI interface on your MAC. You can probably deduce this from doing a 'netstat -nr' and looking for other IP addresses routed out that Interface. – davidgo – 2018-05-22T07:14:57.817

Also, while X.X.X.X would be the IP address of "firebase.google.com", when it comes to sites hosted at big providers you need to be very careful as there is usually more then 1 IP address associated with a site. You might want to add a line in your hosts file to map the domain name to the IP address (but this can break if Google update their site) – davidgo – 2018-05-22T07:16:20.970

@davidgo thanks for the clarification. Can you tell me where can I get the ip address of a site like firebase.google.com – Anirban – 2018-05-22T07:19:22.053

Its fraught with issues and limitations, but if you open a shell and type "ping firebase.google.com" it will come back with an IP address you can use. (I can't give you a good address because I'm in NZ, so the one I get points to their data center in Sydney) – davidgo – 2018-05-22T07:26:21.663

No answers