#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 , 18 years ago
comment:3 by , 17 years ago
Component: | other → network |
---|
comment:4 by , 16 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 , 16 years ago
Component: | network → network/NAT |
---|
comment:6 by , 16 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:8 by , 16 years ago
follow-up: 10 comment:9 by , 16 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.
comment:10 by , 16 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 .
follow-up: 12 comment:11 by , 16 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.
comment:12 by , 16 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:14 by , 16 years ago
Summary: | Passive FTP to host via NAT networking broken → Passive FTP to host via NAT networking broken => fixed in SVN |
---|
comment:15 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 17 comment:16 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Just installed 3.0.4 and I don't see it as fixed. Any way I can help you debug the problem?
comment:17 by , 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 , 15 years ago
Version: | VirtualBox 1.4.0 → VirtualBox 3.0.4 |
---|
follow-up: 21 comment:19 by , 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 , 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.
comment:21 by , 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 , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Of course the host's IP is 10.0.2.2, not 10.0.2.0 like in the previous message...