Score:0

How to make a Samba server share files across two subnets

tn flag

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 hosts 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: smbclient -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 mount -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 sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.