miércoles, 13 de abril de 2022

DMZ. Share LAN Windows folder with DMZ Linux Server

 Purpose

Share a folder in one LAN Windows File server with a Linux Web Server in a DMZ.


Information

Web Server in DMZ:  192.168.89.55  - Linux

File Server in LAN:  192.168.79.71  - Windows

Open DMZ ports: 445, 137,138,139  - In a DMZ Firewall

Domain Windows: MyDomain


Steps

[ ] Share a Folder in a Windows server

We have read permission to user: svcwebserver

Name Server: WindowsServer1

Share Folder: FoldertoRead1


[ ] The server in DMZ need CIFS installed

Command: apt-cache search cifs-utils


Command: apt-get install cifs-utils


[ ] At DMZ Web Server we need create a folder to mount the Window File server share folder.

Command:  Sudo mkdir /mnt/FoldertoRead2

[ ] In the DMZ Web server. Mount the LAN share folder

Command:  sudo mount -t cifs -o vers=2.0,username=svcwebserver,domain=Mydomain,password=HolaHola //192.168.89.171/FoldertoRead1 /mnt/FoldertoRead2

[ ] In the DMZ Web server. For check

Command: df-h 


 [ ] Automatic Mount in DMZ Server

Edit /etc/fstab -> Sudo nano /etc/fstab

Add the text: 

//192.168.89.171/FoldertoRead1     /mnt/FoldertoRead2      cifs    vers=2.0,username=svcwebserver,domain=MyDomain,password=HolaHola,nofail  0       0


by GoN | Published: April 13 2022 | Last Updated: