LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   MyBook 1.00.16 firmware. NFS Unable to mount a resource using an hostname. (http://www.linuxquestions.org/questions/linux-networking-3/mybook-1-00-16-firmware-nfs-unable-to-mount-a-resource-using-an-hostname-745660/)

LolloNotaro 08-06-2009 04:38 PM

MyBook 1.00.16 firmware. NFS Unable to mount a resource using an hostname.
 
Hello,

I have purchased from less then one week MyBook 1Tb white edition.
It is now updated to the 1.00.16 firmware and this is the version:

Code:

[root@MyBookWorld etc]# uname -a
Linux MyBookWorld 2.6.24.4 #1 Tue Feb 10 11:00:22 GMT 2009 armv5tejl unknown

I want to use it using a dynamic DNS service (dyndns).
The MyBook is part of a domestic LAN, behind a Netgear Router.

I have registered it and I have assigned to it an host which dynamically manage the IP changes (I use dyndns service for it). After I have enabled the port forwarding for SSH and FTP I am able to use SSH and FTP using a reference to the host name during the connection.

So far so god.

Now I was able to enable to use even NFS but just when I use the local IP 192.168.1.3 of my domestic LAN.
While when I try to use the host name I cannot do it.

This is working:

[CODE]
mount -t nfs 192.168.1.3:/nfs/lorenzo /mnt/mybook
[CODE]

But this is not working

[CODE]
mount -t nfs myhost.dyndns.info:/nfs/lorenzo /mnt/mybook
[CODE]

Somebody knows which can be the issue?

Thanks
Lorenzo

910 08-07-2009 02:11 AM

If you don't have a large number of clients, the easiest way is probably using the client device's local hosts file. This will make myhost.dyndns.info resolve as an IP address of your choice (which would be 192.168.1.3).

The file is likely /etc/hosts and the line you need to add is something like

192.168.1.3 myhost.dyndns.info

LolloNotaro 08-07-2009 05:42 AM

Hello,

Thanks for your answer. I have tried to follow your suggestion but it still doesn't work:

Here more info:

Code:

[root@MyBookWorld ~]# more /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=MyBookWorld

Code:

[root@MyBookWorld ~]# more /etc/hosts           
#127.0.0.1        localhost.localdomain        localhost MyBookWorld
192.168.1.3        lollomb.dyndns.info

What else can I do?

910 08-07-2009 06:57 AM

Quote:

Originally Posted by LolloNotaro (Post 3634609)

Code:

[root@MyBookWorld ~]# more /etc/hosts           
#127.0.0.1        localhost.localdomain        localhost MyBookWorld
192.168.1.3        lollomb.dyndns.info

What else can I do?

My answer might have been a bit vague. I meant that you need to add the line to the hosts file of the client device not the NFS server (Mybook)

This way the client will resolve lollomb.dyndns.info as 192.168.1.3 and not the internet-routable address 79.97.201.94. Note that if this client device is brought outside of your LAN it will not work any more because the name always resolves as the internal address.

BTW, I suggest you don't keep the NFS service open to the internet if it's not necessary.

LolloNotaro 08-07-2009 05:24 PM

Hello, thanks for your answer.

This is work in my LAN.

And if I would like make NFS service open to the Internet, how can I do then?
Why have NFS open is it a bad idea? Maybe for security reason?

Thanks
Lorenzo

910 08-10-2009 05:15 AM

Quote:

And if I would like make NFS service open to the Internet, how can I do then?
Forwarding the ports used by NFS (and perhaps forcing NFS to use static ports instead of dynamically assigned ones) in the router to the Mybook would probably do the trick. I'm afraid I have little experience of the subject, though.

Quote:

Why have NFS open is it a bad idea? Maybe for security reason?
Exactly.

jschiwal 08-10-2009 01:35 PM

Offering NFS V3 over the internet is not a good idea unless you are going through a VPN tunnel. NFS V4 can operate using a single TCP port so you could use an ssh tunnel.

I didn't know that MyBook's supported NFS.

Isn't the .dyndns.info service for the WAN side of your router? You could use avanti (zeroconf) instead. Instead of using hostname, you use hostname.local. For a home network, I would recommend mapping IP <-> MAC addresses in the DHCP router so that your local IP addresses don't change. Then you can add each host to the /etc/hosts file and not have to worry about one computer getting a different address when it's lease runs out.

You could have a computer that has the drive mounted accept ssh connections and use scp, sftp or konqueror's fish:/ protocol to transfer files with a remote connection.


All times are GMT -5. The time now is 12:57 AM.