Best way to share file over internet from openwrt attached storage

Hi,
Can anyone suggest a way to share file form attached storage drive to internet?
I just want to create a file link which I can share on WhatsApp or social media, I don't want to use PC / mobile to make connection alive. It should be always alive if router on and file is available.
Your suggestion are appreciated.
Please suggest any best and secure way.

Thanks

You could setup a web serving solution to enable this, but it means exposing your router itself to the internet, so if you do this, you'd want to use something like nginx (do not use the standard web server that is pre-installed on OpenWrt -- it's not hardened for access over the internet. Or you could use another file sharing method such as smb, but it depends on how you want this to work... The problem is that you'll be exposing your router to the internet for sharing, and if there is a vulnerability or other issue, it could affect your network.

But, IMO, honestly the best way is to use a commercial storage solution (Google Drive, Dropbox, etc.). This has 24/7 availability, does not require a PC or other device on your local network to be on and serving the file, and doesn't require VPNs, and won't risk compromising your router/network. There are many free solutions, and paid ones if you'll have a lot of storage and/or bandwidth requirements.

3 Likes

I'm a proponent of rather strict separation of services as well, your router is one of the most sensitive devices of your network - which needs to be kept secure- and updated all the time. File sharing, especially towards the WAN (but I'd already draw the line towards the LAN as well), really belongs into a separate DMZ and on dedicated device, which should only be hosted on a well-maintained system with regular in-place upgrades (e.g. one of the major general purpose linux distributions, like arch, debian, fedora, gentoo, mageia/ mandriva, OpenSuSE, Ubuntu, …). Low-power x86_64- or ARM SBC systems (RPi, sunxi, rockchip, etc.) can deal with this well, usually more performant and capable to run one of the aforementioned general purpose operating systems.

If you know what you're doing and stay on top of security updates and good administration practices, hosting these services yourself can make a lot of sense, both for privacy reasons and in order to gain access to more storage than typically granted (respectively not being economically viable) by most 'cloud service' providers, but please do it properly and avoid becoming part of a botnet or getting extorted by organized crime.

And if at all possible, don't offer any service directly on your WAN IP, at least as long as all authorized users are yourself and members of your household, only providing these services behind a road-warrior style VPN (e.g. using wireguard) reduces the external exposure significantly.

3 Likes