Jump to content

Need help setting up a NAS with an Android box

Go to solution Solved by Electronics Wizardy,
40 minutes ago, French_Cheese said:

Update: I've decided to use SFTP instead of SMB because, 1: SMB keeps crashing for some bizarre reason, and 2: it seems that even SMB requires you to have admin privileges when setting up on Windows. One of the devices I was hoping to access this from was a device that I don't have admin on, so I guess that won't work.

 

I was thinking, is there even a point to running a VPN server on the android device? If I have to setup a VPN server than I believe I'd also have to setup port forwarding anyway, which means that traffic for the file server would already be accessible, regardless of the VPN, correct?  So Should I just do port forwarding then? 

 

Thanks.

SFTP alone should be fine, but doing it over a VPN would be better security wise as it reduces the chances a vulnerability could cause a issue. If there was a vulnerability in SFTP, they would have access to the system, but if you have a vpn, they would need to get into the vpn and then get into the file sharing system.

Hi,

I've been wanting to set up an old Android box (Jadoo 4, rooted) as a simple over-internet file server/NAS (for various files, documents, and pictures) , that could be accessible via iOS and Android (the former preferably through the 'Files' app) and also be accessed natively with Windows file explorer (without additional software). I was hoping I could get some help with doing that.

 

I had some success using an app called "FTP Server - multiple FTP users", but I've read that the FTP protocol isn't very secure (also, I couldn't get it working outside my network; I think I need to make some configurations on my modem or use a VPN, but what exactly that entails I have no idea). 

 

How should I go about setting up a NAS that's secure? And what protocol should I use?

 

I am aware that using Linux instead of Android would be a much better alternative. I do plan on switching to Linux at some point, but right now I just want to stick to Android as I don't feel like installing a whole new OS.

 

Any help would be greatly appreciated, thanks.

Link to comment
Share on other sites

Link to post
Share on other sites

your router should be able to direct FTP traffic to your FTP box if you set it up, but as you mentioned, FTP is NOT very secure.  

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Electronics Wizardy said:

Your gonna want to use smb here. There should be some apps that can do that here.

I was thinking of using SMB, but I thought SMB wasn't meant to be used outside of the local network? 

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, French_Cheese said:

I was thinking of using SMB, but I thought SMB wasn't meant to be used outside of the local network? 

Yea SMB is made for only the local network. IF you want to access outside your network, id setup a VPN.

 

But how much storage do you want to have? Id probalby just setup google drive/one drive or simmilar. Simpler, more reliable and would probably just work better here.

Link to comment
Share on other sites

Link to post
Share on other sites

Depending on your router you could just hook up a USB HDD and share that trougheh internets.

When i ask for more specs, don't expect me to know the answer!
I'm just helping YOU to help YOURSELF!
(The more info you give the easier it is for others to help you out!)

Not willing to capitulate to the ignorance of the masses!

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, Electronics Wizardy said:

Yea SMB is made for only the local network. IF you want to access outside your network, id setup a VPN.

How exactly would I go about setting up a VPN for this purpose?

6 minutes ago, Electronics Wizardy said:

But how much storage do you want to have? Id probalby just setup google drive/one drive or simmilar. Simpler, more reliable and would probably just work better here.

Storage wise, I want to be able to add more storage if the drive gets filled up, and not have to pay an additional monthly fee. MEGA offers quite a lot of storage so I'd probably be fine, but I also just want to have it as a local backup.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, French_Cheese said:

How exactly would I go about setting up a VPN for this purpose?

Does your router support a VPN server?

 

Otherwise, id get a nas box like a synology, as they have a good wan accessable setup.

Link to comment
Share on other sites

Link to post
Share on other sites

20 minutes ago, Electronics Wizardy said:

Does your router support a VPN server?

I admit I'm not entirely sure as to what that is? It's a Bell home hub 3000.

20 minutes ago, Electronics Wizardy said:

Otherwise, id get a nas box like a synology, as they have a good wan accessable setup.

As I mentioned before, I'm looking to repurpose an old android box. I may look into getting a proper NAS down the line, but as of right now I'm just interested in using Android.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, French_Cheese said:

I admit I'm not entirely sure as to what that is? It's a Bell home hub 3000.

If its the router the ISP provides, it almost certanly doesn't have a vpn server.

 

Do you need external access, Id probably avoid external access for now and just use samba on your network.

Link to comment
Share on other sites

Link to post
Share on other sites

46 minutes ago, Electronics Wizardy said:

If its the router the ISP provides, it almost certanly doesn't have a vpn server.

Yes, it is from the ISP.

46 minutes ago, Electronics Wizardy said:

Do you need external access, Id probably avoid external access for now and just use samba on your network.

As mentioned before, I do want access from outside my local network. Is having a VPN server capable router necessary for this?

Link to comment
Share on other sites

Link to post
Share on other sites

32 minutes ago, French_Cheese said:

As mentioned before, I do want access from outside my local network. Is having a VPN server capable router necessary for this?

Its not needed, but its the most secure way to do it. There are some web based solutions like nextcloud, but I don't think that will run on andriod, and samba works much bettter in windows.

Link to comment
Share on other sites

Link to post
Share on other sites

15 hours ago, Electronics Wizardy said:

Its not needed, but its the most secure way to do it. There are some web based solutions like nextcloud, but I don't think that will run on andriod, and samba works much bettter in windows.

So what can I do then? I could probably use an app like Servers Ultimate and set it up with Samba, but I'm still uncertain as to what I should do If I want to use it outside the network securely.

The pinned topic on this section of the forum mentions a few different options like OpenVPN, 2TP, and vendor specific SSL. Would any of these work for what I want to do?

 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, French_Cheese said:

So what can I do then? I could probably use an app like Servers Ultimate and set it up with Samba, but I'm still uncertain as to what I should do If I want to use it outside the network securely.

The pinned topic on this section of the forum mentions a few different options like OpenVPN, 2TP, and vendor specific SSL. Would any of these work for what I want to do?

 

Well you need something to host the VPN, And I don't believe android can do that.

 

 

Id really try to get linux on the box, makes it much easier to setup nas uses, android was never made for this.

Link to comment
Share on other sites

Link to post
Share on other sites

On 8/4/2021 at 11:39 AM, Electronics Wizardy said:

Well you need something to host the VPN, And I don't believe android can do that.

I see. So it's a matter of hosting a VPN server on Android then? This post from Reddit seems to indicate that Servers Ultimate is also capable of running a VPN server, and the app does list VPN server as an option. So theoretically, I would need to setup both an SMB server and a VPN server using servers ultimate, and then configure a VPN profile on the devices I wanted to access it from?

 

Also, assuming that VPN would route all my devices internet traffic through the Android box and it's local network, would my internet speed be limited by the capabilities of the box? Is there a way to configure a VPN profile to only work for specific apps (both Android AND iOS)?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, French_Cheese said:

I see. So it's a matter of hosting a VPN server on Android then? This post from Reddit seems to indicate that Servers Ultimate is also capable of running a VPN server, and the app does list VPN server as an option. So theoretically, I would need to setup both an SMB server and a VPN server using servers ultimate, and then configure a VPN profile on the devices I wanted to access it from?

 

Yea that should work

 

1 minute ago, French_Cheese said:

 

Also, assuming that VPN would route all my devices internet traffic through the Android box and it's local network, would my internet speed be limited by the capabilities of the box? Is there a way to configure a VPN profile to only work for specific apps (both Android AND iOS)?

Nope, you can set it to over put the nas traffic over the vpn, so all normal internet traffic still goes out normally.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...
On 8/5/2021 at 12:45 PM, Electronics Wizardy said:

Yea that should work

Okay, thanks. I'll try it out and post an update when I do (although SMB can be difficult to setup so it may be a while). 

 

On 8/5/2021 at 12:45 PM, Electronics Wizardy said:

Nope, you can set it to over put the nas traffic over the vpn, so all normal internet traffic still goes out normally.

Oh. How exactly would I do that?

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, French_Cheese said:

Oh. How exactly would I do that?

This is normally in the vpn setting, turn split tunneling on and your good.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 months later...

Update: I've decided to use SFTP instead of SMB because, 1: SMB keeps crashing for some bizarre reason, and 2: it seems that even SMB requires you to have admin privileges when setting up on Windows. One of the devices I was hoping to access this from was a device that I don't have admin on, so I guess that won't work.

 

On 8/4/2021 at 11:39 AM, Electronics Wizardy said:

you need something to host the VPN, And I don't believe android can do that

I was thinking, is there even a point to running a VPN server on the android device? If I have to setup a VPN server than I believe I'd also have to setup port forwarding anyway, which means that traffic for the file server would already be accessible, regardless of the VPN, correct?  So Should I just do port forwarding then? 

 

Thanks.

Link to comment
Share on other sites

Link to post
Share on other sites

40 minutes ago, French_Cheese said:

Update: I've decided to use SFTP instead of SMB because, 1: SMB keeps crashing for some bizarre reason, and 2: it seems that even SMB requires you to have admin privileges when setting up on Windows. One of the devices I was hoping to access this from was a device that I don't have admin on, so I guess that won't work.

 

I was thinking, is there even a point to running a VPN server on the android device? If I have to setup a VPN server than I believe I'd also have to setup port forwarding anyway, which means that traffic for the file server would already be accessible, regardless of the VPN, correct?  So Should I just do port forwarding then? 

 

Thanks.

SFTP alone should be fine, but doing it over a VPN would be better security wise as it reduces the chances a vulnerability could cause a issue. If there was a vulnerability in SFTP, they would have access to the system, but if you have a vpn, they would need to get into the vpn and then get into the file sharing system.

Link to comment
Share on other sites

Link to post
Share on other sites

30 minutes ago, Electronics Wizardy said:

SFTP alone should be fine, but doing it over a VPN would be better security wise as it reduces the chances a vulnerability could cause a issue. If there was a vulnerability in SFTP, they would have access to the system, but if you have a vpn, they would need to get into the vpn and then get into the file sharing system.

Oh okay, but if both servers are on the same device, won't setting up port forwarding for the VPN server by extension mean that SFTP traffic is going through port forwarding rather than the VPN tunnel? 
 

Thanks, really appreciate it

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, French_Cheese said:

Oh okay, but if both servers are on the same device, won't setting up port forwarding for the VPN server by extension mean that SFTP traffic is going through port forwarding rather than the VPN tunnel? 
 

Thanks, really appreciate it

You can still have a vpn on the same device and the traffic will go over a vpn. But sftp should work fine here for most home users. Just make sure to have a reasonble password and keep it up to date.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 4 months later...

So I finally finished this project. I ended up going with SFTP because SMB requires root, and there isn't really a decent way to host a VPN on Android (especially without root), as Servers Ultimate (which is the only app that mentions hosting a VPN) seems to not really be supported much anymore, according to some XDA forums. 

 

Thanks to everybody that helped. 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 4 months later...
On 2/21/2022 at 4:13 PM, French_Cheese said:

So I finally finished this project. I ended up going with SFTP because SMB requires root, and there isn't really a decent way to host a VPN on Android (especially without root), as Servers Ultimate (which is the only app that mentions hosting a VPN) seems to not really be supported much anymore, according to some XDA forums. 

 

Thanks to everybody that helped. 

For VPN, I suggest you try zerotier. You can find instructions of how to setup on youtube. To put it simple, it acts like a middle man connecting your devices together and you can have access outside of your local network. You can connect up to 50 devices for free. Their website is: https://www.zerotier.com

 

Here is what I used for my own setup. 

-Primitive ftpd as the backend (it has SFTP) 

-MiXplorer as the front-end

-zerotier as the VPN

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×