cheap DIY NAS from old Router with OpenWrt and Samba for your home network

Поделиться
HTML-код
  • Опубликовано: 21 июл 2024
  • Turning an old Router into a NAS Storage is easier than you might think. If you router has a USB port and it can run OpenWRT then all you have to do is hook that USB hard disk up to your router and install Samba on it. In 10 minutes you will have a cheap DIY NAS Network attached storage - your own file server for your home Network built from an old router with OpenWrt and Samba!
    OpenWRT can be easily used with Samba. You need a router with OpenWRT and can install Samba from the luci menu. Please bear in mind that while this is a cheap DIY NAS, an old router is not sized for heavy load. This is rather a storage solution for a home network where you exchange files from time to time. Samba is a linux software that can provide a windows file server. The latest version is Samba4, but you can install Version 3.6 on OpenWRT if you wanted to.
    Please visit my channel / @onemarcfifty
    Check out my other videos for cool things to do with old router , more cool stuff with old router and things to do in your home network.
    For the suggested solution you do need a USB Port on your router. We hook up a USB disk to it, so if you have no USB it will not work.
    Marc on Twitter: / onemarcfifty
    Marc on Facebook: / onemarcfifty
    Marc on Reddit: / onemarcfifty
    Chat with me on Discord: / discord
    Licence-free music on / Lizenzfreie Musik von www.terrasound.de/lizenzfreie...
  • НаукаНаука

Комментарии • 93

  • @omarkarsly2453
    @omarkarsly2453 2 года назад +5

    the world need more people as like you ,, man you helped me alot but I still need help with putting user and password

    • @OneMarcFifty
      @OneMarcFifty  2 года назад

      Hi Omar, many thanks. this solution is however not made to replace a full NAS - it's rather meant to simplify file exchange on the fly

  • @samuraijaydee
    @samuraijaydee 2 года назад +4

    Thanks Marc. You've a real talent. I enjoy watching your videos. They're really helpful!

  • @sandy6619
    @sandy6619 2 года назад +2

    This video makes it so easy. Thanks!!

  • @n.n.1279
    @n.n.1279 4 года назад +3

    Thank you so much! Very easy to follow video. Win10 kept asking for user/password. I created a user and added it to Samba. Win10 showed me then the new drive but I had no permissions. If I find a solution I will write it here...

    • @OneMarcFifty
      @OneMarcFifty  4 года назад +1

      Try chmod on the files - you might need to add larger permissions - the samba solution that I show here has certain limitations - you might also want to check the smb.conf template in luci

  • @ochjoo77
    @ochjoo77 3 года назад +4

    Once you get a hang of it (thanks to your videos) OpenWrt is actually pretty user friendly for what power you get with it

    • @OneMarcFifty
      @OneMarcFifty  3 года назад +1

      Yeah - many thanks for that - I actually started with DD-Wrt many years ago and found OpenWrt quite confusing - but once I invested some time I wouldn't miss it ;-) The point is that you do need to invest in time and learning. But the reward is (nearly) unlimited flexibility and freedom ;)

    • @ochjoo77
      @ochjoo77 3 года назад +1

      @@OneMarcFifty I have now gone to ROOter, because I'm dealing with a 4g router and I must say their forum is the best one I've ever come across! The developers there are super nice, fast and knowledgeable. And you get new firmwares to test with hours, it's crazy. Basically a flavor of OpenWrt, but very well prepared and with lots of features and great LTE support which is a problem with vanilla OpenWrt.

    • @OneMarcFifty
      @OneMarcFifty  3 года назад

      @@ochjoo77 That's great feedback - I'll check it out - I am planning to build a 4G fail-over router on my own - do they have the same package repositories like OpenWrt - in other words - is it OpenWrt and more or is it rather a separate fork ?

    • @ochjoo77
      @ochjoo77 3 года назад +1

      @@OneMarcFifty they have now firmwares based on the release and the snapshots of OpenWrt, it's normal OpenWrt plus a ton of great goodies plus best modem support

  • @porschesdawg
    @porschesdawg 3 года назад +1

    Thank you!

  • @SAM13560
    @SAM13560 3 года назад +1

    Hello,
    Thank you for this video!
    Just one question for 5:25
    could you assign the network shares for both interfaces(lan and wan)?
    Since the lan is in another network (e.g. 192.168.1.x) then the wan (e.g. 10.10.10.x) can you reach the nas with the two ip adresses?

    • @OneMarcFifty
      @OneMarcFifty  3 года назад

      Hi Sam, yes you could - however you would need to modify the firewall settings and also be aware of potential security implications.

  • @AMian-yf2hn
    @AMian-yf2hn 3 года назад +1

    Nice, watching many your videos !
    Re: extroot, is there an easy method to boot Openwrt on most home routers from usb stick, without having to reflash with Openwrt?
    Use case is old routers without sufficient flash to boot new Openwrt versions, and the effort to flash a new OS.
    This usb boot likely has to do with the common uboot bootloader. Is uboot configured to accept usb boot first by default?
    Of course extroot can also extend both flash and RAM of router.

    • @OneMarcFifty
      @OneMarcFifty  3 года назад

      I believe this is possible but I haven‘t done it, so no experience here... checking the openwrt forum there is an article on it here forum.openwrt.org/t/booting-openwrt-from-usb/14263 but it looks as if this is not trivial...

  • @ChMuhammadImran
    @ChMuhammadImran 3 года назад

    Very nice

  • @kenyates7960
    @kenyates7960 2 года назад +1

    When I try and install samba4 like at your time index 4:37, I get a message that required package "libatomic1" is not available. The the bottom of that box at the description I get a longer message that "Required dependancy package 'libatomic1' is not available in any repository. Any workarounds or can someone point me to that dependancy? I tried "apt install libatomic1" with apt reporting 'not found'.

    • @OneMarcFifty
      @OneMarcFifty  2 года назад

      You mean opkg, not apt right ? What version and architecture are you on ?

  • @jbgrenouille2527
    @jbgrenouille2527 2 года назад +1

    Greetings, the video has served me a lot, thanks!
    which dlna server is preferable in Openwrt ?

    • @OneMarcFifty
      @OneMarcFifty  2 года назад

      Hi JB, I can't really recommend any because I am not running UPNP/DLNA Server on the router, but I think most people either use minidlna or a separate installation of anything like mediatomb or the like. These days most people have switched to Plex or Jellyfin though...

  • @godfather1768
    @godfather1768 3 года назад +1

    @OneMarcFifty would you be able to do a video showing how to install ksmbd serve for NAS instead of samba server?

    • @OneMarcFifty
      @OneMarcFifty  3 года назад

      Thanks for your comment! I'll have a look at it - looks much lighter than fully blown samba indeed ;-)

    • @ochjoo77
      @ochjoo77 3 года назад

      This comes pre-installed in the ROOter firmwares, I found it's very similar if you use the Luci interface, I had it running in 3min. The mounting etc is all the same as this video.

  • @CoZaDurnyPortal
    @CoZaDurnyPortal 2 года назад +1

    Could you share your samba config settings? Unfortunately Windows can't get access to hard drive in my case. Permission denied message can be found in logs. Thanks in advance

    • @OneMarcFifty
      @OneMarcFifty  2 года назад

      That’s usually related to Linux permissions on the files. You might need to chown/chmod

  • @danielgeorge9066
    @danielgeorge9066 3 года назад +1

    Can u pls make a vid on how to make the smb1 protocol safer

    • @OneMarcFifty
      @OneMarcFifty  3 года назад

      Hmmmm.... you really want to use smb1 ? What's the reason for this ? Browsing can be achieved with avahi as well...

  • @ykwongtube
    @ykwongtube 2 года назад +1

    the services menu didn't show up after installed Luci-app-samba4, I am running openwrt 21.02 on a Linksys wrt32x.
    appreciate if anyone can help!

    • @OneMarcFifty
      @OneMarcFifty  2 года назад

      Hi, sometimes you might need to reboot the router before the menu appears. Also did you install luci-app-samba4 ?

    • @ykwongtube
      @ykwongtube 2 года назад

      @@OneMarcFifty yes, installed luci-app-samba4 and log off and reboot several times. still nothing appears.

  • @downtownzinho
    @downtownzinho 3 года назад +1

    I installed the software exactly as shown in the video, however the option of "mount points" is not appearing in the "system" tab, do you know how to solve this? I'm using OpenWrt 19.07.2 on the Newifi D2 router.

    • @OneMarcFifty
      @OneMarcFifty  3 года назад +1

      What's the file system on the disk ? If you are using NTFS then search for ntfs in the software tab. You might need to load kmod-ntfs or the like before then.

    • @downtownzinho
      @downtownzinho 3 года назад +1

      @@OneMarcFifty Yes, it is NTFS and I installed kmod-fs-ntfs, I also installed vfat as you explained in the video for those with a Windows operating system and the option of "mount points" did not appear, even so I used the address "http: / /192.168.1.1/cgi-bin/luci/admin/system/mounts" and I managed to enter "Mount Points ", however when I look for a device to mount it does not appear in the list, it is blank.

    • @OneMarcFifty
      @OneMarcFifty  3 года назад +2

      @@downtownzinho Please check this article if there are any steps that need to be added (kmod-usb-storage etc) openwrt.org/docs/guide-user/storage/usb-drives

    • @the.craigthomson
      @the.craigthomson 3 года назад +2

      @@downtownzinho try to install the block-mount package and then reboot the router. This package is mentioned in the link @OneMarcFifty gave you, and I never saw any message about a reboot needed, but I still didn't see a menu option for mount points until I rebooted the router. Refreshing luci won't do anything.

  • @DanIDEas
    @DanIDEas 3 года назад

    Coz mine has some issues
    And I have no idea why like it works on the phone (VLC) but not the laptop

    • @OneMarcFifty
      @OneMarcFifty  3 года назад

      Hi Daniel, I am not sure if I understand what you say - what would you need help with exactly, what is working and what is not?

  • @mrbennotmrban
    @mrbennotmrban 3 года назад +1

    I followed your instructions but "mount attached devices" is not mounting anything for me. Any Idea what could be missing here?

    • @OneMarcFifty
      @OneMarcFifty  3 года назад

      Hi, that issue comes up every now and then (if you read through the comments then you might find some of them). Most people got it resolved by checking here: openwrt.org/docs/guide-user/storage/usb-drives

    • @mrbennotmrban
      @mrbennotmrban 3 года назад

      @@OneMarcFifty Nice thanks, I have them mounted now. Now I have access permission denied, do you have a tutorial on how to use terminal commands on openwrt, I am trying to change samba config using putty and was able to login to the router through the terminal yesterday, but don't know how to change it, I'm thinking through terminal but may be wrong.

  • @spetauskas
    @spetauskas 2 года назад +1

    is it posible to make server like this with router, but more like dropbox. so you could aces file from any device from anywhere and upload would work same as dropbox. I hope you undertstand my question :D thanks

    • @OneMarcFifty
      @OneMarcFifty  2 года назад +1

      Hi, not sure if that yould work on OpenWrt as you would need a couple of software packages to do that - memory might be the limitation there.

  • @jeff_9074
    @jeff_9074 3 года назад +1

    I have an old dlink wifi router that has a USB port for NAS, and a 1gb 4port switch built in. I am using Google mesh Wifi now, and I have a tplink switch to hardwire the three pucks. Is there a way, to use this old router as an extended switch off my tplink switch, and some how tie into the nas feature to map to from a windows 10 machine?

    • @OneMarcFifty
      @OneMarcFifty  3 года назад +1

      Hi Jeff, in fact it should be sufficient to just plug one LAN port into the TPLink and that should give you extended switch functionality (turn off all DHCP Server functions on the DLINK to not interfere with the DHCP there, i.e. make the LAN interface a DHCP client)

    • @jeff_9074
      @jeff_9074 3 года назад

      @@OneMarcFifty Thank you! And can I still access the built in NAS, by just using the IP address of the router? Also, what security features will there be to protect outside access to the NAS?

    • @OneMarcFifty
      @OneMarcFifty  3 года назад +1

      As long as you use the LAN interface that should work well. In this concept there are no security mechanisms other than the built in firewall.

    • @jeff_9074
      @jeff_9074 3 года назад

      @@OneMarcFifty Thank you!

  • @andersonalbertoararatgomez8371
    @andersonalbertoararatgomez8371 2 года назад +1

    Hi new guy here, would you please tell me which edition program your use and the drawing ✍️ one ☝️, thanks a lot and keep educating us..!

  • @greencrunchy
    @greencrunchy 2 года назад +2

    Hey Marc, does this still work with Openwrt 21? I just upgraded from 19 and I can't get this to work now. Was wondering if there are new steps for version 21?

    • @greencrunchy
      @greencrunchy 2 года назад +2

      nvm, I needed to install the package block-mount for it to work. I'm sure I did not install this in v19.

    • @OneMarcFifty
      @OneMarcFifty  2 года назад

      Many thanks for your comment - glad you figured it out ;-)

    • @jianxifu5954
      @jianxifu5954 2 года назад

      @@greencrunchy Thank you!

  • @nextnomura
    @nextnomura 2 года назад +1

    Hi, thanks for the tutorial but I can't get it work on my Windows PC, it says that my windows pc don't have permission to access, same as my Android phone.

    • @OneMarcFifty
      @OneMarcFifty  2 года назад

      Hi Salman, it might have to do with linux side file permissions. Maybe you need to chown / chmod on the directories ?

    • @LilRedDog
      @LilRedDog Год назад

      @@OneMarcFifty Yeah, so: #me2
      I can read the NAS but I cannot write to it.
      I spent a day trying to understand chown/chmod (along with creating the cfg file in the right folder and editing it) with dir/folders NAS (yes, I named it NAS) mounted - /mnt/sda1- which should be the entire drive. (gawd only knows what my experimentation with adding packages did trying to get write permissions; I'm getting errors on adding some packages)
      It is NTFS and I have copied the entire drive if I NEED to format the drive and copy and paste scripts from the OpenWRT forum and format it to ext4.
      But:
      I'm stubborn!!!
      I can read the drive but I cannot add files (write to the drive).
      I wonder which is more effort: (I use it to make movies (i.e. large files) accessible to the LAN; it has 2Tb space)
      You:
      holding my hand on how to use chown/chmod and create the cfg file (script-kiddie style) or just wipe the drive re-flash the router to a clean install and use ext4 and use the scripts OpenWRT provides.
      I'd, rather learn to navigate Linux, create directories and files and edit the file from you. (I do have a raspberry Pi that a dabble in Linux on, but, to honest, I'm just a script-pentagenerian that used to CLI MS and DR-Dos.
      And my research says I need software to edit the cfg (which is crazy, because I edit my Pi4's CFGs all the time in notepad but I can remove the SD card and put it in a W10 computer)
      On a tangent:
      My, new/used/old, (Linksys EA6350v3) router has dual boot that shares 128NAND and I see instructions for other routers to delete one and maximize the entire flash memory to one whole partition. Do you have any insight on how to do that?
      In the meantime: I'm off to watch your videos on Ipv6 and getting my Pi-hole and OpenWRT to play nice with it.
      Thank you for making this, for the most part, easy.

  • @MARS-ALIVE
    @MARS-ALIVE 3 года назад

    hmm I'm now able to access the ext4 hdd, but I'm getting an error when trying to create a folder. " You need permission to perform this action" thanks for your great videos!!

    • @MARS-ALIVE
      @MARS-ALIVE 3 года назад

      Sooo I clicked on force root option and now I can create directories, is that ok to have that option enabled?

    • @OneMarcFifty
      @OneMarcFifty  3 года назад +1

      Many thanks for your comment - I assume this is related to file access permissions on the volume. You might need to chmod/chown in order to avoid this happening. Assumption: This drive had been connected to a linux workstation before. Feel free to join the discord session on sunday and we can have a look!

  • @djturntablestilltheend5159
    @djturntablestilltheend5159 Год назад +1

    Marc, please follow up this with an install of vsftpd with WAN access. I had this working in the paste few years, now I always get “permission denied” whenever I access via an ftp client. Moreover how about making the connection over vsftpd encrypted.

    • @OneMarcFifty
      @OneMarcFifty  Год назад

      You may want to check this blog post here: forum.openwrt.org/t/vsftpd-usb3-f2fs-setup/40369/4

    • @djturntablestilltheend5159
      @djturntablestilltheend5159 Год назад +1

      @@OneMarcFifty that’s post is mine Marc! I’m richjoh short for Rich Johnson. I this OpenWrt 21 breaks vsftpd. I always get Permission Denied even with 777 chmod.

    • @OneMarcFifty
      @OneMarcFifty  Год назад

      @@djturntablestilltheend5159 OK (lol) - that doesn't help you then ;-) Sorry.

    • @djturntablestilltheend5159
      @djturntablestilltheend5159 Год назад

      @@OneMarcFifty correct. I reverted back to V19 OpenWrt and I cannot get past the Permission Denied. Typing from my phone excuse the typos…

  • @Lp-ze1tg
    @Lp-ze1tg 3 года назад +1

    Is this router still use as router or a standalone nas?

    • @OneMarcFifty
      @OneMarcFifty  3 года назад

      It's still working as a router. Please keep in mind that this is not meant to replace a fully-blown NAS solution but rather as a convenience solution to share files e.g. in the family.

  • @greencrunchy
    @greencrunchy 2 года назад +1

    How's the file transfer speed with this setup?

    • @OneMarcFifty
      @OneMarcFifty  2 года назад

      Hi, I haven't measured that. Again please keep in mind that this is not meant to be a fully blown NAS for 20 users or the like but rather a low cost file sharing solution. File transfer speed will essentially be limited by USB, Ethernet and CPU.

  • @jordanwiliams6056
    @jordanwiliams6056 2 года назад +1

    IF your hardrive wont mount DO this..
    c) Enable higher currents on the USB port:
    - nano /boot/config.txt
    - #Add this line to the file: max_usb_current=1
    - #save and reboot

    • @OneMarcFifty
      @OneMarcFifty  2 года назад

      Oh - many thanks for sharing, I was totally unaware of this option!

    • @ncbwztcw
      @ncbwztcw Год назад

      I think that this might be a "Raspberry Pi-thing" only (i.e. I think that it will have no effect on the majority of routers.)

  • @novaleary4488
    @novaleary4488 4 года назад +2

    How do you have 8 GB on the router? I have the same router (but it's V5) and I only have 10MB

    • @OneMarcFifty
      @OneMarcFifty  4 года назад +8

      Thank you. I have been waiting so long for someone to ask that question. I am using extroot. That is a method to extend your routers memory using a USB stick. Would you be interested in seeing a video on this?

    • @novaleary4488
      @novaleary4488 4 года назад +1

      @@OneMarcFifty Ah ok, and yeah I'm interested in seeing a video on it. My model seems to only have 1 USB port, I do however have a couple of USB hubs lying around I plan on using to expand the storage on the router (Samba 4 seems to eat space for breakfast)

    • @OneMarcFifty
      @OneMarcFifty  4 года назад +2

      Definitely. If you watch my USB camera video, you will see that I also use a powered USB hub. I had to do this for two reasons: first to add more than one USB device and second because the 3G dongle needed more power than the USB ports could provide. I am doing fail over to 3G in case the DSL goes down

    • @wobelaarlivenl
      @wobelaarlivenl 3 года назад

      @@OneMarcFifty I would also be very intereted in that, because I don't understand any of it and as of right now I can't install samba 4, because it uses too much space...

    • @OneMarcFifty
      @OneMarcFifty  3 года назад +4

      Ok guys, it‘s noted - I‘ll make something on extroot and I also have firewall with OpenWrt on my list 😉 Many thanks for your feedback!

  • @Jaszczur89
    @Jaszczur89 3 года назад

    When I click "Add" button nothing happens :(

    • @OneMarcFifty
      @OneMarcFifty  3 года назад

      Hi Jaszczur , can you expand a little bit ? Time Marker in the video where things go wrong, OpenWrt version, what you did and what you are trying to achieve ? I am happy to help but would need a little bit more detail here please...

  • @_capr_545
    @_capr_545 3 года назад +1

    The mount points aren't showing in the GUI. I figured it out with and SSH tutorial though.

    • @OneMarcFifty
      @OneMarcFifty  3 года назад

      Many thanks for your feedback- how exactly did you fix it? (In case someone runs into the same issue)

    • @_capr_545
      @_capr_545 3 года назад +1

      @@OneMarcFifty Can't remember for sure but I think it was this tutorial: openwrt.org/docs/guide-user/storage/usb-drives

    • @OneMarcFifty
      @OneMarcFifty  3 года назад

      Cool, many thanks!

  • @ramadash2472
    @ramadash2472 3 года назад +1

    what is openwrt ?

    • @OneMarcFifty
      @OneMarcFifty  3 года назад

      OpenWrt is very often referred to as being an alternate, free and open Firmware, mainly for aftermarket routers. On top of this, I would say that it is actually a more or less complete linux distribution on its own, mainy because of the integrated package management. Visit www.openwrt.org for more information!