Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a mybook live western digital 1TB hard disk connected to fritzbox 7270 router in office. When I am in the office, I can mount this drive to ubuntu since I have added to the etc/fstab file:

//192.168.178.30/user /home/user/DISK cifs auto,iocharset=utf8,user=user%password 0 0

Is there a similar, easy & safe way, to do the same when I am out of the office using the static IP of the fritzbox router?

I have already added tcp port forwarding in the router for ports 8080 (to 80 of the disk) and 8443 (to 443 of the disk).

I have activated also port forwarding to 445.

Results are till now: ... cifs auto,iocharset=utf8,port=445,user=user%password 0 0 Unable to find suitable address.

... cifs auto,iocharset=utf8,ip=192.168.178.30,user=user%password 0 0 mount error(115): Operation now in progress Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

... cifs auto,iocharset=utf8,port=445,user=user%password 0 0 mount error(112): Host is down

Finally, when I do a port scan remotely at the Fritz!box router, there is no reading for port 445. Maybe this is the cause of the problem. Does anyone know how to open it (port forwarding of port 445 to the 445 port of the disk is activated)?

I have also tried to manually change Fritz!box settings as described here but still during port scan on the router 445 port is not shown.

Thank you in advance

share|improve this question

2 Answers 2

Port 443 is usually for HTTPS; I believe that the correct port for CIFS is 445. You would have to forward that port. I did a port scan of my MyBook Live and it showed as having an open port on 445 for the file system.

port scan:

PORT      STATE SERVICE
21/tcp    open  ftp
22/tcp    open  ssh
80/tcp    open  http
111/tcp   open  rpcbind
139/tcp   open  netbios-ssn
443/tcp   open  https
445/tcp   open  microsoft-ds
548/tcp   open  afp
2049/tcp  open  nfs
49153/tcp open  unknown

I would also recommend setting up a VPN on the fritzbox router

You would then have to mount it manually or add a line in etc/fstab that makes use of the external IP address.

Command Line:

$ mkdir /mnt/cifs
$ mount -t cifs //server-name/share-name /mnt/cifs -o username=shareuser,password=sharepassword,domain=yourdomain
$ mount -t cifs //123.456.78.90/sharename /mnt/cifs -o 

username=shareuser,password=sharepassword,domain=yourdomain

There should be no need to specify the port in your mount command since the protocol should specify that.

share|improve this answer
    
Thank you cprofitt. Can you please instruct me how to mount it from terminal? Also, if we say 123.456.78.90 is remote static ip of fritz box, shall I add port forwarding of 123.456.78.90:445 to port 445 of 192.168.178.30 in the router? –  bob Oct 28 '12 at 16:08
    
Also, as far as Shrew Soft VPN client is concerned, I have used it successfully but I see many times disconnections, so I can't use it for long tasks (e.g. big amount of files copy) –  bob Oct 28 '12 at 16:11
1  
I have added port forwarding at 445 port and tried sudo mount.cifs //123.456.78.90:445/user /home/user/diskrem -o,iocharset=utf8,uid=1000,gid=1000,user=user%password but result is mount error: could not resolve address for 123.456.78.90:445: Unknown error –  bob Oct 28 '12 at 16:57
1  
Did you try the option port of mount.cifs (sets the port number on which the client will attempt to contact the CIFS server), for example, add in options port=8445 if in the router you do port forward from 8445 to 445. –  Pipe Oct 31 '12 at 19:00
1  
@bob Yes, you should add port forwarding, but there should not be a need to add the port in your mount command. sudo mount.cifs //123.456.78.90/user /home/user/diskrem -o,iocharset=utf8,uid=1000,gid=1000,user=user%password should work. –  cprofitt Nov 4 '12 at 4:33

I also have WD Live and but I choose to use ssh/sftp to file sharing.

In my router I've done a PAT like publicIP:23 -> internalIP:22

Then in Nautilus, I use the following location

sftp://username@publicIP:23/<SharePath>

Because I'm lazy and don't like passwords, the authentication is done via private keys and there is a bookmark in Nautilus to my home share.

share|improve this answer
    
thank you, but I would not like to open ftp port. –  bob Nov 2 '12 at 6:17
1  
you don't need to open ftp port, just ssh (tcp/22) –  Pipe Nov 5 '12 at 10:16
1  
you could use any port you want on the router, so long as it gets forwarded by the router to port 22 on the WD Live NAS. ports 23 and 80 are just used to get past firewalls that block port 22. –  ImaginaryRobots Nov 5 '12 at 19:39
    
thank you both. I have tried above but access is denied. I have enabled ftp in wd interface and also port forwarding of public ip port 23 to wd port 22. can you please share details? –  bob Nov 6 '12 at 17:34
    
only normal ftp is working in the fritz!box. The trick you proposed is not working in my case since fritzbox closes connection if I do it as described your example (I tried 23 and 8443 ports to 22). I however thank you anyway. –  bob Nov 6 '12 at 18:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.