Unable ping/ssh/sftp from Windows to Ubuntu using hostname after installing Virtualmin

Ubuntu Server 20.04.3 LTS VirtualBox vm on Windows 10 host. Both 64 bit, using bridged network connection.

Latest Webmin/Virtualmin using GPL intall.sh.

  1. Install Ubuntu Server, selecting SSH option and using the hostname u64s-1.

  2. Initially, I can only ping/ssh/sftp using the ip address of the server unless the server’s hostname and ip is added to the Windows hosts file.

  3. If I then install samba on the server, I can ping/ssh/sftp the server without the need to add the server’s hostname and ip to the Windows hosts file.

  4. After installing Virtualmin, I find myself back at step 2, hence I can’t https://u64s-1[.lan]:10000, but have to use https://ip-address:100000 unless I edit the Windows hosts file again.

Is using the Windows hosts file to enable the use of the server’s hostname the only option in this situation?

Thanks for any advice.

10000 is other port , other service ( no samba…) and samba i don’t know port 10000 then firewall smb ports.
But again the virtualmin service is no smb / CIFS (FTP, SSH AND AND) , never looked into that

Does step 3 still works after installed virtualmin for ping/ ssh/ftp , if so that is proof virtualmin install has noting to do with it.
Therefore see then also @Joe answer Below

Why do you “have to use” the IP address? What error do you get? Do you see the connection in the Webmin log?

Webmin does not care how you reach it, name or not. It listens on all IPs, by default. You may need to do some extra steps to get a self-signed certificate working (since you obviously can’t get a validated cert for a local address).

So, your problem is either your browser not looking up the name via SMB, or something else, but we need to know what actually happens to be able to determine that.

Yes you need a dns service. Either on the host (your Windows), physical router or a separate VM routing traffic.

Thanks all for the replies.

Just to clarify…

After installing samba, I can ping from Windows command line using the hostname, I can access \\u64s-1\shared-dir from Windows explorer, I can use username@u64s-1 in SmarTTY ssh client and WinSCP ftp client, but immediately after installing Vitualmin I have to use the IP address in all cases.

Trying to access Virtualmin using the hostname in Firefox warns, “Hmm. We’re having trouble finding that site. We can’t connect to the server at u64s-1”, using the static IP address (assigned by router) gives the expected self-signed certificate warning and I can go on to log in

Yes, I can use the hostname if I add u64s-1 192.168.51 to the Windows hosts file, but I don’t recall having to do that with Ubuntu 18.04 and earlier releases.

For me it is not clear or after the install Virtualmin the certificate / tls encryption problems.

Or only DNS.

Or both.

( also you write ip assigned by router , this could mean domains / names are not to that ip asigned in virtualmin (vm) itself so network config problem on that part , is ofcourse then also dns and more)

I think I found the root cause of my problem - firewalld and fail2ban - I was getting jailed immediately after Virtualma had finished installing, if I performed any activity using the hostname rather than the ip address.

Here’s a brief video that shows what was happening better than I can put in words. https://youtu.be/IxT4KR-1c2A

My overall solution was to add the samba-client service to firewalld’s public zone. Also, adding the https service and Wembin/Usermin ports to the home zone works.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.