Link to home
Start Free TrialLog in
Avatar of Thomas Bucaioni
Thomas BucaioniFlag for France

asked on

[linux] how to run vsftpd on a KVM network

To sum up, vsftpd is up and running, KVM and its VMs too. But the VMs can't connect to the ftp server running on their host.

It seems the ftp server is not listening on the KVM network where the VMs are NATed


Avatar of rindi
rindi
Flag of Switzerland image

Nated VM's are on a separate LAN segment of each other, so naturally they can't communicate with each other, except maybe via the internet.

If you want them to connect via your LAN, you should either use bridge or as mavtap.

Besides that the VM's probably have their firewall enabled & you'd have to open the respective port.

Avatar of Thomas Bucaioni

ASKER

The ftp server is on the "hypervisor" (just a PC). If I use macvtap, the VM can't see the PC at all

ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

All the firewalls are disabled now, but nmap on the VM sees ssh open and ftp 20-21 closed on their gateway (the PC). When I connect with ssh from the VM to the gateway (which is my PC running KVM), I can see the files as if on my PC.

No idea what PASV could be, in vsftpd I just added a few 'yes' but no ip or port ranges


Wow, my bad... The PC firewall was still on. Kickstart installs finish normally on the VMs now

Many many thanks

So, the zone for the VM is 'libvirt'. When I added ftp to the active zone, it didn't add it to the libvirt one:

# firewall-cmd --permanent --zone=libvirt --add-service ftp
# firewall-cmd --reload

Open in new window