How to remotely mount drive in file system?

Discussion about using NAS on Linux and Unix OS.
User avatar
dolbyman
Guru
Posts: 35253
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: How to remotely mount drive in file system?

Post by dolbyman »

The No-IP would be needed to connect to the VPN on the router (if you have a changing dynamic IP, if you get a fixed one, you can live without the DynDNS)

The connection configuration file needs to be from the device with the OVPN server (your router!), it needs to come from that router, if that file is from your QNAP, toss it and forget it. You need the router OVPN config file.

Use the config file to establish a connection to your OVPN server.

When the connection is established you have a transparent tunnel that you can use the same way as in your home LAN

e.g. 192.168.1.99 is your NAS

UNC path

\\192.168.1.99\sharename will work in your LAN AND from anywhere in the world (as long as the OVPN connection is established)
tomwgf
Getting the hang of things
Posts: 60
Joined: Fri Jan 11, 2008 6:44 am

Re: How to remotely mount drive in file system?

Post by tomwgf »

The openvpn config file did come fro my reouter - the VPN service page
the router has dynamic dns set up
The NETGEAR DDNS on this router is currently configured to:
Host Name: mynoipaddress.com

my laptop fstab is set to:
//mynoipaddress.com:/Public /media/NAS cifs credentials=/home/myusername/.credentials,iocharset=utf8,secntlm 0 0

but when i do sudo mount -a

i get: mount error :could not reolve address mynoipaddress.com:: Unknown Error

i wonder if there are too many colons there?
tomwgf
Getting the hang of things
Posts: 60
Joined: Fri Jan 11, 2008 6:44 am

Re: How to remotely mount drive in file system?

Post by tomwgf »

so it probably was too many colons - i changed it to //mynoipaddress.com:/Public
new error (111) could not connect to (my ip) unable to find a suitable address
User avatar
dolbyman
Guru
Posts: 35253
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: How to remotely mount drive in file system?

Post by dolbyman »

as said a couple of times now .. that no IP address resolved to a PUBLIC IP, that is NOT how this works .. UNC paths get mounted with your PRIVATE IP

there is also no colons in any of this (unless ovpn runs on a non default port, but that is set in the ovpn config file)
tomwgf
Getting the hang of things
Posts: 60
Joined: Fri Jan 11, 2008 6:44 am

Re: How to remotely mount drive in file system?

Post by tomwgf »

oddly - i didnt understand your reply about IP addresses.
but just read this:
ou might have to explicitly specify the IP address, e.g.:
sudo mount -t cifs //my-disk/j -o "username=me,password=s)mePasss,ip=10.10.10.43" /mnt/sync

so maybe i need to add a line to fstab ,ip=myipaddress
tomwgf
Getting the hang of things
Posts: 60
Joined: Fri Jan 11, 2008 6:44 am

Re: How to remotely mount drive in file system?

Post by tomwgf »

about
that no IP address resolved to a PUBLIC IP, that is NOT how this works .. UNC paths get mounted with your PRIVATE IP

OK, what does that mean, as in what do i do about that?
my fstab currently reads
//mynoipaddress.com:/Public /media/NAS cifs credentials=/home/myusername/.credentials,iocharset=utf8,secntlm 0 0

i think you want it to say something else, but if i change it to
//192.168.0.17:/Public /media/NAS cifs credentials=/home/myusername/.credentials,iocharset=utf8,secntlm 0 0

that only works on my lan?? i alerady mount the drive on my lan with nfs - i want to moutn it on my laptop when i am away fro home, remotley so surely it has to be some extraernal address?? or not. ive no idea, anything is possible
tomwgf
Getting the hang of things
Posts: 60
Joined: Fri Jan 11, 2008 6:44 am

Re: How to remotely mount drive in file system?

Post by tomwgf »

okk tried
//192.168.0.17:/Public /media/NAS cifs credentials=/home/myusername/.credentials,iocharset=utf8,secntlm 0 0
got error could not resolve address
User avatar
dolbyman
Guru
Posts: 35253
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: How to remotely mount drive in file system?

Post by dolbyman »

So if you have the ovpn connection established (you need to be outside of your own LAN to test this .. you know that right? .. go to starbucks or use a phone hotspot on data, etc)

Go to a browser and open: (if 10.10.10.43 is the actual private IP of your NAS)

https://10.10.10.43:8080

If you NAS web frontend opens then you know the VPN connection works .. before that is tested .. anything else is useless !
User avatar
dolbyman
Guru
Posts: 35253
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: How to remotely mount drive in file system?

Post by dolbyman »

tomwgf wrote: Fri Jan 28, 2022 1:33 am okk tried
//192.168.0.17:/Public /media/NAS cifs credentials=/home/myusername/.credentials,iocharset=utf8,secntlm 0 0
got error could not resolve address
correct UNC path would be (if 192.168.0.17 is the actual IP of your NAS)

\\192.168.0.17\Public
tomwgf
Getting the hang of things
Posts: 60
Joined: Fri Jan 11, 2008 6:44 am

Re: How to remotely mount drive in file system?

Post by tomwgf »

i changed it to
\\192.168.0.17:\Public /media/NAS cifs credentials=/home/myusername/.credentials,iocharset=utf8,secntlm 0 0
and
\\192.168.0.17\Public /media/NAS cifs credentials=/home/myusername/.credentials,iocharset=utf8,secntlm 0 0

and both get mount error (22) invalid argument

also - i missed your earlier message - i have just tried
https://mynoipaddress:8080/
and got: This site can’t be reached
User avatar
dolbyman
Guru
Posts: 35253
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: How to remotely mount drive in file system?

Post by dolbyman »

tomwgf wrote: Fri Jan 28, 2022 1:42 am also - i missed your earlier message - i have just tried
https://mynoipaddress:8080/
and got: This site can’t be reached

Please read again what I asked you to test (VPN connection established from outside network... and IP mentioned ..)
tomwgf
Getting the hang of things
Posts: 60
Joined: Fri Jan 11, 2008 6:44 am

Re: How to remotely mount drive in file system?

Post by tomwgf »

ah -sorry i missed that bit about being away - sorry agai and thank you for your patience
User avatar
dolbyman
Guru
Posts: 35253
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: How to remotely mount drive in file system?

Post by dolbyman »

yes .. and I said before .. the noipadress does NOT come into play on these tests (it is ONLY (!!!!) for the OVPN connection .. after that you will NOT (!!!!!!!) use that DYDNS name for anything (!!!!) )
tomwgf
Getting the hang of things
Posts: 60
Joined: Fri Jan 11, 2008 6:44 am

Re: How to remotely mount drive in file system?

Post by tomwgf »

Back again ( went to visit parents, couldnt connect to qnap, but now have 3 months before next trip i give myself..30% chance of getting this working by then)

So... what do i need to do?
is it something at noipaddress or in my hostfile, or on my qnap or something on my router, or all 4 to get this connection to work?
User avatar
dolbyman
Guru
Posts: 35253
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: How to remotely mount drive in file system?

Post by dolbyman »

get the vpn connection to work..thats basically it
Post Reply

Return to “Linux & Unix (NFS)”