storage-ng: enable samba
This commit is contained in:
parent
c83239f251
commit
2a0b099ce9
|
@ -82,14 +82,34 @@ in
|
||||||
root = "/mnt/cephfs/c3d2/tftp";
|
root = "/mnt/cephfs/c3d2/tftp";
|
||||||
};
|
};
|
||||||
|
|
||||||
/* # Open ports in the firewall.
|
services.samba = {
|
||||||
networking.firewall.allowedTCPPorts = [
|
enable = true;
|
||||||
23
|
enableNmbd = true;
|
||||||
];
|
extraConfig = ''
|
||||||
networking.firewall.allowedUDPPorts = [
|
workgroup = HQ
|
||||||
69
|
server string = storage
|
||||||
];
|
netbios name = storage
|
||||||
*/
|
hosts allow = 172.20.0.0/14 127.0.0.0/8 ::1/128 fe80::/64 fd23:42:c3d2:500::/56 2a00:8180:2c00:200::/56
|
||||||
|
hosts deny = 0.0.0.0/0
|
||||||
|
security = user
|
||||||
|
guest account = nobody
|
||||||
|
map to guest = bad user
|
||||||
|
smb encrypt = required
|
||||||
|
ntlm auth = yes
|
||||||
|
passdb backend = smbpasswd
|
||||||
|
'';
|
||||||
|
shares = {
|
||||||
|
c3d2 = {
|
||||||
|
path = "/mnt/cephfs/c3d2";
|
||||||
|
browseable = "yes";
|
||||||
|
writable = "yes";
|
||||||
|
"valid users" = "k-ot";
|
||||||
|
"guest ok" = "no";
|
||||||
|
"create mode" = "0666";
|
||||||
|
"directory mode" = "0777";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
networking.firewall.enable = false;
|
networking.firewall.enable = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue