Sample Header Ad - 728x90

Samba server share files across two subnets

0 votes
1 answer
1274 views
I'm with some problems setting up a Samba server between two subnets; I Have one subnet that has the Samba server and every computer in this lan can access the files. But now I have another server in another place with a subnet and I want that the computers that are in this Server2 subnet access the files in the Samba that are in Server1. The servers are connected with an OpenVPN connection and they share a Cups server, both are Debian 5.10 servers and can ping on both sides and they recognize each other. So my smb.conf looks like this: [global] netbios name = MY_SERVER server string = Compartilhamento workgroup = MY_GROUP security = user map to gues = Bad User wins support = yes dns proxy = no os level = 100 auto services = global name resolve order = lmhosts, host, wins, bcast cups options = raw load printers = yes interfaces = lo eth1 192.168.1.0/24 hosts allow = 127. 192.168.1. 192.168.10. passdb backend = tdbsam ntlm auth = yes preferred master = yes domain master = yes logon path = %Nprofile%u invalid users = root server min protocol = NT1 In the
allow
I put both subnets. The Server1 is 192.168.1. and Server2 is 192.168.10. When I try to log in via smbclient using this command:
-d3 -U "MY_GROUP/user" //192.168.1.3/share
I get this error: lp_load_ex: refreshing parameters Initialising global parameters rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) Processing section "[global]" added interface enp11s0 ip=192.168.2.253 bcast=192.168.2.255 netmask=255.255.255.0 added interface enp12s2 ip=192.168.10.3 bcast=192.168.10.255 netmask=255.255.255.0 Client started (version 4.13.13-Debian). Connecting to 192.168.1.3 at port 445 Connecting to 192.168.1.3 at port 139 protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE Or when I try to mount the Samba server in the Server2 with
-t cifs -o username=user,vers=1.0,sec=ntlmssp //192.168.1.3/share /mnt/
it returns mount: /mnt: a chamada de sistema de mount(2) falhou: Host está desligado. I don't know how I connect the servers. Do I have to mount Samba in Server2? Am I losing something? I saw 2 posts that look like my problem, but they do not help at all, they are Samba share across two subnets and Mount CIFS Host is down I asked the same question in *ServerFault* but I get no answer, so I'm asking here.
Asked by Anderson Silvestre (1 rep)
Jul 19, 2023, 12:13 PM
Last activity: Jul 19, 2023, 01:00 PM