February 4, 2021
I just discovered mTCP. It includes an FTP client, which would certainly solve my problems. Setting up an FTP server on my linux machine is trivial, it just involves installing a package and starting the service.
I will download the current (March 7, 2020) version, which is a 630K zip file. There is also a 141 page PDF document (see link above to my copy). I download both and burn them onto a CD (It has been a long time since I have done this!).cd new copy d:*.zip mtcp.zipAnd I have the files on my FreeDOS hard drive! I unpack them as follows:
cd \ mkdir mtcp cd mtcp unzip \new\mtcp.zipNow it is a matter of following setup instructions. I need an interrupt number for my network packet driver, so I reboot to watch the boot messages. Actually a look at my autoexec.bat file tells me it is 0x60.
PACKETINT 0x60I make this the file \mtcp\myconfig.txt using the vi editor.
I add this line to my autoexec.bat file and I reboot.
set MTCPCFG=C:\MTCP\MYCONFIG.TXTRebooting displays my MAC address. My machine is using a board with the DEC DC21041 "Tulip" chip, which is a decent 10/100 ethernet chip from the good old days.
I was going to go edit files on my linux machine to set up a fixed DHCP, but I decided "why bother". I can just run DHCP on the FreeDOS machine and let it get a dynamic assignment from my pool. And indeed this works:
cd mtcp dhcpI type "ftp 192.168.0.5" and it works! I do need to type my username and password. I also need to shut down the firewall on my linux box (or open up the proper ports for FTP).
The documentation is very good and says that you can set up a static configuration by adding lines to the configuration file like so:
PACKETINT 0x60 IPADDR 192.168.1.10 NETMASK 255.255.255.0 GATEWAY 192.168.1.1 NAMESERVER 192.168.1.1The document also says that you will need to delete some lines that the DHCP command adds to this file if you have ever used DHCP.
I edit autoexec.bat to add c:\mtcp to my path and this all looks good.
I also need to set up the firewall ports for FTP on my linux machine. This is not an mTCP issue by any means. I open up ports 20 and 21 for FTP, but now the issue of active and passive FTP arises. Apparently passive (which is what mTCP uses as the default), will try to negotiate some other port rather than using 20. But how am I to know what this port will be so as to open it on my firewall? So I would rather just use the old active scheme and stick with port 20. Apparently there are configuration parameters to vsftpd that I can set to specify which passive ports will be used and then I can open up this range on my firewall. Details elsewhere.
Adventures in Computing / [email protected]