VirtualBox

Opened 17 years ago

Closed 15 years ago

Last modified 14 years ago

#430 closed defect (fixed)

Passive FTP to host via NAT networking broken => fixed in SVN

Reported by: freggy Owned by:
Component: network/NAT Version: VirtualBox 3.0.4
Keywords: Cc:
Guest type: other Host type: other

Description

I have Virtualbox OSE 1.4.0 running on Mandriva Linux Cooker x86_64 (installed from Mandriva packages). In Virtualbox I have a Mandriva 2007.1 Spring i586 installation running. The virtual machine is connected via Virtualbox NAT: the host has address 10.0.2.0, the client 10.0.2.15.

I try to access an FTP server running on the host from the virtual machine. This fails with passive FTP, because the NAT engine returns 127.0.0.1 as the host address:

[root@localhost frederik]# wget ftp://10.0.2.2/Mandriva/2007.1/i586/media/main/release --23:34:51-- ftp://10.0.2.2/Mandriva/2007.1/i586/media/main/release

=> `release'

Connecting to 10.0.2.2:21... connected. Logging in as anonymous ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD /Mandriva/2007.1/i586/media/main ... done. ==> PASV ... couldn't connect to 127.0.0.1 port 26318: Connection refused

A Wireshark capture confirms that the virtual machine received 127.0.0.1 port 26318 after the PSV command. So it seems the Virtualbox NAT engine screws up the FTP connection: actually in this case NAT probably should not even be needed as host and client are connected to the same network.

Change History (22)

comment:1 by freggy, 17 years ago

Of course the host's IP is 10.0.2.2, not 10.0.2.0 like in the previous message...

comment:2 by Renaud, 16 years ago

Same issue with a Solaris host and WinXP guest running VBox 1.5.51.

comment:3 by Frank Mehnert, 16 years ago

Component: othernetwork

comment:4 by Christiano Farina Haesbaert, 15 years ago

Same behaviour using OS X as host system and an openBSD as guest, trying to connect to outside ftp server (ftp.openbsd.org), not using nat mode, using host network mode and os x nat. I believe is something to do with virtual box, since I used to use similiar configurations with QEMU and others.

comment:5 by Frank Mehnert, 15 years ago

Component: networknetwork/NAT

comment:6 by Steve Lemke, 15 years ago

Looks like "outbound" (guest -> host) ftp (#2932) was fixed, but is there any update on getting INBOUND (host -> guest) FTP (this bug) fixed?

comment:7 by Steve Lemke, 15 years ago

It's still happening with VirtualBox 3.0.2 r49928...

in reply to:  7 comment:8 by vasily Levchenko, 15 years ago

Replying to lemketron:

It's still happening with VirtualBox 3.0.2 r49928...

Please attach your log.

comment:9 by Steve Lemke, 15 years ago

Which log? Actually, I just realized I got the direction wrong -- the original bug was guest -> host, not inbound, which doesn't really work due to the inbound address not being fixed up by the NAT. However, I think I've found a solution that works for me... A minor patch to the guest ftp server with a configuration option to force-fix the inbound IP address when it doesn't match, and that might just solve it for my needs.

in reply to:  9 comment:10 by vasily Levchenko, 15 years ago

Replying to lemketron:

Which log? Actually, I just realized I got the direction wrong -- the original bug was guest -> host, not inbound, which doesn't really work due to the inbound address not being fixed up by the NAT. However, I think I've found a solution that works for me... A minor patch to the guest ftp server with a configuration option to force-fix the inbound IP address when it doesn't match, and that might just solve it for my needs.

Log of your VM. The problem was introduced in 3.0 branch and already has been fixed in svn. I need information about your host to offer test build .

comment:11 by aargh, 15 years ago

I see the same issue. Running the latest stable virtualbox build - 3.0.2.

Win XP 32 bit host Ubuntu 9.0.4 32 bit guest

I can login to an ftp site but can't do a file listing. The command/connection times out after a while. This used to work fine pre VitualBox 3.x.

in reply to:  11 comment:12 by vasily Levchenko, 15 years ago

Replying to aargh:

I see the same issue. Running the latest stable virtualbox build - 3.0.2.

Win XP 32 bit host Ubuntu 9.0.4 32 bit guest

I can login to an ftp site but can't do a file listing. The command/connection times out after a while. This used to work fine pre VitualBox 3.x.

Fixed in svn will be available in 3.0.4

comment:13 by aargh, 15 years ago

Excellent. Any release date?

comment:14 by vasily Levchenko, 15 years ago

Summary: Passive FTP to host via NAT networking brokenPassive FTP to host via NAT networking broken => fixed in SVN

comment:15 by vasily Levchenko, 15 years ago

Resolution: fixed
Status: newclosed

comment:16 by aargh, 15 years ago

Resolution: fixed
Status: closedreopened

Just installed 3.0.4 and I don't see it as fixed. Any way I can help you debug the problem?

in reply to:  16 comment:17 by vasily Levchenko, 15 years ago

Replying to aargh:

Just installed 3.0.4 and I don't see it as fixed. Any way I can help you debug the problem?

Could you please attach your ftp log session here? usually ftp client command (debug 9) do the job.

comment:18 by vasily Levchenko, 15 years ago

Version: VirtualBox 1.4.0VirtualBox 3.0.4

comment:19 by aargh, 15 years ago

Password:
---> PASS XXXX
230 User sra logged in, access restrictions apply.
---> SYST
215 UNIX Type: L8 Version: SVR4
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
ftp: setsockopt (ignored): Permission denied
---> PORT 10,0,2,15,156,11
200 PORT command successful.
---> LIST
425 Can't build data connection: Connection timed out.

comment:20 by aargh, 15 years ago

Sorry for the coredump above.. but this is what i did with ftp -d <site_address>. I'm able to login ok but fail to do a file listing or a ascii/binary transfer. The connection times out after a while.

in reply to:  19 comment:21 by vasily Levchenko, 15 years ago

Replying to aargh:

> Password:
> ---> PASS XXXX
> 230 User sra logged in, access restrictions apply.
> ---> SYST
> 215 UNIX Type: L8 Version: SVR4
> Remote system type is UNIX.
> Using binary mode to transfer files.
> ftp> ls
> ftp: setsockopt (ignored): Permission denied
> ---> PORT 10,0,2,15,156,11
> 200 PORT command successful.
> ---> LIST
> 425 Can't build data connection: Connection timed out.

It isn't passive ftp it's active one.(please see #4427)

comment:22 by vasily Levchenko, 15 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use