Eu corro o Tails em uma máquina virtual em um host Debian 9. Para acessar uma pasta compartilhada no host via Tails, tento configurar um Samba-exchange.
Embora essa abordagem tenha funcionado completamente bem no Debian 8, ela não funciona mais no Debian 9. Sempre recebo o seguinte erro ao tentar conectar-me ao Samba-share:
" Não foi possível acessar o local. Falha ao recuperar a lista de compartilhamento do servidor: Tempo esgotado da conexão. "
Em QEMU
-settings eu especifiquei a fonte de rede (interface de rede virtual) como bridge com name virbr0
, device model is virtio
. Ao executar a máquina, a ponte é ativada, as interfaces de rede física também são ativadas e o convidado (= Tails) recebe acesso à Internet sem problemas. Apenas o Samba
-share não funciona.
Minha /etc/samba/smb.conf
aparência é assim:
[global]
workgroup = WORKGROUP
netbios name = MYCOMPUTER
name resolve order = bcast
dns proxy = no
log file = /var/log/samba/log./%m
max log size = 50
panic action = /usr/share/samba/panic-action %d
server role = standalone server
map to guest = bad user
usershare allow guests = yes
security = user
server string = %h server (Samba, Ubuntu)
bind interfaces only = yes
interfaces = enp0s25 virbr* lo
[Windows-SMB]
comment = Shared Samba Network Drive for Windows
path = /home/user/Public/Windows-Exchange
public = no
guest ok = no
browseable = yes
writeable = yes
[Tails-SMB]
comment = Shared Samba Network Drive for Tails
path = /home/user/Public/Tails-Exchange
public = no
guest ok = no
browseable = yes
writeable = yes
Eu tentei todas as soluções possíveis:
- Instalando o pacote
gvfs-bin
Edições em /etc/samba/smb.conf
:
- adicionado
netbios name = NAME-OF-PC
- adicionado
name resolve order = bcast host
No entanto, nenhum deles funcionou.
Eu tentei diminuir a origem do erro:
testparm
não detecta nenhum erro, smbtree
exibe todos os compartilhamentos corretamente. Se eu pegar o endereço IP exibido nmblookup <hostname>
e inserir este no Tails, recebo o erro mencionado novamente.
No entanto, o ping do Samba-share-IP do convidado funciona bem. Eu simplesmente não consigo acessar o compartilhamento com o navegador de arquivos Tails.
Algumas outras idéias onde eu poderia olhar?
O comando smbclient -L host
me trouxe " A conexão com o host falhou (Erro NT_STATUS_UNSUCCESSFUL) ". No entanto, se eu digitar smbclient -L 192.168.178.31
, obtenho com sucesso a tabela com os compartilhamentos.
Aqui estão algumas capturas de tela da situação atual:
Verificações de configuração via CLI:
user@hostname: ~$ smbtree
WORKGROUP
\\HOSTNAME HOSTNAME server (Samba, Ubuntu)
\\HOSTNAME\IPC$ IPC Service (HOSTNAME server (Samba, Ubuntu))
\\HOSTNAME\Tails-SMB Shared Samba Network Drive for Tails
\\HOSTNAME\Windows-SMB Shared Samba Network Drive for Windows
user@hostname: ~$ nmblookup
192.168.122.1 HOSTNAME<00>
(This seems to be fine)
Gerenciador de máquinas virtuais :
Gerenciador de Rede Gnome:
Erro no Tails ao conectar ao Samba Share IP via navegador de arquivos:
Tails (com sucesso?) enviando ping para o Samba-Server-IP:
Por meio disso, ambos os IPs parecem funcionar bem: 192.168.122.1
bem como 192.168.178.31
(de uma tentativa anterior antes de reiniciar o servidor samba).
Update: Samba-exchange is still not working.
Maybe interesting: Very frustrated about this Samba-issue I reinstalled my Debian 9 host several times because I thought I did a mistake anyhow. Hereby I think to remember the following fact: The first time I installed Debian and wanted to start Virtual Machine Managers default
network bridge virbr0
I got an error that no firewall has been detected. Therefore Virtual Machine Manager
did not want to start this bridge. I never received such a warning before, so I deleted the default
network bridge and recreated a new one with identical settings and the same name. However, manually starting this new bridge was easily possible without any problems. Although still no firewall has been installed Virtual Machine Manager accepted the new bridge without complains. I think to remember that this time I got the Samba-exchange working.
However, I did a whole reinstall of the host system because some other things did not work and I played a lot with packages in the meanwhile. Hereby I figured out that this error message "No Firewall has been detected" was caused by missing packages firewalld
and dnsmasq
. I installed those packages and never got Samba exchange working again.
Unfortunately I am not that much into Linux to figure out the mistake by myself. Maybe it is just an easy thing with IP-settings of the firewall or something like this...
Another stupid behavior of Samba is the fact that directly after restarting the Samba server by command /etc/init.d/samba restart
the smbtree
-command does not work straight ahead. I have to wait several seconds sometimes until I do not receive an empty line anymore and the tree is displayed.
Furthermore the smbtree
command only shows one output line with the hostname sometimes, but without naming the created Samba shares. This behavior seems to be influenced by the options in smb.conf
. The upper presented smb.conf
invites smbtree
-command to correctly show the shares in its output as well. However, if I do a very simple [global]
section with only two basic entries, sometimes the output of smbtree
remains completely empty - I don't know why.
On my Debian 8 host machine with identical settings the smbtree
-command output indeed is only one line as well. Maybe there is a bug anywhere? Normally smbtree
should show the host name and the Samba shares as well. At least the Samba exchange is working on this Debian 8 system (no firewalld
and no dnsmasq
are installed here).
you are using broadcast ( bcast ) to resolve the name but you have your machines on different subnet.
broadcast name resolving only works on the same subnet.
you must add an entry to your
/etc/hosts
on the tail host that says:you can do that with this command:
always check this file on reboot because i don't think tail will keep this change persistent.
A colleague figured out the problem:
Por padrão, o Samba está sendo bloqueado por
firewalld
. Portanto foi necessário instalar o pacotefirewall-config
para ativar o Samba no Firewall. Provavelmente isso também seria possível sem uma GUI, mas comfirewall-config
ela é uma tarefa de 10 segundos... Mencione para ativar o Samba no Firewall como permanente, não apenas para a sessão atual.Agora tudo funciona bem!