AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / unix / Perguntas / 441147
Accepted
Dave
Dave
Asked: 2018-05-02 11:34:11 +0800 CST2018-05-02 11:34:11 +0800 CST 2018-05-02 11:34:11 +0800 CST

QEMU: Problemas ao conectar o Tails-VM a um compartilhamento de rede Samba na máquina host

  • 772

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.confaparê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 pacotegvfs-bin

Edições em /etc/samba/smb.conf:

  • adicionadonetbios name = NAME-OF-PC
  • adicionadoname resolve order = bcast host

No entanto, nenhum deles funcionou.


Eu tentei diminuir a origem do erro:

testparmnão detecta nenhum erro, smbtreeexibe 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 hostme 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 :

Interfaces de rede física no gerenciador virtual QEMU: enp0s25

Interfaces de rede física no gerenciador virtual QEMU: lo

Ponte de rede virtual "virbr0" que o Tails deve usar

Gerenciador de Rede Gnome:

Gerenciador de Rede Gnome:

Erro no Tails ao conectar ao Samba Share IP via navegador de arquivos:

Erro no Tails ao conectar ao compartilhamento samba 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.1bem como 192.168.178.31(de uma tentativa anterior antes de reiniciar o servidor samba).

Ping para Samba-Server no Tails


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).

debian samba
  • 2 2 respostas
  • 1141 Views

2 respostas

  • Voted
  1. D'Arcy Nader
    2018-05-02T22:11:28+08:002018-05-02T22:11:28+08:00

    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:

    192.168.178.31    hostnameofthesmbserver
    

    you can do that with this command:

    sudo nano /etc/hosts
    

    always check this file on reboot because i don't think tail will keep this change persistent.

    • 1
  2. Best Answer
    Dave
    2018-05-11T05:48:01+08:002018-05-11T05:48:01+08:00

    A colleague figured out the problem:

    Por padrão, o Samba está sendo bloqueado por firewalld. Portanto foi necessário instalar o pacote firewall-configpara ativar o Samba no Firewall. Provavelmente isso também seria possível sem uma GUI, mas com firewall-configela é 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!

    • 0

relate perguntas

  • Configuração do GRUB para reconhecer diferentes ambientes de desktop (instalações) da mesma distribuição Linux

  • astyle não altera a formatação do arquivo de origem

  • Recebendo e-mail em um novo Debian fresco

  • Debian Stretch: gnome-software segfault em libgs_plugin_systemd-updates.so

  • Como digitar ü no Pinyin IME?

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Como exportar uma chave privada GPG e uma chave pública para um arquivo

    • 4 respostas
  • Marko Smith

    ssh Não é possível negociar: "nenhuma cifra correspondente encontrada", está rejeitando o cbc

    • 4 respostas
  • Marko Smith

    Como podemos executar um comando armazenado em uma variável?

    • 5 respostas
  • Marko Smith

    Como configurar o systemd-resolved e o systemd-networkd para usar o servidor DNS local para resolver domínios locais e o servidor DNS remoto para domínios remotos?

    • 3 respostas
  • Marko Smith

    Como descarregar o módulo do kernel 'nvidia-drm'?

    • 13 respostas
  • Marko Smith

    apt-get update error no Kali Linux após a atualização do dist [duplicado]

    • 2 respostas
  • Marko Smith

    Como ver as últimas linhas x do log de serviço systemctl

    • 5 respostas
  • Marko Smith

    Nano - pule para o final do arquivo

    • 8 respostas
  • Marko Smith

    erro grub: você precisa carregar o kernel primeiro

    • 4 respostas
  • Marko Smith

    Como baixar o pacote não instalá-lo com o comando apt-get?

    • 7 respostas
  • Martin Hope
    rocky Como exportar uma chave privada GPG e uma chave pública para um arquivo 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Wong Jia Hau ssh-add retorna com: "Erro ao conectar ao agente: nenhum arquivo ou diretório" 2018-08-24 23:28:13 +0800 CST
  • Martin Hope
    Evan Carroll status systemctl mostra: "Estado: degradado" 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim Como podemos executar um comando armazenado em uma variável? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S Por que /dev/null é um arquivo? Por que sua função não é implementada como um programa simples? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 Como ver as últimas linhas x do log de serviço systemctl 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - pule para o final do arquivo 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla Por que verdadeiro e falso são tão grandes? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis Substitua a string em um arquivo de texto enorme (70 GB), uma linha 2017-12-30 06:58:33 +0800 CST
  • Martin Hope
    Bagas Sanjaya Por que o Linux usa LF como caractere de nova linha? 2017-12-20 05:48:21 +0800 CST

Hot tag

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve