WRT1200 bridge mode and USB3 external drive

In my home network I am running 2 WRT1200ac routers one is DHCP and the other is in bridge mode. After speaking with linksys support my router in bridge mode can't add a network hard drive. If I was to flash my 2nd WRT1200 with the firmware here will I be able to run in bridge mode still and add my additional external hard drive? If so how difficult would it be to do? Is there a video or a guide I can follow?

Before someone asks I am running 2 routers to extend my network between my office and home. They need to be on the same network so that I can share the NAS, networked printers and scanner. The primary router all ready has a USB3 drive in use as a backup. I am wanting to add 2nd NAS for my media center to share locally. The linksys OEM firmware will not allow me to add the hard drive.

I have flashed the OEM firmware but I have never worked with anything other then OEM. I have tinkered with linux 10+ years ago and have forgotten how to use it, so a detailed directions would be required. :frowning:

https://openwrt.org/docs/guide-user/network/wifi/atheroswds despite the name this applies to all mainline kernel drivers (this means both devices participating in a WDS/ 4addr link need to run OpenWrt, although I don't know how well mwlwifi supports this).

You can set up samba(4) on either device, if desired.

2 Likes

I have been researching using Openwrt and it looks like the setup and install will be much easier then I had originally thought. The routers are wired together and 2nd is basically acting as network hub and AP.

So if I am understanding the steps correctly I locate the proper bin file and upload it. Then login to the router with the ip address 192.168.1.1. From there I just install or remove the packages I need (remove DHCP). As long as the attached drive file directory is DLNA -compliant I am good to go. One thing I noticed in the documentations someone added users and passwords to the attached storage. Is that required? I have no way of entering a user and password on my connected TVs.

http://downloads.openwrt.org/releases/18.06.4/targets/mvebu/cortexa9/openwrt-18.06.4-mvebu-cortexa9-linksys-wrt1200ac-squashfs-factory.img

Do the factory bins all ready include USB3 hard drive support? and LuCI? Several of the supporting documentation I have read covers command line inputs. I am much more comfortable using a GUI interface.

I am trying to get all the details worked out ahead of time. Once I reflash and if it fails for what ever reason I won't have internet connection.

One thing I noticed in the documentations someone added users and passwords to the attached storage. Is that required?

No, and if you chose to add them they would only be asked for when using samba, not DLNA.

Do the factory bins all ready include USB3 hard drive support? and LuCI?

The Stable builds include Luci and usb3 (development builds only include usb3, no luci), although with either build you'll also need to install kmod-usb-storage block-mount and the file system of your drive, for example if it's ntfs you'll need either kmod-fs-ntfs for read only access or ntfs-3g for read/write access, for fat drives it's kmod-fs-vfat.

1 Like

@mike So if I am understanding the process correctly I need to flash the factory.img then sysupgrade.bin?

https://openwrt.org/toh/linksys/linksys_wrt1200ac

If booting from the primary partition, the secondary (or alternate ) partition will be flashed on next sysupgrade.

I am not understand the primary and secondary partition. I would think the factory.img would flash both and sysupgrade would be when loading a newer release?

The next step would be to remove the DHCP package

If all goes well I should have internet access at this point and I will just have to install the required packages to get the USB3 mounted and configured to work?

install minidlna?
https://openwrt.org/docs/guide-user/services/media_server/dlna

No, just like the OEM firmware, the factory image will only flash 'the other' partition (and then switch to booting that one), but that's all you need - ignore the part about sysupgrading immediately after.

Yes.

I don't see a reason to remove it, just to disable it.

1 Like

install minidlna?

Yes sorry, forgot to mention that, minidlna also needs to be installed.

1 Like

@slh & @mike Thanks guys!!

That is a good point, I was just thinking if it was removed it wouldn't conflict with the primary router.

@mike Something just occurred to me. Will I need to install both samba and minidlna? My plan is to use my laptop to save to the networked hard drive then to use my TV and tablets for playback.

Yes, you'll need samba to transfer files over the network and minidlna for playback. Also, when installing packages through Luci, first Update Lists (you'll see the Update Lists button in Luci>System>Software), then for most packages it's usually ok to just install the luci-app-* version which will usually bring all dependencies, so minidlna for example you can just install luci-app-minidlna.

1 Like

ok, guys I am now running OpenWRT on my router. Everything seems to be ok except my windows 10 computer can't see the networked drive.

A little bit of command line is needed, but it's simple, first install putty (full instructions here), once you've ssh'ed into your router you just need to make a mount point, for now just put it in /mnt (you can always change it later), and call it anything you'd like, I'll use storage as an example, so just run this command -

mkdir /mnt/storage

Then go back into Luci and look at System>Mount Points>Mount Points, if your drive is ntfs go ahead and delete whatever was automatically populated there and replace it with the auto mount instructions here in rc.local, located at Luci>System>Startup>Local Startup (replace sync with async because sync is too slow), there's other ways to mount, but that's the easiest for ntfs, you can change it later too.

Then go to Services>Network Shares>Shared Directories, click Add and give your directory a name, the path (/mnt/storage), make sure Browseable is checked and if you're not familiar with linux permissions just use 0777 in Mask for new Files/Directories, that gives full permissions so it's not very safe, but you can change them later. Then reboot your router and check System>Mount Points>Mounted File Systems to see if your drive is mounted, if it is Windows should see it, if it doesn't you might reboot Windows and check again.

In my previous attempts to get it mounted, I have installed putty and ran the command line. The drive has been mount on the router. I just get stuck at the user name and password. The directions I was following was for different releases and didn't match my screen. Their directions for adding user and password wasn't clear enough or there has been to many changes been release and wiki. I will give your directions another look in the morning. Hopefully fresh eyes get it done.

The way I've always added user/passwords is this and its still working ok in 18.06.4 for me -

ssh in, go to /etc/passwd and add this line -

yourusername:*:1000:65534:yourusername:/var:/bin/false

For password -

smbpasswd -a yourusername

You'll be asked to enter the password twice and that should do it, although you might want to reboot your router just to make sure.

1 Like

Post links and notes and we can clean it up for others :slight_smile:

@mike I have finally taken time to work on this again. I have managed to create user and a password. I believe I have some issues with the config files. Which config files should I be looking at? I know the mount has changed and name has been changed. I am guessing one of the config files is incorrect. Also are the paths case sensitive?

config samba
        option name 'Media_Server'
        option description 'Media Server'
        option workgroup 'mynetworkname'
        option homes '1'

config sambashare
        option browseable 'yes'
        option name 'Movies'
        option read_only 'no'
        option guest_ok 'no'
        option create_mask '0777'
        option dir_mask '0777'
        option users 'user'
        option path '/mnt/sda1/Movies'

I basically want a single drive of movies for the kids to watch. I think I am making it more complicated by added the folder name instead of just stopping at the mount point? The only way that I have found the drive is using the ip address, can I use a host name too?

As for the security I want it to only be available to the local network, one user will save the files to the drive, then anybody can read with DLNA & network access.

@anon50098793

I basically had to research how to do the most basic things with terminal commands. The directions are written for people that remember the steps and commands to do the basic things. Not noob friendly. I forgot how to change directories, show files, open a text editor, etc.

1 Like

I basically want a single drive of movies for the kids to watch. I think I am making it more complicated by added the folder name instead of just stopping at the mount point?

DLNA isn't dependent on the samba share, so you can stop at the mount point to give yourself access to the entire drive when using samba and everyone will still have access to stream movies through DLNA -

config sambashare
*****
*****
option path 'mnt/sda1'

The only way that I have found the drive is using the ip address , can I use a host name too?

If i remember right, Windows uses the ip address while mac and linux use hostname, i might be remembering that wrong though.

As for the security I want it to only be available to the local network, one user will save the files to the drive, then anybody can read with DLNA & network access.

Samba works on two levels, share and user, with share access everyone on the network has access, there are no specific users. With user access is when you create specific users, either way is only available on the local network (and either way everyone will have access to stream movies through dlna) and there is no way to "mix" the two (if that makes sense) that i know of, so in your case you would create a user, call them user1, give user1 a password and give user1 read/write access (which you've already done), then you would create user2, give user2 a password and give user2 read access only, then you would give the user2 name/password to everyone who you wanted to have read only access to the drive. So for user2 you would set it up the same way as user1, the only change being to the read option and no need to set permissions for new files since write access is forbidden -

config sambashare
****
****
option read_only 'yes'

And your home directories aren't related to your drive, so you don't have to share them unless you want to -

option homes '0'

What files need to be configured for samba to work?

  • /etc/config/samba
  • /etc/samba/smb.conf
  • /etc/samba/smb.conf.template

https://openwrt.org/docs/guide-user/services/nas/samba_configuration#adding_samba_user_s

Just found this page while typing this up.

  • /etc/config/firewall

https://openwrt.org/docs/guide-user/services/nas/cifs.server

Can someone explain?

> config 'samba'
>         option 'homes' '0'
>         option 'interface' 'loopback lan'

homes > presents a user folder which maps to a path - directories should exist there and be ~0777 to the user ( setting to 1 means enable ) but you'd want to check where the path is set.

interface > enables listening on those adapters ( i.e. do not put wan )