Advertisement
Guest User

Untitled

a guest
Aug 31st, 2019
4,321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.63 KB | None | 0 0
  1. --- GUIDELINES FOR BUILDING A XIGMANAS MACHINE AS OF AUGUST 2019 ---
  2.  
  3. A quick summary of what a NAS is:
  4. NAS (Network Attached Storage) allows you to connect to a device with, preferably, a lot of storage space so you (or any number of users) can read, write and execute files. Think of it as your own personal data server.
  5.  
  6. --- DISCLAIMER ---
  7. If you're smart enough, you'll probably realize that you don't care about the network-attached part, and can literally just plug a bunch of new HDDs into your PC- and you are absolutely correct. This is cheaper, but you lose the reliability of having a dedicated device that you can, with some configuring, connect to from anywhere in the world; again, if you are smart enough, you will know that you can remote desktop connect (RDC) into your PC and do the same- you are also correct.
  8.  
  9. This guide is for those who want a standalone, low-power, secure and dedicated device for mass data storage. The operating system for this NAS will be XigmaNAS, which we will get into shortly. If you are not enamored with the idea of building your own NAS, there are tons of pre-built solutions available (Synology, QNAP, etc.) Make sure to do your research, and decide whether building your own NAS is worth your time.
  10.  
  11. You could even buy a few high-capacity (4 TB is common) external hard drives and carry a few wherever you go if simple data archiving is your goal.
  12.  
  13. You COULD even be extremely scandalous and milk a couple free accounts from Mega (https://mega.nz), each with 50GB of space, and have as much space as you want on the cloud, wherever you go. >:) Or, you know: pay for an account- they're not terribly expensive.
  14.  
  15. PLEASE do your own research and find out what you want before following this guide. This is for a very specific case where you would want to spend the time configuring your NAS yourself.
  16.  
  17. If you still want to go through with your own XigmaNAS NAS, then have these links available and become familiar with the content therein:
  18. https://www.xigmanas.com/wiki/doku.php?id=documentation:setup_and_user_guide:webgui_interface
  19. https://www.xigmanas.com/wiki/doku.php?id=documentation:faq
  20. https://www.xigmanas.com/forums/
  21. https://www.xigmanas.com/wiki/doku.php?id=documentation:setup_and_user_guide:installation_and_configuration_overview
  22. https://www.xigmanas.com/wiki/doku.php?id=faq:0096
  23.  
  24. And of course, Google whatever you seek.
  25.  
  26. NOTA BENE:
  27. XigmaNAS is an older (not necessarily worse) and simpler version of Nas4Free; as such, if you find something on a Nas4Free site, it is likely quite related to XigmaNAS, and can possibly be applied.
  28.  
  29. --- BACKUP YOUR DATA ---
  30. NAS or not; keep your data backed up!
  31. https://pastebin.com/bfDe02Wh
  32.  
  33. --- HARDWARE OUTLINE ---
  34. You first need to decide on how much data you want to be stored. For most people, 4-10 TB is plenty. If you plan on implementing some form of redundancy (like RAID1, which you should search if you have not heard of) you will need more space. Once decided, you need to pick your hardware.
  35.  
  36. For your personal XigmaNAS NAS, you will need:
  37. - Case
  38. - Motherboard
  39. - CPU and fan (most CPUs come with a stock cooling fan and paste pre-applied)
  40. - PSU
  41. - HDDs (you'll also need to buy SATA data cables for each one, and they will need to be EMPTY to begin with)
  42. - RAM (8GB recommended as minimum)
  43. - A dummy USB flash drive, or a CD
  44. - Some boot drive (a USB flash-drive [CANNOT be the same one as the dummy flash drive, i.e. you need two of them], an SSD or an HDD with at least 2 GB of space)
  45. - Ethernet connection (heavily preferred over wi-fi)
  46.  
  47. Excluding HDDs, you do not need to spend more than $400-$500 on hardware.
  48.  
  49. There are TONS of guides on building a computer, so I will not get buried in its detail. However, here is a good tip:
  50. On the site PCPartPicker, you can view completed builds; sort them by date and find ones you like; many of them include the keyword NAS in their title.
  51.  
  52. This link is all builds using the Node 304 case, a very popular case for NAS builds.
  53. https://pcpartpicker.com/builds/by_part/BWFPxr
  54.  
  55. Here is an example build, without HDDs and SATA data cables:
  56. https://pcpartpicker.com/list/wgz3J8
  57.  
  58. Some tips:
  59. - Make sure that your CPU and motherboard are compatible; most CPUs are LGA1151, and will fit in most motherboard sockets. You need to make sure that (on the motherboards webpage- just look it up by its full name) your motherboard supports YOUR generation of CPU. (https://imgur.com/a/vEbHEBJ) For instance, if your CPU is an 8th generation Intel, your motherboard needs to literally state in it's webpage that it supports 8th generation CPUs. Otherwise, your computer won't boot. Most motherboard pages will have a SUPPORT page, and a CPU SUPPORT tab within that you can check to verify if your exact CPU is compatible.
  60. - Make sure that whatever motherboard you pick has enough SATA ports to support the number of HDDs you want to use (4 drives = at least 4 SATA ports needed).
  61. - If you plan to boot from the M.2 slot on your motherboard, be aware that the M.2 slot does take up one SATA slot.
  62. - Pick a CPU with low TDP (power draw).
  63.  
  64. --- ASSEMBLY STEPS ---
  65.  
  66. NOTA BENE:
  67. PC means your personal computer, NOT your NAS.
  68.  
  69. Assemble the computer like any other, and make sure that it boots (the CPU fan and any case fans should start spinning and stay spinning, and you should see your BIOS show up on the connected monitor). Make sure that all of your drives are showing up. Also, don't forget to plug in the Ethernet cable. If all is well, you can turn the machine off and continue on for the NAS-specific steps.
  70.  
  71. Read this article first. It is a bit old and perhaps overly-general, but it is very accurate to the setup of Xigmanas today.
  72. https://lifehacker.com/turn-an-old-computer-into-a-networked-backup-streaming-5822590
  73.  
  74. Head over to https://sourceforge.net/projects/xigmanas/files/ and go to the latest version (bigger numbers, herp). Read the README file if you want. Download the LiveUSB-GPT file (use the LiveCD version if you want to use a CD instead of a flash-drive), and extract it on your PC, so that you have a .img file saved. Now you need to put this onto a dummy flash-drive with a disk imaging tool. ENSURE that your dummy flash drive is empty; you may want to right click its drive shortcut and format it. Use Win32DiskImager (https://sourceforge.net/projects/win32diskimager/) if you're on Windows (open the tool, select the XigmaNAS image file you extracted earlier, and select the destination to image to, which is literally your flash drive). Linux probably has this built-in. Mac can sod off.
  75.  
  76. Now, shove this imaged flash drive into your NAS' USB port, making sure to pick a USB 3.0 one (you should have a few, and this is preferable to USB 2.0 simply for speed). Ensure that your boot drive is connected as well (I used another flash drive, but you can use an HDD or SSD [no CDs]). Turn the NAS on and you should start to see some new stuff happening on the attached monitor- this is XigmaNAS booting. Once it's fully booted, you'll be presented with some options that you can choose via a keyboard (some gaming keyboards that required two USB ports may not work, so use another if you have issues).
  77.  
  78. NOTA BENE:
  79. If you use a VPN service, like NordVPN, ENSURE that any option described like 'Invisibility on LAN' is TURNED OFF; if you fail to do this, you computer will not be able to detect your NAS on your LAN.
  80.  
  81. Type 1 and hit Enter to configure the network interfaces. Try auto-detect, and pick whatever port your ethernet cable is plugged into on your NAS' motherboard (probably the first one). Click Yes through whatever pops up to return to the main screen. Type 2 and press Enter to configure the network IP address; use DHCP and click Yes through whatever pops up. It will take a second, then you will be returned to the main screen. Now you should see, at the top, a WebGUI address and an IPv4 address, presumably 10.0.0.# or 192.168.1.#. Type in the WebGUI address in a web browser (Chrome, Firefox, etc.) to start the real configuration of your NAS.
  82.  
  83. Make sure to use the exact web address given (http and all), and if you get a security pop-up, click around until you can 'continue to site.'
  84.  
  85. Now you'll see the XigmaNAS web-browser. The default login is admin and its password is xigmanas; type this in. Once through, you are in your new NAS' homepage. You can access it privately on your LAN and view your NAS' status. Firstly, at the top is your navigation bar: this is where you'll work from. Immediately click System > General > Password (Password is a sub-tab, literally lower on the screen) and change your password to something strong. Now go back to the General sub-tab (next to Password) and in the protocol drop-down box, select HTTPS (this is more secure than HTTP). This is a good enough start for you NAS, now we can proceed to setting up your disks.
  86.  
  87. NOTA BENE:
  88. Ensure first that all of your disks are connected physically; this should have been verified during the first boot of the PC when the BIOS was shown. Additionally, keep a monitor plugged into your NAS so you can see updates print to the screen as you change things.
  89.  
  90. Go to the Disks tab and click Management. The first thing you'll have to do is format the drives (i.e. all data is wiped). Click on the HDD Format sub-tab and select the drives you want to format, and in the drop-down box above, select UFS (GPT and Soft Updates) as your filesystem. Click 'Next' through without changing anything and allow the drives to be formatted (it may take a while).
  91.  
  92. NOTA BENE:
  93. You will do this next paragraph's steps for all drives you formatted.
  94.  
  95. Once all formatting is done, click the Disks tab, then click Mount Point. Click the blue plus sign in the bottom right. Leave everything unchanged, but in the Disk drop-down box, select each of your newly-formatted drives, one at a time. Also, change your drive name to something in the 'Mount point name' field; I choose disk0, disk1, etc. arbitrarily. Now, click Add. After a moment, your disks will be mounted.
  96.  
  97. If you want to do some RAID (I like RAID1), you will need to go to Disks > Software Raid and set up your RAID array with your disks. Once done with that, go back to Disks > Format and format the new RAID array as UFS, just like a normal disk. Then, mount the new 'disk' and you are done.
  98.  
  99. Now, we can share the NAS with users on the LAN. Go to Services > CIFS/SMB and once in that tab, check the Enable box in the top right. Ensure that in the Authentication field, Local User is selected.
  100.  
  101. Click on the Shares sub-tab, and then the blue check mark. Fill out the first two fields, and in the third, Path, open the popup box by clicking the three dots. Once opened, DO NOT SHARE /mnt only; this will cause issues. For each of the drives you want to share, share them by clicking them in the popup box. For instance, you have two drives, disk0 and disk1; once done, your two paths will be /mnt/disk0 and /mnt/disk1.
  102.  
  103. Back in the individual Share settings sub-tab, ensure that Browseable, Guest and Recycle Bin are checked (this last one is for safety- if you show hidden files in Windows you can see the recycle bin of each share and recover files you might have accidentally deleted). Apply these changes to each share.
  104.  
  105. At this point, you can view the disks from your PC. If you want, you can create user accounts to allow specific people specific rights and access points from the Access > Users and Groups tab and by adding a new user (i.e. you will have to login with a password and username from your PC). If it is just you working with the NAS, this is optional. I do it as an added layer of security.
  106.  
  107. On your PC, open the file explorer. In the address bar, type \\ followed by the IP address of your NAS (the same as the WebGUI's one, but just the numbers); for instance: \\10.0.0.70. You should see your drives; now you can add files to your heart's content. As your NAS grows, it may take a bit longer to load up.
  108.  
  109. That's it. Enjoy.
  110.  
  111. -------------------------------------------
  112.  
  113. The next step, should you choose to do it, is to allow yourself to access your NAS from anywhere in the world: your own private server. There are ways to do this, but many are VERY unsafe and can result in your data being literally open to the internet.
  114.  
  115. I won't write a step-by-step for this, but here is an outline:
  116. - SSH allows simple command-line interfacing with your NAS, but you can download a program like PuTTY or WinSCP (I prefer WinSCP) to have a graphical interface.
  117. - You will not be able to access the NAS outside of your LAN with your usual IP address; this is a local address; you will have to use a service like DynDNS to assign a website name to your NAS and set it up with your router
  118. - SSH is a must; do NOT use FTP or any derivative as they are unsafe
  119. - Change the port SSH uses through the WebGUI; hackers often hit the SSH port relentlessly if it is open
  120. - Password login is fine, but DO NOT allow root login via SSH; this is literally like handing the keys of your house to an intruder; you can disable root login via SSH through the WebGUI in Services > SSH; I recommend setting up a user with a random name (do not use your own) and granting that user root access, so at least there is an added layer of security; a typical hacker technique is to try root login and brute-force passwords
  121. - You can set up large asymmetric key login, that is: no passwords and instant login to the NAS as long as you are on your computer; this is very safe, and you can generate up to 4096-bit RSA keys so that guessing them is practically impossible
  122.  
  123. Here is a dump of files related to the topic of making your NAS acessible through the internet from anywhere in the world (take them with a grain of salt: there are bound to be some discrepancies):
  124.  
  125. https://www.ixsystems.com/community/threads/ssh-or-vpn.36483/
  126. Useful comment from the above forum link:
  127. "IMHO SSH is not less secure if you know how to set it up properly. Use public key authentication with a passphrase on your private key and disable password authentication. That way not only would someone need to steal your private key, but they would also need your passphrase as well. You can even use a service like Authy and add 3-factor auth. I use 4096-bit RSA keys and I don't use the same key for everything. Whether you open a port for VPN or open for SSH you are still opening up your network. Change the default port from 22 to something else to add some obscurity. I even have a firewall rule drop all packets coming in on port 22. You would be amazed at all the brute force ssh attempts that occur on a frequent basis. On our 500 or so Linux servers we only use SSH and have yet to have a system compromised. I'm comfortable in CLI so I prefer SSH. Find what you are comfortable with and set it up properly and either one can be just as secure as the other.
  128. https://www.xigmanas.com/wiki/doku.php?id=documentation:setup_and_user_guide:services_ssh
  129. https://www.xigmanas.com/wiki/doku.php?id=documentation:setup_and_user_guide:basic_configuration_connection
  130. https://www.xigmanas.com/wiki/doku.php?id=documentation:setup_and_user_guide:password-less_key_authentication
  131. https://www.xigmanas.com/wiki/doku.php?id=documentation:setup_and_user_guide:secure_sftp_configuration
  132.  
  133. https://www.xigmanas.com/wiki/doku.php?id=faq:0039
  134. https://www.xigmanas.com/wiki/doku.php?id=faq:0045
  135. https://www.xigmanas.com/wiki/doku.php?id=faq:0056
  136. https://www.xigmanas.com/wiki/doku.php?id=faq:0096
  137. https://www.xigmanas.com/wiki/doku.php?id=faq:0108
  138.  
  139. https://justinho.com/blog/2016/12/26/ssh-nas4free.html
  140. https://v4.chriskrycho.com/2016/free-dynamic-dns-for-remote-login-via-ssh.html
  141. https://www.axllent.org/docs/view/samba-over-ssh/
  142. https://www.ixsystems.com/community/threads/samba-cifs-over-ssh-openvpn.55755/
  143. https://www.ixsystems.com/community/threads/remote-accessible-share-and-user-friendly-how-to.43954/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement