Thanks for your help apparently I am not able to do the right configuration under Qemu to use FileZilla from host MacOs and ZitFTP as server from AmigaOs4.1.
Since I have the SMB2 way as an alternative it is not that bad and I can still move files back and forth. I really like ZitFTP though and would have liked to use this server.
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
@Maijestro I can't help with Windows but on macOS you could use vmnet instead of tap. I've just found this: https://github.com/lima-vm/socket_vmnet that should also avoid having to run QEMU as root. Don't know how that works, since QEMU only connects to a socket with this you'd have to select vmbet settings within socket_vmnet instead of with QEMU options but it should have a similar setting like vmnet-host that allows the guest to see the host and vice versa.
@balaton They are using -device virtio-net-pci,netdev=net0 -netdev socket,id=net0,fd=3 which probably means it can only work on guest OSes which have a QEmu virtio network driver?
@joerg No you can connect any emulated card to any netdev so just replace virtio-net with rtl8139 just nobody uses anything else than virtio-net when the guest has a driver for that so that's the normal example. What these options do are just send all data to a socket created by the socket_vmnet daemon which will forward it to the macOS virtualisation framework. QEMU can also use that with -netdev vmnet something but then whole QEMU has to run as root and this way only socket_vmnet will need to be root and QEMU can run as normal user.
Anyway I wanted a simple alternative to SMB2. ZitaFTP has been really well implemented by @Hans for AmigaOs4.1 and would have liked to support him in sales. It may currently work very well under real hardware which is of course intended.
I am already in contact with someone who could write virtio network drivers for AmigaOs4.1 and maybe some things will improve again for the excellent Qemu emulation. Of course it is important for me to support Amiga developers who provide very good software and ZitaFTP is one of them!
I will not make any further attempts to make this software work with Qemu under AmigaOs4.1 before someone has proven me wrong that it is possible!
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
I will not make any further attempts to make this software work with Qemu under AmigaOs4.1 before someone has proven me wrong that it is possible!
That sounds like a challenge
Damn. I have enough things I'm meant to be doing already!
hey hey feel free to do what you want
They already do enough with testing real graphics cards under Qemu and we already had first successes thanks to them. And the information we gained was and is very valuable. Balaton opened the door for us with BBoot, so we shouldn't stop with it now.
It's not my first priority either, but currently I'm dreaming about using 32 bit windows with Qemu and AmigaOs4.1, which would make the emulation close to perfect.
Sooner or later this problem will be solved as well.
I also want to thank you again for supporting the Qemu project, you are doing a really good job.
Since I "only" own a MacStudio as my sole hardware I can only support with videos I upload to YouTube and show people how it already works
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
photo but may not be very readable. I will add later if anyone wants to know what needs to be done.
ps
I generally use sftp and on the Raspberry Pi where I have sshd I have data to transfer using RNOXfer under AOS4 This solution is not for me and I don't need it.
Good: it does actually work with port-forwarding. I can upload files with curl Bad: it doesn't work with Filezilla
Here's my hostfwd parameters: hostfwd=::21-:21,hostfwd=::9000-:9000,hostfwd=::9001-:9001,hostfwd=::9002-:9002,hostfwd=::9003-:9003,hostfwd=::9004-:9004
The problem is that Filezilla uses the PASV command for establishing a data connection. ZitaFTP tells it to connect to 10.0.2.15:900x (the emulated machine's IP), which is obviously wrong from the host machine's point-of-view. Filezilla detects that this is wrong, but for some reason doesn't connect to :127.0.0.1:900x instead. It's supposed to handle this case (it's common with NAT routers), but it doesn't seem to work with localhost.
The curl command notices that ZitaFTP supports the EPSV command** and uses that instead. Therefore it works. Filezilla should be able to use EPSV too, but seems to stick with PASV for IPv4. I haven't found a way to make Filezilla use EPSV, or correctly use the same IP address for control and data (which it's supposed to).
Probably a stupid idea but have you tried to set in hosts a domain for the localhost and use that with FileZilla? It might trick it and think that this is an external server.
On Macos and Windows it can be difficult. Although who knows - it might be possible. On Linux, iptables comes to the rescue - here you can do all sorts of things with port forwarding and ip address masking ....
I changed the ports in ZitaFtpServer from 9000:9004 to 7000:7004 I don't know why since AOS4 it was showing that port 900x was busy
I didn't want to use "root" so ports < 1024 are out. port forwarding 20 and 21 to 8020 and 8021
any client that supports PASV, and as port 8021 and ip 127.0.0.1
iptables (would need to be fine-tuned): iptables -t nat -A OUTPUT -p tcp --dport 7004 -j REDIRECT --to-port 7004 iptables -t nat -A OUTPUT -p tcp --dport 7003 -j REDIRECT --to-port 7003 iptables -t nat -A OUTPUT -p tcp --dport 7002 -j REDIRECT --to-port 7002 iptables -t nat -A OUTPUT -p tcp --dport 7001 -j REDIRECT --to-port 7001 iptables -t nat -A OUTPUT -p tcp --dport 7000 -j REDIRECT --to-port 7000 iptables -t nat -A POSTROUTING -o lo -p tcp -j MASQUERADE
simply translated. The client makes the connection by giving a non-localhost ip, the server sends him its ip 10.x.x.x. so he is not seen by the host. communication is redirected via iptables and fw qemu to the ftp server.
Good: it does actually work with port-forwarding. I can upload files with curl Bad: it doesn't work with Filezilla
Here's my hostfwd parameters: hostfwd=::21-:21,hostfwd=::9000-:9000,hostfwd=::9001-:9001,hostfwd=::9002-:9002,hostfwd=::9003-:9003,hostfwd=::9004-:9004
Exactly with the same configuration I had tested yesterday last when I failed.
I could also use another FTP client I am not bound to FileZilla. It was just my first choice under MacOs. Since some could confirm that it works I will try it again later with another FTP client for MacOs. Maybe something that supports more the older standard protocols.
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Yeeehhhoooo my attempt to change the FTP client was the right decision.
Now I use Cyberduck, this FTP client is very simple like ZitaFTP under AmigaOs4.1.
@Hans it works perfectly, I didn't have to change anything else in my Qemu configuration.
I like this solution very much for the data dive between host and guest. I will buy this software.
Edit: The file transfer is stable, I tested it with a 100 MB+ file and it was transferred successfully.
@smarkusg
So I won the challenge because I found a very simple setup that works very well. Of course, their configuration is also possible, but I like it simple and straightforward, anyway thanks for the help buddy. It shows once more how usable Qemu with AmigaOs4.1 is at the moment.
Edited by Maijestro on 2023/7/21 17:36:18 Edited by Maijestro on 2023/7/21 19:01:04
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
What's your current full command line for Qemu on your Mac? I have a MacBook Air (base M1) just for sitting on the sofa playing about and it's not great. I have a feeling that a lot of your success is simply down to the pure power of your M1 Max CPU?
At the moment we need to drop back to G3 cpu because any of the others have problems with SDL rendering (and an awful lot of stuff seems to be written against SDL). Not complaining here by any means, just wanted to check we're doing the same thing. For me anything GPU related is very poor and not really do-able without real hardware.