Author Topic: Using FTP client from OS/2 guest installation in Virtualbox run. on win10 host  (Read 509 times)

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 66
  • Posts: 647
  • Karma: +3/-0
    • View Profile
I am trying to use an ftp client within a OS/2 guest running on win 10 host.
Using Virtualbox, I "selected bridged networking" for the guest. The guest receives it's IP address via DHCP. By the way, I am using a WiFi connection from the host to the router and therefore, the selected adapter for the "bridged networking" connection is the WiFi adapter.

From the guest I can ping the outside world, let's say "www.microsoft.com". I can also use a web browser.
What I cannot get to work is using an ftp client from the guest. I tried the standard OS/2 ftp client and also "nftp" but both ftp clients eventually fail to communicate with port 21 (I guess that is the target port of the ftp server I attempt to connect to ?).

Can anyone tell me what I need to change either in my router or on my Win 10 host so that I can run an ftp client from the guest ?


ivan

  • Hero Member
  • *****
  • Thank You
  • -Given: 2
  • -Receive: 45
  • Posts: 1226
  • Karma: +2/-0
    • View Profile
Hi Lars,

A quick question, where is the FTP server you are trying to connect to - on the local network or outside?  I ask this because I find it easier to to use the IP address of the host if on the local network.

For going outside the local network, again I will use the IP address if I know it and I have the tcp port 21 open as well as the udp port 21 open - if using ssh you also need port 22 open for tcp and udp.

Sorry I can't be specific about VirtualBox  because I can't get an OS/2 host to work on my Ryzen based computers.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 32
  • Posts: 592
  • Karma: +1/-0
    • View Profile
Have you also tried NAT?

This AN Wiki page may be useful.

Roderick Klein

  • Sr. Member
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 23
  • Posts: 365
  • Karma: +2/-0
    • View Profile
Have you also tried NAT?

This AN Wiki page may be useful.

I would recommend not doing that you place two NAT layers in a row. And I know the port translation does not go very well.
Using bridge mode is better then NAT of a VM,

Roderick

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 66
  • Posts: 647
  • Karma: +3/-0
    • View Profile
Hi Lars,

A quick question, where is the FTP server you are trying to connect to - on the local network or outside?  I ask this because I find it easier to to use the IP address of the host if on the local network.

For going outside the local network, again I will use the IP address if I know it and I have the tcp port 21 open as well as the udp port 21 open - if using ssh you also need port 22 open for tcp and udp.

Sorry I can't be specific about VirtualBox  because I can't get an OS/2 host to work on my Ryzen based computers.

What I wanteed to do is to upload my updated USB driver set to Hobbes, so yes, I tried to access a remote FTP server.
1) why would I need to open port 21 (and possibly 20 also) at all ? I mean, after all, I am running an FTP client and not an FTP server ?
2) in my desperation, I did open ports 20 and 21 in my router but that did not make a difference. When doing so, I found out that the router only sees the IP address of the host OS (Windows 10) but it does not see the IP address of the guest OS (OS/2) and therefore I could not really open the ports for the guest IP address. On the other hand, it makes sense that the router only sees the host IP address. As far as I understand, "bridged networking" makes VirtualBox assign an IP address to the guest and when the guest sends or receive an ethernet packet, the guest IP address is silently replaced by the host IP address (on send) or vice versa (on receive).

As I said, I am runnning OS/2 as a guest in Virtualbox and not as a Virtualbox host.

Ian Manners

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 44
  • -Receive: 28
  • Posts: 356
  • Karma: +1/-0
  • I am the computer, it is me.
    • View Profile
    • ComKal Networks Australia
Hi Lars,

A few years ago I had OS/2 loaded in Virtual Box under Linux while I did some traveling. Using EmTec FTP for OS/2 I figured out I have to change from either Active to Passive mode, of the other way around, I cant remember now but whatever I originally used before making an image from my PC to use under Virtual Box, I had to use the opposite mode. I also think I had to use NAT for the network, and not the IP replacement mode.
Cheers
Ian B Manners

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 66
  • Posts: 647
  • Karma: +3/-0
    • View Profile
Hallo Ian,

thanks for your info. In fact, I have been playing around with active vs.  passive FTP and yes, Hobbes definitely requires passive FTP to work at all.

But it turns out that the Hobbes FTP server is the problem. I can logon to other FTP servers (IBM, for example) without any problem and browse and switch directories, read files etc.
The only FTP client that works reliably with Hobbes these days seems to be Filezilla under Windows 10. I do not know what magic it does, but it works. What I am going to do is to place my USB driver ZIP into a Windows directory that I have made visible via the guest extensions (the .IFS driver) and then I can send it via Filezilla from Windows 10.

I don't know what they did to the Hobbes FTP server. In the last 20 years before, I did not have a problem. But in the last 2 years, it has become increasingly difficult to upload files.
« Last Edit: October 23, 2020, 01:33:03 pm by Lars »

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 11
  • -Receive: 195
  • Posts: 2720
  • Karma: +16/-0
    • View Profile
ncftp seems to work fine with Hobbes. Do have to blindly cd to /pub after logging in, which is a bit strange.

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 66
  • Posts: 647
  • Karma: +3/-0
    • View Profile
Have you tried a "ls" or "dir" after changing to say /pub/incoming ?
That will always hang here.

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 60
  • Posts: 1383
  • Karma: +0/-0
    • View Profile
I have been using jFTP, from: http://jmethods.com/mvn-repo/com/myjavaworld/jftp/5.0.1/jftp-5.0.1-bin.zip with good success. It is a JAVA program, with all that that means. I changed jFTP.CMD to:
Code: [Select]
rem java -Xmx512m -Xms32m -jar jftp-5.0.1.jar
java -Xmx640m -Xms320m -jar jftp-5.0.1.jar
I left the first line in, because I only recently changed it. I haven't had a crash since I did that, but it didn't crash very often before. I do need to make sure that things like OpenOffice, and Firefox, are closed, when I use it, or it eats up too much lower shared memory space.

It works fine with my FTP server (on another machine), and it works fine with HOBBES. I just tried it from a VBox system, and it works just as it does in a real system. There are settings to use Binary/Ascii and active/passive mode. I just set it for binary, and passive, and it works for everything that I do.

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 66
  • Posts: 647
  • Karma: +3/-0
    • View Profile
I tried jFTP. And yes, it eventually worked when I reset my TCPIP stack settings to the defaults (inetcfg.exe). That also put nftp back into play.
Unfortunately, I don't know what stack setting was causing the problem. Most likely the TCP Rcv/Xmt window sizes ...

Thanks alot anyway ! I really like JFTP. It's simple and does its job.

Andi B.

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 24
  • Posts: 526
  • Karma: +0/-0
    • View Profile
I just checked with the netdrive plugin from bare OS/2. At first it did not work. But then I changed my settings to use the "Remote directory: /pub" and it works. I'm pretty sure it worked years ago without this setting.

I also use a password starting with - although I'm not sure if this is necessary. See welcome text of hobbes ftp server -
Code: [Select]
19:26:04.300: hobbes.nmsu.edu: 220-If your FTP client crashes or hangs shortly after login, please try
19:26:04.300: hobbes.nmsu.edu: 220-using a dash (-) as the first character of your password.  This
19:26:04.300: hobbes.nmsu.edu: 220-will turn off the informational messages that may be confusing your
19:26:04.300: hobbes.nmsu.edu: 220-FTP client.
19:26:04.300: hobbes.nmsu.edu: 220-
19:26:04.300: hobbes.nmsu.edu: 220-New uploads should be placed in /pub/incoming.
19:26:04.300: hobbes.nmsu.edu: 220- 
19:26:04.300: hobbes.nmsu.edu: 220-OS/2, Java, and various forms of multimedia archives are accepted.
19:26:04.300: hobbes.nmsu.edu: 220-           
19:26:04.300: hobbes.nmsu.edu: 220-NMSU is an educational institution which permits free access to its
19:26:04.300: hobbes.nmsu.edu: 220-ftp archives.  No money is charged for access to the archives or the
19:26:04.300: hobbes.nmsu.edu: 220-distribution of its contents.  NMSU has no affiliation with Walnut
19:26:04.300: hobbes.nmsu.edu: 220-Creek, makers of the Hobbes OS/2 CD-ROM.
19:26:04.300: hobbes.nmsu.edu: 220-                       
19:26:04.3019:26:04.300: hobbes.nmsu.edu: 220-Login: anonymous  password: [your email address]
19:26:04.300: hobbes.nmsu.edu: 220-
19:26:04.300: hobbes.nmsu.edu: 220
19:26:04.300: hobbes.nmsu.edu: USER anonymous
19:26:04.480: hobbes.nmsu.edu: 331 Please specify the password.
19:26:04.480: hobbes.nmsu.edu: PASS
19:26:04.660: hobbes.nmsu.edu: 230 Login successful.
19:26:04.660: hobbes.nmsu.edu: SYST
19:26:04.830: hobbes.nmsu.edu: 215 UNIX Type: L8
19:26:04.830: hobbes.nmsu.edu: CWD /pub
19:26:05.00: hobbes.nmsu.edu: 250 Directory successfully changed.
19:26:05.00: hobbes.nmsu.edu: PWD
19:26:05.400: hobbes.nmsu.edu: 257 "/pub"
19:26:05.400: hobbes.nmsu.edu: CWD /pub
19:26:05.580: hobbes.nmsu.edu: 250 Directory successfully changed.
19:26:05.580: hobbes.nmsu.edu: PASV
19:26:05.750: hobbes.nmsu.edu: 227 Entering Passive Mode (128,123,88,139,171,143)
19:26:05.970: hobbes.nmsu.edu: LIST -a
19:26:06.140: hobbes.nmsu.edu: 150 Here comes the directory listing.
19:26:06.360: hobbes.nmsu.edu: 226 Directory send OK.
19:26:11.800: hobbes.nmsu.edu: CWD /pub/incoming
19:26:11.980: hobbes.nmsu.edu: 250-New uploads which have not yet been catalogued go into here.
19:26:11.980: hobbes.nmsu.edu: 250-
19:26:11.980: hobbes.nmsu.edu: 250-Please read the uploading policy (./README.POLICY or /uploadpolicy.html)
19:26:11.980: hobbes.nmsu.edu: 250-before you upload any files.  Also, always be sure to get a copy of the
19:26:11.980: hobbes.nmsu.edu: 250-most recent README.TEMPLATE for your .txt file.
19:26:11.980: hobbes.nmsu.edu: 250-
19:26:11.980: hobbes.nmsu.edu: 250-*** READ AND UNDERSTAND THE ABOVE BEFORE YOU UPLOAD ANYTHING HERE. ***
19:26:11.980: hobbes.nmsu.edu: 250-
19:26:11.980: hobbes.nmsu.edu: 250-I show no pity to those who cannot follow instructions.  Also, no abuse
19:26:11.980: hobbes.nmsu.edu: 250-will be tolerated.  Abusing things only hurts everyone.  If you don't
19:26:11.980: hobbes.nmsu.edu: 250-understand that, then you don't belong here!
19:26:11.980: hobbes.nmsu.edu: 250-
19:26:11.980: hobbes.nmsu.edu: 250 Directory successfully changed.
19:26:11.980: hobbes.nmsu.edu: CWD /pub/incoming
19:26:12.200: hobbes.nmsu.edu: 250 Directory successfully changed.
19:26:12.240: hobbes.nmsu.edu: CWD /pub/incoming
19:26:12.440: hobbes.nmsu.edu: 250 Directory successfully changed.
19:26:12.440: hobbes.nmsu.edu: PASV
19:26:12.760: hobbes.nmsu.edu: 227 Entering Passive Mode (1xxxxxxx 5)
19:26:12.940: hobbes.nmsu.edu: LIST -a
19:26:13.110: hobbes.nmsu.edu: 150 Here comes the directory listing.
19:26:13.290: hobbes.nmsu.edu: 226 Directory send OK.

I also increased the timeout from 5 seconds to 9 cause it takes very long until hobbes responded.

Lars

  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 66
  • Posts: 647
  • Karma: +3/-0
    • View Profile
Thanks for the info. But not the FTP clients were the problem (I can even use OS/2 ftp.exe and then execute a "quote PASV" from the prompt to switch to passive mode).
Virtualbox was not the problem either.
It was my TCPIP stack settings that were screwing up things.

Andi B.

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 24
  • Posts: 526
  • Karma: +0/-0
    • View Profile
Thanks for the info. But not the FTP clients were the problem (I can even use OS/2 ftp.exe and then execute a "quote PASV" from the prompt to switch to passive mode).
Virtualbox was not the problem either.
It was my TCPIP stack settings that were screwing up things.
Hope you find out which of the setting is the problem. You know I'm using some of yours too ;-)

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 11
  • -Receive: 195
  • Posts: 2720
  • Karma: +16/-0
    • View Profile
Have you tried a "ls" or "dir" after changing to say /pub/incoming ?
That will always hang here.

Yes, they both work after cding to /pub (and subdirectories) but not before where they silently return.
I'll also add that ncftp does passive mode and bin transfers automatically, along with supplying the anonymous login. Even SM now wants a password for Hobbes but does suggest anonymous with I presume my email for password.
« Last Edit: October 23, 2020, 11:02:02 pm by Dave Yeo »