erstazi wrote: > On 05/24/2010 11:04 AM, Leonardo Carneiro - Veltrac wrote: > >> erstazi wrote: >> >> >>> On 05/24/2010 09:51 AM, Leonardo Carneiro - Veltrac wrote: >>> >>> >>> >>>> Leonardo Carneiro - Veltrac wrote: >>>> >>>> >>>> >>>> >>>>> erstazi wrote: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> On 05/24/2010 09:00 AM, Leonardo Carneiro - Veltrac wrote: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> Hello again every one. I'm trying to setup a port forwarding with nat >>>>>>> on vbox 3.2, but without any success. >>>>>>> >>>>>>> Here is what i have now: >>>>>>> >>>>>>> Host: Debian Lenny amd64, public IP at eth0. >>>>>>> Guest: Windows Server 2K8 32bit running on vboxheadless 3.2 >>>>>>> >>>>>>> On the guest, i have two interfaces: one 'natted' behind eth0, and >>>>>>> other in a host-only adapter. >>>>>>> >>>>>>> host:~# VBoxManage showvminfo SERVER | grep "NIC 1" >>>>>>> NIC 1: MAC: 08002733ABA8, Attachment: NAT, Cable >>>>>>> connected: on, Trace: off (file: none), Type: 82540EM, Reported >>>>>>> speed: 0 Mbps, Boot priority: 0 >>>>>>> NIC 1 Settings: MTU: 0, Socket( send: 64, receive: 64), TCP >>>>>>> Window( send:64, receive: 64) >>>>>>> NIC 1 Rule(0): name = sw, protocol = tcp, host ip = , host port >>>>>>> = 4820, guest ip = , guest port = 4820 >>>>>>> >>>>>>> I did some tests. I tried to connect from my computer to the server >>>>>>> in question. When tcpdumping on the eth0 of the host, i saw the >>>>>>> requests coming, but none getting out. At the same time, Wireshark >>>>>>> was active on the guest, and none of the request was fowarded to the >>>>>>> guest. >>>>>>> >>>>>>> Here is the command line that i user to setup the portfowarding: >>>>>>> VBoxManage modifyvm "SERVER" --natpf1 "sw,tcp,,4820,,4820" >>>>>>> >>>>>>> What i'm doing wrong? Tks in advance. >>>>>>> -- >>>>>>> Leonardo Carneiro >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> Hello Leonardo, >>>>>> >>>>>> Did you shut down the guest completely and then start the guest? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> The vbox process crashed once after i applied the rules. Did this count? >>>>> >>>>> >>>>> >>>>> >>>> Updated the Guest additions (3.1.6 to 3.2) and restarted the system. >>>> Port fowarding still not working =/ >>>> >>>> >>>> >>>> >>> Is port 4820 in use on the host (from a separate process of VirtualBox)? >>> Is the service running on the guest? >>> >>> In all technical purposes, what you specified should work without >>> issues. I just tested it with: >>> VBoxManage modifyvm "VMNAME --natpf1 "sw,tcp,,2222,,22" >>> Basically SSH'ing into the guest. Worked without problems. >>> >>> >> Hi erstazi. Just checked both. The port is not in use by the host and >> the the service is running on the guest. Just to be sure, i changed the >> rule. I deleted the old one and setup this new: VBoxManage modifyvm >> "SERVER" --natpf1 "sw,tcp,[public ip of eth0],4820,,4820" >> >> The Windows Firewall on the guest system is ON, but is configured to >> allow such services to receive connection. >> >> I notice the following: when i try to open a telnet session to the host >> ip in the port 4820, the connection is stabilished (altought the guest >> doesn't see anything in the wireshark). I assume that the vbox network >> procedures does some kind of proxy to the tcp connection. The funny >> thing is, when i disabled the windows firewall for testing porpoises, i >> still could open telnet sessions, but if i send any byte, it returns me >> a string with ERROR. >> >> host:/windows# telnet [public_ip_eth0] 4820 >> Trying [public_ip_eth0]... >> Connected to [public_ip_eth0]. >> Escape character is '^]'. >> das >> ERROR >> dsa >> ERROR >> ^] >> telnet> quit >> Connection closed. >> >> I'll do some more testing regarding Windows Firewall, but this was very odd. >> >> >> > Just curious, what is this service that you are running? are you sure > your service doesn't need UDP? I would also run a test to make sure that > you have another NAT pf setup for UDP. > > VBoxManage modifyvm "SERVER" --natpf1 "sw,udp,[public ip of > eth0],4820,,4820" > > Also, is your host-only interface the first or second? > How about your NAT interface? is it first or second? > I only ask this because if the NAT interface was second, then you would > need to use --natpf2 Hi erstazi. I finnally did it. Tks for your awesome help. At the end of the day, it was a windows firewall misconfiguration, because i misunderstood the way the port forwarding of vbox works.
VirtualBox does a source AND destination nat. When my client tried to connect to the service inside the VM, the source IP appeared to the VM was the ip of the dhcp server. But its all working now. Tks again for your awesome help. ------------------------------------------------------------------------------ _______________________________________________ VBox-users-community mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/vbox-users-community
