How to set a router to work as a shared hard drive?

Hi, everyone.

This week I discovered the wonders of OpenWRT and could finally build a shared harddrive to use with all my devices at home using a retired WR710N. Got the firmware installed, a pendrive (for testing) plugged in, and started.

My setup is: I already have a modem providing internet for the entire house through wifi. My plan is connect the spare WR710N at my existing wireless network, plugin a storage via USB on it and share with SAMBA for other devices on the network, and use the LAN port on the WR710N for internet and access to the storage as well.

I configured the SAMBA server and connected to the wifi network with no problems, and for one second I thought it worked, but the two networks (my wifi and WR710N's LAN) don't talk with each other and devices on the wifi are not able to reach the SAMBA server, because they are in different networks.

I tried some bridge configurations, changed DHCP servers and several other settings, with no success. Could anyone help me on how to set the settings of the interfaces correctly so everyone sees everything?

PS: I could plug my harddrive direct to my internet modem, but the firmware is all blocked by the internet provider, so this is not an option.

Create a virtual bridge to connect the wireless interface and LAN interface to the same broadcast domain.

Check etc/config/network to see if your LAN interface is of type bridge, and check /etc/config/wireless to see if the SSID is correctly bridged to it.

I agree this would be the best solution, but it may not be viable here since it requires WDS (4-address mode) on both the wireless access point and the wireless client. Without WDS, a WiFi client interface (station) cannot be a member of a bridge. Since the modem is likely running vendor firmware, WDS may be unavailable, or incompatible with the WDS in OpenWrt.

@etcho please tell us the brand and model of your modem, and if it is running vendor firmware or OpenWrt.

The WiFi client interface might be named WWAN and be part of the WAN firewall zone, which comes with many restrictions. Please post your wireless and network configurations (without the secrets) so we can suggest improvements.

Does your modem allow configuration of a static route?
If it does, I suggest to try the Routed Client configuration. Because of the separate networks, it does not allow automatic service discovery based on broadcast/multicast, but should work well otherwise.

You did not say which version of the WR710N you have.
All of them only have 32 MB of memory, and the v2.0 only has 4 MB of flash.
Please note the warnings at the top of the device page.

1 Like

Thanks for the fast replies.

@Livy, do I need to create a new interface, just like LAN and WWAN (I already tried this)? Or it's another kind of bridge?

My WR710N is v1 (32mb, confirmed). The modem is a FiberHome AN5506-04 (pretty generic) running vendor firmware, completely customized by the ISP. I can only change basic wifi settings, so any configuration on the modem is not an option.

Firewall setings. For now, I'm not worried about firewall, so I allowed everything.


config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr ''
        option netmask ''

config globals 'globals'
        option ula_prefix 'fdc7:e51e:613a::/48'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option netmask ''
        option ip6assign '60'
        option ipaddr ''
        option _orig_ifname 'eth1'
        option _orig_bridge 'true'
        option ifname 'eth1'

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'eth0'
        option proto 'dhcpv6'

config interface 'wwan'
        option proto 'dhcp'


config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11g'
        option path 'platform/ar933x_wmac'
        option htmode 'HT20'
        option country 'US'
        option disabled '0'
        option channel 'auto'

config wifi-iface
        option network 'wwan'
        option ssid 'LIVE TIM_5D60_2G'
        option encryption 'psk2'
        option device 'radio0'
        option mode 'sta'
        option bssid 'CC:50:0A:A6:5D:60'
        option key '~~secret~~'


config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/'
        option localservice '1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv6 'server'
        option ra 'server'
        option ra_management '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'


@Livy's idea worked. I searched for virtual bridge and found a quick tutorial about relayd, and everything now works as it should. Thank you very much for the hint.

minidlna opkg be happy be simply

I tried, but my device don't have enough space to install it :pensive:

Do you need the the device to Both wifi extender as well samba server or just a samba server.

If just a samba server. Configure the device as a dumb Access Point.
Connect the Lan of the device to the Lan of the ISP router.
Then configure samba.