Connecting to a port XX on virtual Machine in virtual Box2019 Community Moderator ElectionHow can you find out which process is listening on a port on Windows?Addressing localhost from a VirtualBox virtual machineHow to SSH to a VirtualBox guest externally through a host?Win7 Host and Ubuntu Server on Virtualbox guest port forwarding issuePort forwarding from Host port 80 to VirtualBox port 80 doesn't workVirtualBox: Headless VM: Access web application from host machine.VirtualBox port forwarding not working with NAT adapterHow is Docker different from a virtual machine?Access rails server from host machineVirtualBox Port Forwarding on Windows 7 not Working

Sort array by month and year

Precision notation for voltmeters

Having the player face themselves after the mid-game

What is the orbit and expected lifetime of Crew Dragon trunk?

Why do we call complex numbers “numbers” but we don’t consider 2-vectors numbers?

Boss Telling direct supervisor I snitched

Was this cameo in Captain Marvel computer generated?

If nine coins are tossed, what is the probability that the number of heads is even?

Giving a talk in my old university, how prominently should I tell students my salary?

Why do phishing e-mails use faked e-mail addresses instead of the real one?

Use Mercury as quenching liquid for swords?

How would an energy-based "projectile" blow up a spaceship?

How do you make a gun that shoots melee weapons and/or swords?

Issue with units for a rocket nozzle throat area problem

Mixed Feelings - What am I

Who has more? Ireland or Iceland?

Why does a car's steering wheel get lighter with increasing speed

Where is the License file location for Identity Server in Sitecore 9.1?

How does a sound wave propagate?

Short SF story. Females use stingers to implant eggs in yearfathers

Did Amazon pay $0 in taxes last year?

ESPP--any reason not to go all in?

direct sum of representation of product groups

Can the Witch Sight warlock invocation see through the Mirror Image spell?



Connecting to a port XX on virtual Machine in virtual Box



2019 Community Moderator ElectionHow can you find out which process is listening on a port on Windows?Addressing localhost from a VirtualBox virtual machineHow to SSH to a VirtualBox guest externally through a host?Win7 Host and Ubuntu Server on Virtualbox guest port forwarding issuePort forwarding from Host port 80 to VirtualBox port 80 doesn't workVirtualBox: Headless VM: Access web application from host machine.VirtualBox port forwarding not working with NAT adapterHow is Docker different from a virtual machine?Access rails server from host machineVirtualBox Port Forwarding on Windows 7 not Working










-1















I have CentOs7 running as Virtual Machine in VirtualBox. I have a server running in CentOS7 on port XX (say 8091). Now from VM, I can open firefox and access is using localhost:8091 or 10.0.2.15:8091 or 192.168.122.1:8091. I can see that under settings ---> network (in virtualbox manager), the Adapter is NAT adapter and port forwarding from [host:8091 to guest:8091] and [host:2222 to guest:22]



settings ---> network tab in virtualbox Manager



port forwarding



HostOS ipconfig shown in cmd



Guest OS ifconfig in terminal



picture to show i can access webserver in guest-OS



picture to show that I can't access web-server from Host-OS



However I can't access the web server from my host using Firefox with URL
localhost:8091 or hostIP:8091 or 10.0.2.15:8091 or 192.168.122.1:8091.



Below are the questions I am fetching answers to...



1) why, even after doing the port-forwarding am I not able to access the web- server in my guest OS (i.e. CentOS7) ? However I am able to ssh from hostOS to guest OS using puTTY. Also from any other PC to VM using puTTY by connecting to hostIP:2222 . ( because of port forwarding)



2) You may ask me why I am not using bridge Adapter ? however, the IP assigned to me is static IP. Hence using bridge adapter, my VM will not be assigned any IP. assigning it manually possess a threat is assigning other's IP or some other problem I am unaware of.



3) If I change the network setting to host-only Adapter, my VM is assigned IP of 196.168.56.102, which I am able to ping from Host OS. However from Firefox (on Host OS) when i hit 196.168.56.102:8091, I am not able to connect to the web server. why ? Is there any way to do port forwarding when using "host-only adapter" ??



Observations:
1)I can see that the default gateway is blank for "Ethernet adapter VirtualBox Host-Only Network" in Host OS ipconfig in cmd
2) I am able to access internet from Guest-OS
3) The IP address of guest-os is 10.0.2.xx where "Ethernet adapter VirtualBox Host-Only Network" has IP address of 192.168.56.1. I know they aren't even correlated. Not sure though.



AM I MISSING SOMETHING ?










share|improve this question


























    -1















    I have CentOs7 running as Virtual Machine in VirtualBox. I have a server running in CentOS7 on port XX (say 8091). Now from VM, I can open firefox and access is using localhost:8091 or 10.0.2.15:8091 or 192.168.122.1:8091. I can see that under settings ---> network (in virtualbox manager), the Adapter is NAT adapter and port forwarding from [host:8091 to guest:8091] and [host:2222 to guest:22]



    settings ---> network tab in virtualbox Manager



    port forwarding



    HostOS ipconfig shown in cmd



    Guest OS ifconfig in terminal



    picture to show i can access webserver in guest-OS



    picture to show that I can't access web-server from Host-OS



    However I can't access the web server from my host using Firefox with URL
    localhost:8091 or hostIP:8091 or 10.0.2.15:8091 or 192.168.122.1:8091.



    Below are the questions I am fetching answers to...



    1) why, even after doing the port-forwarding am I not able to access the web- server in my guest OS (i.e. CentOS7) ? However I am able to ssh from hostOS to guest OS using puTTY. Also from any other PC to VM using puTTY by connecting to hostIP:2222 . ( because of port forwarding)



    2) You may ask me why I am not using bridge Adapter ? however, the IP assigned to me is static IP. Hence using bridge adapter, my VM will not be assigned any IP. assigning it manually possess a threat is assigning other's IP or some other problem I am unaware of.



    3) If I change the network setting to host-only Adapter, my VM is assigned IP of 196.168.56.102, which I am able to ping from Host OS. However from Firefox (on Host OS) when i hit 196.168.56.102:8091, I am not able to connect to the web server. why ? Is there any way to do port forwarding when using "host-only adapter" ??



    Observations:
    1)I can see that the default gateway is blank for "Ethernet adapter VirtualBox Host-Only Network" in Host OS ipconfig in cmd
    2) I am able to access internet from Guest-OS
    3) The IP address of guest-os is 10.0.2.xx where "Ethernet adapter VirtualBox Host-Only Network" has IP address of 192.168.56.1. I know they aren't even correlated. Not sure though.



    AM I MISSING SOMETHING ?










    share|improve this question
























      -1












      -1








      -1








      I have CentOs7 running as Virtual Machine in VirtualBox. I have a server running in CentOS7 on port XX (say 8091). Now from VM, I can open firefox and access is using localhost:8091 or 10.0.2.15:8091 or 192.168.122.1:8091. I can see that under settings ---> network (in virtualbox manager), the Adapter is NAT adapter and port forwarding from [host:8091 to guest:8091] and [host:2222 to guest:22]



      settings ---> network tab in virtualbox Manager



      port forwarding



      HostOS ipconfig shown in cmd



      Guest OS ifconfig in terminal



      picture to show i can access webserver in guest-OS



      picture to show that I can't access web-server from Host-OS



      However I can't access the web server from my host using Firefox with URL
      localhost:8091 or hostIP:8091 or 10.0.2.15:8091 or 192.168.122.1:8091.



      Below are the questions I am fetching answers to...



      1) why, even after doing the port-forwarding am I not able to access the web- server in my guest OS (i.e. CentOS7) ? However I am able to ssh from hostOS to guest OS using puTTY. Also from any other PC to VM using puTTY by connecting to hostIP:2222 . ( because of port forwarding)



      2) You may ask me why I am not using bridge Adapter ? however, the IP assigned to me is static IP. Hence using bridge adapter, my VM will not be assigned any IP. assigning it manually possess a threat is assigning other's IP or some other problem I am unaware of.



      3) If I change the network setting to host-only Adapter, my VM is assigned IP of 196.168.56.102, which I am able to ping from Host OS. However from Firefox (on Host OS) when i hit 196.168.56.102:8091, I am not able to connect to the web server. why ? Is there any way to do port forwarding when using "host-only adapter" ??



      Observations:
      1)I can see that the default gateway is blank for "Ethernet adapter VirtualBox Host-Only Network" in Host OS ipconfig in cmd
      2) I am able to access internet from Guest-OS
      3) The IP address of guest-os is 10.0.2.xx where "Ethernet adapter VirtualBox Host-Only Network" has IP address of 192.168.56.1. I know they aren't even correlated. Not sure though.



      AM I MISSING SOMETHING ?










      share|improve this question














      I have CentOs7 running as Virtual Machine in VirtualBox. I have a server running in CentOS7 on port XX (say 8091). Now from VM, I can open firefox and access is using localhost:8091 or 10.0.2.15:8091 or 192.168.122.1:8091. I can see that under settings ---> network (in virtualbox manager), the Adapter is NAT adapter and port forwarding from [host:8091 to guest:8091] and [host:2222 to guest:22]



      settings ---> network tab in virtualbox Manager



      port forwarding



      HostOS ipconfig shown in cmd



      Guest OS ifconfig in terminal



      picture to show i can access webserver in guest-OS



      picture to show that I can't access web-server from Host-OS



      However I can't access the web server from my host using Firefox with URL
      localhost:8091 or hostIP:8091 or 10.0.2.15:8091 or 192.168.122.1:8091.



      Below are the questions I am fetching answers to...



      1) why, even after doing the port-forwarding am I not able to access the web- server in my guest OS (i.e. CentOS7) ? However I am able to ssh from hostOS to guest OS using puTTY. Also from any other PC to VM using puTTY by connecting to hostIP:2222 . ( because of port forwarding)



      2) You may ask me why I am not using bridge Adapter ? however, the IP assigned to me is static IP. Hence using bridge adapter, my VM will not be assigned any IP. assigning it manually possess a threat is assigning other's IP or some other problem I am unaware of.



      3) If I change the network setting to host-only Adapter, my VM is assigned IP of 196.168.56.102, which I am able to ping from Host OS. However from Firefox (on Host OS) when i hit 196.168.56.102:8091, I am not able to connect to the web server. why ? Is there any way to do port forwarding when using "host-only adapter" ??



      Observations:
      1)I can see that the default gateway is blank for "Ethernet adapter VirtualBox Host-Only Network" in Host OS ipconfig in cmd
      2) I am able to access internet from Guest-OS
      3) The IP address of guest-os is 10.0.2.xx where "Ethernet adapter VirtualBox Host-Only Network" has IP address of 192.168.56.1. I know they aren't even correlated. Not sure though.



      AM I MISSING SOMETHING ?







      networking virtual-machine virtualbox portforwarding nat






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 days ago









      aditya zagadeaditya zagade

      93




      93






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Port forwarding was not working because firewall was bblocking the connection. As soon as I turned the firewall of in my VM, everything worked well






          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            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%2fstackoverflow.com%2fquestions%2f55023478%2fconnecting-to-a-port-xx-on-virtual-machine-in-virtual-box%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














            Port forwarding was not working because firewall was bblocking the connection. As soon as I turned the firewall of in my VM, everything worked well






            share|improve this answer



























              0














              Port forwarding was not working because firewall was bblocking the connection. As soon as I turned the firewall of in my VM, everything worked well






              share|improve this answer

























                0












                0








                0







                Port forwarding was not working because firewall was bblocking the connection. As soon as I turned the firewall of in my VM, everything worked well






                share|improve this answer













                Port forwarding was not working because firewall was bblocking the connection. As soon as I turned the firewall of in my VM, everything worked well







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered yesterday









                aditya zagadeaditya zagade

                93




                93





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • 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%2fstackoverflow.com%2fquestions%2f55023478%2fconnecting-to-a-port-xx-on-virtual-machine-in-virtual-box%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

                    Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

                    Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

                    Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved