Virtual Box bridged network and port forwarding





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I have a problem.
Here is diagram of my network.
enter image description here




  1. I have WIFI Router connected to the internet, I have order static IP from my ISP so I can access my local PC via the internet.

  2. My router creates network 192.168.0.0/24

  3. I have some ports forwared to my Local PC server (192.168.0.101)
    enter image description here

  4. I have virtual box installed on my local PC

  5. There two nodes created and maintained through vagrant, but we are interested in first node.

  6. Each VM has two NIC first is NAT for Vagrant communication second is Bridged adapter through Local PC interface enp3s0.

  7. All nodes has specific MAC addresses that are binded in Router DHCP settings to give them static IP (192.168.0.110 and 192.168.0.111)

  8. Everything works inside the local network, nodes receive correct IP addresses, and I can access any node port through local network

  9. My node with ip 192.168.0.110 runs Apache server and inside local network it works fine.

  10. I want to access my this node apache server from the outside so I forwarded external port 8888 to local port 80 to machine with IP 192.168.0.110 as you can see in the screenshot above.


But the problem is that I cannot access node apache from the outside. Connection is timed out or reset. I have tried to capture traffic using Wireshark and I can see following errors.



enter image description hereenter image description here
Is it possible to get this working ? Or only one solution is to
forward ports to 192.168.0.101 PC than forward packets to the Node using NAT with port forwarding ?



Please help to solve this problem.
Thanks.










share|improve this question





























    1















    I have a problem.
    Here is diagram of my network.
    enter image description here




    1. I have WIFI Router connected to the internet, I have order static IP from my ISP so I can access my local PC via the internet.

    2. My router creates network 192.168.0.0/24

    3. I have some ports forwared to my Local PC server (192.168.0.101)
      enter image description here

    4. I have virtual box installed on my local PC

    5. There two nodes created and maintained through vagrant, but we are interested in first node.

    6. Each VM has two NIC first is NAT for Vagrant communication second is Bridged adapter through Local PC interface enp3s0.

    7. All nodes has specific MAC addresses that are binded in Router DHCP settings to give them static IP (192.168.0.110 and 192.168.0.111)

    8. Everything works inside the local network, nodes receive correct IP addresses, and I can access any node port through local network

    9. My node with ip 192.168.0.110 runs Apache server and inside local network it works fine.

    10. I want to access my this node apache server from the outside so I forwarded external port 8888 to local port 80 to machine with IP 192.168.0.110 as you can see in the screenshot above.


    But the problem is that I cannot access node apache from the outside. Connection is timed out or reset. I have tried to capture traffic using Wireshark and I can see following errors.



    enter image description hereenter image description here
    Is it possible to get this working ? Or only one solution is to
    forward ports to 192.168.0.101 PC than forward packets to the Node using NAT with port forwarding ?



    Please help to solve this problem.
    Thanks.










    share|improve this question

























      1












      1








      1








      I have a problem.
      Here is diagram of my network.
      enter image description here




      1. I have WIFI Router connected to the internet, I have order static IP from my ISP so I can access my local PC via the internet.

      2. My router creates network 192.168.0.0/24

      3. I have some ports forwared to my Local PC server (192.168.0.101)
        enter image description here

      4. I have virtual box installed on my local PC

      5. There two nodes created and maintained through vagrant, but we are interested in first node.

      6. Each VM has two NIC first is NAT for Vagrant communication second is Bridged adapter through Local PC interface enp3s0.

      7. All nodes has specific MAC addresses that are binded in Router DHCP settings to give them static IP (192.168.0.110 and 192.168.0.111)

      8. Everything works inside the local network, nodes receive correct IP addresses, and I can access any node port through local network

      9. My node with ip 192.168.0.110 runs Apache server and inside local network it works fine.

      10. I want to access my this node apache server from the outside so I forwarded external port 8888 to local port 80 to machine with IP 192.168.0.110 as you can see in the screenshot above.


      But the problem is that I cannot access node apache from the outside. Connection is timed out or reset. I have tried to capture traffic using Wireshark and I can see following errors.



      enter image description hereenter image description here
      Is it possible to get this working ? Or only one solution is to
      forward ports to 192.168.0.101 PC than forward packets to the Node using NAT with port forwarding ?



      Please help to solve this problem.
      Thanks.










      share|improve this question














      I have a problem.
      Here is diagram of my network.
      enter image description here




      1. I have WIFI Router connected to the internet, I have order static IP from my ISP so I can access my local PC via the internet.

      2. My router creates network 192.168.0.0/24

      3. I have some ports forwared to my Local PC server (192.168.0.101)
        enter image description here

      4. I have virtual box installed on my local PC

      5. There two nodes created and maintained through vagrant, but we are interested in first node.

      6. Each VM has two NIC first is NAT for Vagrant communication second is Bridged adapter through Local PC interface enp3s0.

      7. All nodes has specific MAC addresses that are binded in Router DHCP settings to give them static IP (192.168.0.110 and 192.168.0.111)

      8. Everything works inside the local network, nodes receive correct IP addresses, and I can access any node port through local network

      9. My node with ip 192.168.0.110 runs Apache server and inside local network it works fine.

      10. I want to access my this node apache server from the outside so I forwarded external port 8888 to local port 80 to machine with IP 192.168.0.110 as you can see in the screenshot above.


      But the problem is that I cannot access node apache from the outside. Connection is timed out or reset. I have tried to capture traffic using Wireshark and I can see following errors.



      enter image description hereenter image description here
      Is it possible to get this working ? Or only one solution is to
      forward ports to 192.168.0.101 PC than forward packets to the Node using NAT with port forwarding ?



      Please help to solve this problem.
      Thanks.







      networking router virtualbox port-forwarding bridge






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 16 '16 at 5:09









      CROSPCROSP

      181210




      181210






















          1 Answer
          1






          active

          oldest

          votes


















          0














          I realize this isn't the answer you are looking for but I racked my brain for over a day and came to this conclusion. It should work and does not. I'm a Linux pro and versed in networking of it. Other forums say you are doing it right, I agree, and should work. I myself tried your exact same setup on two completely different networks and it just does not work.



          You have to do it with a NAT adapter along side the bridged adapter. Set up a port forward on the NAT and set the Host IP to 0.0.0.0.



          In your router do a port forward to the HOST IP address, NOT the client VM bridged IP. So per your example port forward 8888 to the HOST IP address on the SAME PORT 8888.



          Then in Vagrant the NAT port forward would look like:



          config.vm.network "forwarded_port", guest: 80, host_ip: "0.0.0.0", host: 8888





          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%2f1135418%2fvirtual-box-bridged-network-and-port-forwarding%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









            0














            I realize this isn't the answer you are looking for but I racked my brain for over a day and came to this conclusion. It should work and does not. I'm a Linux pro and versed in networking of it. Other forums say you are doing it right, I agree, and should work. I myself tried your exact same setup on two completely different networks and it just does not work.



            You have to do it with a NAT adapter along side the bridged adapter. Set up a port forward on the NAT and set the Host IP to 0.0.0.0.



            In your router do a port forward to the HOST IP address, NOT the client VM bridged IP. So per your example port forward 8888 to the HOST IP address on the SAME PORT 8888.



            Then in Vagrant the NAT port forward would look like:



            config.vm.network "forwarded_port", guest: 80, host_ip: "0.0.0.0", host: 8888





            share|improve this answer






























              0














              I realize this isn't the answer you are looking for but I racked my brain for over a day and came to this conclusion. It should work and does not. I'm a Linux pro and versed in networking of it. Other forums say you are doing it right, I agree, and should work. I myself tried your exact same setup on two completely different networks and it just does not work.



              You have to do it with a NAT adapter along side the bridged adapter. Set up a port forward on the NAT and set the Host IP to 0.0.0.0.



              In your router do a port forward to the HOST IP address, NOT the client VM bridged IP. So per your example port forward 8888 to the HOST IP address on the SAME PORT 8888.



              Then in Vagrant the NAT port forward would look like:



              config.vm.network "forwarded_port", guest: 80, host_ip: "0.0.0.0", host: 8888





              share|improve this answer




























                0












                0








                0







                I realize this isn't the answer you are looking for but I racked my brain for over a day and came to this conclusion. It should work and does not. I'm a Linux pro and versed in networking of it. Other forums say you are doing it right, I agree, and should work. I myself tried your exact same setup on two completely different networks and it just does not work.



                You have to do it with a NAT adapter along side the bridged adapter. Set up a port forward on the NAT and set the Host IP to 0.0.0.0.



                In your router do a port forward to the HOST IP address, NOT the client VM bridged IP. So per your example port forward 8888 to the HOST IP address on the SAME PORT 8888.



                Then in Vagrant the NAT port forward would look like:



                config.vm.network "forwarded_port", guest: 80, host_ip: "0.0.0.0", host: 8888





                share|improve this answer















                I realize this isn't the answer you are looking for but I racked my brain for over a day and came to this conclusion. It should work and does not. I'm a Linux pro and versed in networking of it. Other forums say you are doing it right, I agree, and should work. I myself tried your exact same setup on two completely different networks and it just does not work.



                You have to do it with a NAT adapter along side the bridged adapter. Set up a port forward on the NAT and set the Host IP to 0.0.0.0.



                In your router do a port forward to the HOST IP address, NOT the client VM bridged IP. So per your example port forward 8888 to the HOST IP address on the SAME PORT 8888.



                Then in Vagrant the NAT port forward would look like:



                config.vm.network "forwarded_port", guest: 80, host_ip: "0.0.0.0", host: 8888






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 31 at 21:29

























                answered Jan 31 at 21:21









                shrimpwagonshrimpwagon

                1013




                1013






























                    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%2f1135418%2fvirtual-box-bridged-network-and-port-forwarding%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

                    If I really need a card on my start hand, how many mulligans make sense? [duplicate]

                    Alcedinidae

                    Can an atomic nucleus contain both particles and antiparticles? [duplicate]