Force browser (Chrome OR FireFox) to use specific network interface












1















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 8.8.8.8 8.8.4.4


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!










share|improve this question



























    1















    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 8.8.8.8 8.8.4.4


    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!










    share|improve this question

























      1












      1








      1


      0






      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 8.8.8.8 8.8.4.4


      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!










      share|improve this question














      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 8.8.8.8 8.8.4.4


      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!







      networking macos proxy ssh-tunnel network-interface






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 10 '17 at 17:44









      JustinJustin

      12317




      12317






















          1 Answer
          1






          active

          oldest

          votes


















          -1














          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






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1257945%2fforce-browser-chrome-or-firefox-to-use-specific-network-interface%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            -1














            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






            share|improve this answer




























              -1














              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






              share|improve this answer


























                -1












                -1








                -1







                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






                share|improve this answer













                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







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 19 at 3:46









                Joshua Richards jr2 0x6A7232Joshua Richards jr2 0x6A7232

                1




                1






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1257945%2fforce-browser-chrome-or-firefox-to-use-specific-network-interface%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Aardman Animations

                    Are they similar matrix

                    “minimization” problem in Euclidean space related to orthonormal basis