I need to be able to view pages of my website from outside our network. I need to be able to use separate nameservers as well. Ive found the easiest way is to just launch an SSH tunnel, then I can use the OSX networksetup command to duplicate an existing interface and implement the proxy settings and different nameservers..

sudo networksetup -duplicatenetworkservice "Wi-Fi" "Wi-Fi-External" # Create a new WiFi interface
sudo networksetup -setsocksfirewallproxy Wi-Fi-Public localhost 8123
sudo networksetup -setsocksfirewallproxystate Wi-Fi-Public on
sudo networksetup -setdnsservers Wi-Fi-Public

And this works fine for now, but when im done testing and need to go back to using my internal network, I have to disable Wi-Fi-External or change the network service order.

Is there a way to launch any browser (either Chrome or FF, or whatever will work), to use a specific network interface? And everything else default to the normal one?

I found this thread which has a similar problem, but theres no accepted answer. The most popular one says to set a default route, but that wouldn't be specific to a specified application/browser.

Any help would be appreciated. Thanks!


This is what ForceBindIP does. However, some have problems getting it to work (I believe the browsers do multi-process and ForceBindIP doesn't at the moment, or soemthing?) So, test to be sure it's working right. https://r1ch.net/projects/forcebindip

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.