Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
87 user(s) are online (64 user(s) are browsing Forums)

Members: 1
Guests: 86

jabirulo, more...

Support us!

Headlines

 
  Register To Post  

(1) 2 3 4 »
qemu and tap network on Windows
Home away from home
Home away from home


See User information
I'd like the emulator to be visible from the host OS (Windows) so I can run ZitaFTP Server on AmigaOS within the emulator. So far, I've been unable to get it to work. It doesn't matter if the TAP "network adaptor" is bridged, set up for internet connection sharing, or not. I get no network on AmigaOS 4. DHCP failure? Not sure yet.

Has anyone managed to get it working on Windows? I've been told that it "just works" on Linux & MacOS-X.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: qemu and tap network on Windows
Just can't stay away
Just can't stay away


See User information
@HansQuote:
Hans wrote:I'd like the emulator to be visible from the host OS (Windows) so I can run ZitaFTP Server on AmigaOS within the emulator. So far, I've been unable to get it to work. It doesn't matter if the TAP "network adaptor" is bridged, set up for internet connection sharing, or not. I get no network on AmigaOS 4. DHCP failure? Not sure yet.


Do you get an internet connection with Qemu under AmigaOs4.1 at all or does it fail already?

ZitaFTP server service for pure data diving between host and guest?

Since ZitaFTP seems to be a paid service I use alternatively SMB2 under AmigaOs4.1 so I can easily copy data from host to guest. It is not very fast, but copying files 200-500 MB works very well. For larger files I build iso,s and then mount them under Qemu.

I probably can't help them because as they already know I have everything set up under MacOs.

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: qemu and tap network on Windows
Home away from home
Home away from home


See User information
@Maijestro

Quote:
Do you get an internet connection with Qemu under AmigaOs4.1 at all or does it fail already?

As said above, I get no network.

Quote:
Since ZitaFTP seems to be a paid service

Not sure why you think it's a "service." It's software that you install on your machine. Yes, it's commercial software, but you buy it once (as opposed to a paid subscription service).

I want to use ZitaFTP Server, so that I can copy files from the host directly to AmigaOS 4 (as opposed to having to first copy it to a shared folder, and then copy it from there using the smb2 filesystem on OS4). It's an easier workflow.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: qemu and tap network on Windows
Site Builder
Site Builder


See User information
@Hans
First, you need to have the AmigaOS 4 online on Windows. Unfortunately, I do not use Windows so I don't know what the problem is there.

In the past, I could connect to OS4 from the host by doing port forwarding. I guess this could work with ZitaFTP. What I was doing:
-device rtl8139,netdev=mynet0
-netdev user,id=mynet0,hostfwd=tcp::7001-:7001


This was tested under Linux and not Windows, but I guess something similar should work.

Maybe you could share with us the network setup you are using and someone who uses Windows could share their working ones.

Follow me on
Ko-fi, Twitter, YouTube, Twitch
Go to top
Re: qemu and tap network on Windows
Just can't stay away
Just can't stay away


See User information
@HansQuote:
Hans wrote:@Maijestro

Since ZitaFTP seems to be a paid service
Not sure why you think it's a "service." It's software that you install on your machine. Yes, it's commercial software, but you buy it once (as opposed to a paid subscription service).


I did not read it correctly and suspected a subscription behind it. I also didn't know that they developed software for AmigaOs4.1.

Quote:
want to use ZitaFTP Server, so that I can copy files from the host directly to AmigaOS 4 (as opposed to having to first copy it to a shared folder, and then copy it from there using the smb2 filesystem on OS4). It's an easier workflow.


Do host and guest have to run this client or is it enough from the guest system (AmigaOs4.1). ?

Since I didn't know about this solution until today it would be very interesting for me.

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: qemu and tap network on Windows
Just can't stay away
Just can't stay away


See User information
@MaijestroQuote:
Maijestro wrote:@Hans[quote]Hans wrote:@Maijestro

Since ZitaFTP seems to be a paid service
Not sure why you think it's a "service." It's software that you install on your machine. Yes, it's commercial software, but you buy it once (as opposed to a paid subscription service).


I did not read it correctly and suspected a subscription behind it. I also didn't know that they developed software for AmigaOs4.1.

Quote:
want to use ZitaFTP Server, so that I can copy files from the host directly to AmigaOS 4 (as opposed to having to first copy it to a shared folder, and then copy it from there using the smb2 filesystem on OS4). It's an easier workflow.


Do host and guest have to run this client or is it enough from the guest system (AmigaOs4.1). ?

Since I didn't know about this solution until today it would be very interesting for me.

My line for network under Qemu looks something like this:

-device rtl8139,netdev=network01 -netdev user,id=network01


Maybe it helps because the lines in the basic configuration are identical on every system.

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: qemu and tap network on Windows
Home away from home
Home away from home


See User information
@Maijestro
Quote:
I did not read it correctly and suspected a subscription behind it. I also didn't know that they developed software for AmigaOs4.1.

That's my company website (I'm the author of ZitaFTP).

ZitaFTP Server is the server, so it only needs to be installed on one machine. You can use Filezilla or some other FTP client on the other machine.

I use it for testing my software. Basically, I compile the software on my Windows machine, and use a script to copy it to my Amiga. That way I can do a simple "make remoteinstall" to compile and upload it for testing (as explained here).

Quote:

My line for network under Qemu looks something like this:
-device rtl8139,netdev=network01 -netdev user,id=network01


That's the default setup. It allows the emulated machine to access the host and internet, but not the other way round.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: qemu and tap network on Windows
Just can't stay away
Just can't stay away


See User information
@HansQuote:

That's my company website (I'm the author of ZitaFTP).

ZitaFTP Server is the server, so it only needs to be installed on one machine. You can use Filezilla or some other FTP client on the other machine.


Thanks for the information and tutorial, I will now test this with Qemu AmigaOs4.1 ZitaFTP server (guest) and FileZilla client MacOs (host).

I have been looking for something like this for a long time, I did not know that there is also a better solution like SMB2. Your web-based solution is really great and very modern. I like it.

Edit: I did a few quick tests, but I can't get a connection. After configuring ZitaFTP I get IP:10.0.2.15 as connection IP address with port:21.

Under MacOs I have already started the client FileZilla and entered the server data, but there is no connection. Under FileZilla I have made no further settings and left everything on standard as it gives me the program.

Must the port and the ip be passed through under Qemu, or have I perhaps done something wrong in the configuration of FileZilla.

Resized Image

@walkero

Port forwarding via Qemu does not help either.

-device rtl8139,netdev=network01 -netdev user,id=network01,hostfwd=tcp::7001-:7001


Edited by Maijestro on 2023/7/19 14:30:03
Edited by Maijestro on 2023/7/19 14:31:37
Edited by Maijestro on 2023/7/19 14:32:00
Edited by Maijestro on 2023/7/19 14:33:06
Edited by Maijestro on 2023/7/19 14:46:27
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: qemu and tap network on Windows
Site Builder
Site Builder


See User information
If you do port forwarding maybe you need to use localhost in the connection address and instead of 7001 you should use the 21 of the port you need to connect

Follow me on
Ko-fi, Twitter, YouTube, Twitch
Go to top
Re: qemu and tap network on Windows
Just can't stay away
Just can't stay away


See User information
@Hans
Quote:
That's the default setup. It allows the emulated machine to access the host and internet, but not the other way round.
Does that mean FTP to the host doesn't work on the emulated machine (guest) at all (or only when using passive FTP)?
If active FTP works there must be some way for the host to access the guest, maybe with some builtin NAT rules.

Go to top
Re: qemu and tap network on Windows
Just can't stay away
Just can't stay away


See User information
@walkeroQuote:
walkero wrote:If you do port forwarding maybe you need to use localhost in the connection address and instead of 7001 you should use the 21 of the port you need to connect


Thanks for the answer, I got a little further and I could also establish a connection with "localhost", but the connection breaks after a short time.

Also the port 21 I have tried to pass through with:
-device rtl8139,netdev=network01 -netdev user,id=network01,hostfwd=tcp::21-:21


This is what the line should look like or?

The error message I get with FileZilla under MacOs as client:

StatusResolving IP address for localhost
Status
Connecting to [::1]:21...
StatusConnection attempt failed with "ECONNREFUSED - Connection refused by server", try next address.
StatusConnecting to 127.0.0.1:21...
StatusConnection establishedwaiting for welcome message...
StatusInitializing TLS...
StatusTLS connection established.
StatusRegistered
Status
Receiving directory content...
CommandPWD
Answer
257 "/"
CommandTYPE I
Answer
200 okay
Command
PASV
Answer
227 (10,0,2,15,35,44)
Command: LIST
Answer150 okay
Error
Connection timed out after 20 seconds of inactivity
Error
Directory content could not be received
Status
Disconnected from server
Status
Resolving IP address for localhost
Status
Connecting to [::1]:21...
StatusConnection attempt failed with "ECONNREFUSED - Connection refused by server", try next address.
StatusConnecting to 127.0.0.1:21...
StatusConnection establishedwaiting for welcome message...
StatusInitializing TLS...
StatusTLS connection established.
StatusRegistered
Status
Receiving directory content...
CommandPWD
Answer
257 "/"
CommandTYPE I
Answer
200 okay
Command
PASV
Answer
227 (10,0,2,15,35,44)
Command: LIST
Answer150 okay
Error
Connection timed out after 20 seconds of inactivity
Error
Directory content could not be received






Maybe someone else has an idea?

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: qemu and tap network on Windows
Just can't stay away
Just can't stay away


See User information
@Maijestro
Your FTP client seems to try to use passive FTP (PASV instead of PORT used for active FTP), in which case port 20 is used, instead of a random one. Might require forwarding of port 20 in addition to 21.

Go to top
Re: qemu and tap network on Windows
Just can't stay away
Just can't stay away


See User information
@joergQuote:
joerg wrote:@Maijestro
Your FTP client seems to try to use passive FTP (PASV instead of PORT used for active FTP), in which case port 20 is used, instead of a random one. Might require forwarding of port 20 in addition to 21.


hmm ok thanks for the tip, do you know how I add another port to my command line?

This one opens port 21:

-device rtl8139,netdev=network01 -netdev user,id=network01,hostfwd=tcp::21-:21

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: qemu and tap network on Windows
Quite a regular
Quite a regular


See User information
@Maijestro
you do:
comma
,
and add
example:
hostfwd=tcp::21-:21,hostfwd=tcp::22-:22

hostfwd=tcp::8022-:22,hostfwd=tcp::8080-:80

Go to top
Re: qemu and tap network on Windows
Just can't stay away
Just can't stay away


See User information
Ok tested again with with port 21 and 20

-device rtl8139,netdev=network01 -netdev user,id=network01,hostfwd=tcp::21-:21,hostfwd=tcp::20-:20


Unfortunately exactly the same problem, I do not understand, it can not be so difficult.....

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: qemu and tap network on Windows
Just can't stay away
Just can't stay away


See User information
@Maijestro
I did implemented and port some FTP clients and servers, but that was more than 25 years ago (there was no SFTP/FTPS, etc., yet), and things probably have changed a lot.
Better wait for an answer from Hans who is still involved in FTP development.

Go to top
Re: qemu and tap network on Windows
Just can't stay away
Just can't stay away


See User information
@joergQuote:
joerg wrote:@Maijestro
I did implemented and port some FTP clients and servers, but that was more than 25 years ago (there was no SFTP/FTPS, etc., yet), and things probably have changed a lot.
Better wait for an answer from Hans who is still involved in FTP development.


You are probably right since @Hans wrote ZitaFTP for AmigaOs4.1 he would be the best person to contact, but thanks to you and also @White and @walkero I learned to share ports under Qemu.

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: qemu and tap network on Windows
Home away from home
Home away from home


See User information
@Maijestro

FTP is an unusual protocol in that it uses multiple ports. So, to get it working you need to forward not just port 21, but also the data port range. You need to forward them to the same port numbers, or it won't work (the FTP server tells the client what data ports to connect to).

ZitaFTP Server defaults to using ports 9000-9004 for the data ports. So, you'd need to forward ports 21, and 9000-9004.

@joerg
Quote:
Does that mean FTP to the host doesn't work on the emulated machine (guest) at all (or only when using passive FTP)?
If active FTP works there must be some way for the host to access the guest, maybe with some builtin NAT rules.

FTP from client to host works. The problem is that qemu's default networking setup provides no way for the host to initiate connections to the guest. Port forwarding is a way to work-around this, but it's rather messy. The FTP server also becomes available to the outside network (depending on the firewall settings), which may not be what you want.

The best option is to use a TAP network device. The host sees this as a virtual network adaptor with its own IP address. No need to mess with port forwarding.

EDIT: A single-port extension to FTP was proposed years ago (link) that would simplify the port-forwarding setup. Sadly, it never got any traction, and I don't know of any FTP client that supports it. Otherwise, I'd add it to ZitaFTP.

Hans


Edited by Hans on 2023/7/20 2:54:28
Edited by Hans on 2023/7/20 2:56:50
Edited by Hans on 2023/7/20 3:02:43
Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: qemu and tap network on Windows
Just can't stay away
Just can't stay away


See User information
@HansQuote:
Hans wrote:@Maijestro

FTP is an unusual protocol in that it uses multiple ports. So, to get it working you need to forward not just port 21, but also the data port range. You need to forward them to the same port numbers, or it won't work (the FTP server tells the client what data ports to connect to).

ZitaFTP Server defaults to using ports 9000-9004 for the data ports. So, you'd need to forward ports 21, and 9000-9004.


I am not sure but this line should forward port 21 and data ports 9000-9004.

-device rtl8139,netdev=network01 -netdev user,id=network01,hostfwd=tcp::21-:21,hostfwd=tcp::9000-:9004


Unfortunately no luck with this configuration either, same error message as the other attempts. Maybe it is also FileZilla because it is not native for MacOs with M1/M1 chipset.

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
Go to top
Re: qemu and tap network on Windows
Quite a regular
Quite a regular


See User information
@Maijestro
No, that will forward port 9000 to 9004. Check QEMU docs on this, it's here. You probably need 5 hostfwd options for each port in 9000-9004

Go to top

  Register To Post
(1) 2 3 4 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project