Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: VirtualBox blocking my VM's TCP ports

  1. #1
    Join Date
    Nov 2006
    Beans
    846

    VirtualBox blocking my VM's TCP ports

    I have VirtualBox VM running Windows XP.
    My XP client does not have a firewall nor even antivirus.

    Something is blocking the TCP Port I am using. I can successfully test my software inside the VM client but all attempts from the host or outside my LAN fail.

    I have my VM in Bridge mode networking.

    I suspect its the VirtualBox software that is doing the blocking of TCP ports. Any help is appreciated.

    Thanks

    Carl
    Carl
    My other hobby is antique Radios and TV restoration.

  2. #2
    Join Date
    Sep 2008
    Location
    Louisiana, USA
    Beans
    233
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: VirtualBox blocking my VM's TCP ports

    Try using NAT instead of Bridged.
    Any advice given is the direct result of my experience solving my problems on my system. I have no idea what I'm talking about. ~Bouge

  3. #3
    Join Date
    Dec 2005
    Location
    Tucson, AZ
    Beans
    1,365

    Re: VirtualBox blocking my VM's TCP ports

    The problem with going NAT would then be that the client/guest would then be on a different network all together.

    What is the IP and subnet of each PC, host and guest?

    XP does have a firewall by default. Did you disable that or open the appropriate port?

  4. #4
    Join Date
    Nov 2006
    Beans
    846

    Re: VirtualBox blocking my VM's TCP ports

    Windows Firewall on the XP VM is turned off.
    No other firewalls.
    No Antivirus either.

    My host and my VM are using IPs on my LAN 192.168.0.xxx

    Carl
    Carl
    My other hobby is antique Radios and TV restoration.

  5. #5
    Join Date
    Dec 2005
    Location
    Tucson, AZ
    Beans
    1,365

    Re: VirtualBox blocking my VM's TCP ports

    Why not include the whole IP? But I'm assuming there is no conflicts in address and they are in the same subnet.

    Can each system ping the other?

    Do you want to let us know what software you are testing?

  6. #6
    Join Date
    Nov 2006
    Beans
    846

    Smile Re: VirtualBox blocking my VM's TCP ports

    Both the host and the VM can ping each other.

    From the host, I test the port and get this:

    $ telnet 192.168.0.202 20666
    Trying 192.168.0.202...
    telnet: Unable to connect to remote host: Connection refused

    The listener is running on the Windows XP VM.


    Within the VM, I can go to the command prompt and similarly use telnet and test the port and it connects and works like this:
    C> telnet 127.0.0.1 20666

    but I get connection refused if I do this:
    C> telnet 192.168.0.202 20666



    This is some software that I am writing. Its purpose is to collect data from a number of remotely located PC's. The server is to be an Ubuntu Linux box running a VM - Windows XP or Server 2003.

    My software works when I test within the VM but I get "Connection refused" when I test from the host machine.

    There is something inside Ubuntu or Virtual Box that is blocking this port.

    Any insights are appreciated. Thanks.

    Carl
    Last edited by cwmoser; June 20th, 2011 at 01:11 PM.
    Carl
    My other hobby is antique Radios and TV restoration.

  7. #7
    Join Date
    Dec 2005
    Location
    Tucson, AZ
    Beans
    1,365

    Re: VirtualBox blocking my VM's TCP ports

    I think it is unlikely it is Ubuntu or Virtualbox blocking this port. My next guess would be your networking hardware is causing the issue.

    As there a functional difference between if connect via 192.168.0.202 and 127.0.0.1 that gets me thinking infrastructure issue. If you use the localhost address it does no get routed where as the IP address uses the router/switch. So the limiting factor has to be the router because once you remove it your connection is fine.

    So what is your router make/model?

  8. #8
    Join Date
    Nov 2006
    Beans
    846

    Re: VirtualBox blocking my VM's TCP ports

    I have a TP-Link router TL-WR541G.

    I have Forwarding set to allow the port to the VM IP address 192.168.0.202.

    I set up a test to see if I can communicate outside to the host Ubuntu box and it works.

    I think its got to be something in VirtualBox or something to do with the VM's virtual NIC interface. I can't find any firewall within the XP VM at all.

    Stumped


    Carl
    Carl
    My other hobby is antique Radios and TV restoration.

  9. #9
    Join Date
    Nov 2006
    Beans
    846

    Re: VirtualBox blocking my VM's TCP ports

    My software is based on .NET 2.0.
    I wonder if there is a security policy that is causing the TCP port to be blocked?

    Carl
    Carl
    My other hobby is antique Radios and TV restoration.

  10. #10
    Join Date
    Sep 2008
    Location
    Louisiana, USA
    Beans
    233
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: VirtualBox blocking my VM's TCP ports

    I've had this issue before using 'Bridged' in VirtualBox on an Ubuntu Server VM, and using NAT fixed it. With Bridged, the VM seems to share the host's interface, so I gathered that the host was swallowing up requests, not VirtualBox. With NAT the VM gets to do its own thing outside of the host, and appears as any other machine on my internal network.

    No, I'm no network expert, so I really don't know the specifics of what's going on, but after spending a couple days fighting a Bridged setup not accepting requests from anything outside of itself, a simple switch to NAT solved it. Now, on any VM I set up that is intended to listen for requests (or anything I want to exists as a 'true' machine, directly connected to the network), I use NAT, and have no issues.
    Last edited by GWBouge; June 20th, 2011 at 07:28 PM.
    Any advice given is the direct result of my experience solving my problems on my system. I have no idea what I'm talking about. ~Bouge

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •