LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-25-2007, 07:03 AM   #1
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Rep: Reputation: 31
How to access a NAS from the command line?


Hi!

I've just bought a NAS (Terastation Pro from Buffalo) and would like to write a backup-script in order to make automatic backups through a cronjob. but the NAS doesn't seem to work either with ssh nor with rsync. The only way I found is mount but I would like to know if there isn't any other solution (except for ftp). so far I read is NFS not so secure. I would like to use my NAS to backup a webserver, so the server is quite exposed. that's why I'm looking for something more secure than mount.

thanks.

Last edited by xpucto; 07-25-2007 at 07:14 AM.
 
Old 07-25-2007, 03:50 PM   #2
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
It may be that this unit doesn't actually support any secure protocols. The last time that I looked at NAS appliances most of them only seemed to support CIFS, FTP, and sometimes NFS v. 3 (what a choice!).

One compromise solution is to write a backup script that uses GnuPG to encrypt zip files containing your data before you send them across the network.
 
Old 07-26-2007, 12:09 AM   #3
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
An important question involving security is where this is being done? I got the impression reading your initial post that this was something for home use. If that is the case, using a protocol like ftp or nfs is not such a big deal. Yes ssh or rsync can be much more secure, but if it is just on a LAN, there really is no issue in using it that way.

If you are doing it across the internet, then you need to do it like a business would. Mount the NAS device to another computer exclusively, and force all connections to go through the other computer through SSH. That's how we do it at work.

Mounting it really is a "good" solution, particularly if you do it through a USB or serial type of cable, and not over an networking cable like cat5-5e-6. That exposes it to everything on the LAN, which still is safe, depending on the size of the LAN.

Peace,
JimBass
 
Old 07-26-2007, 03:15 AM   #4
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
thanks for the answers.

Quote:
Originally Posted by JimBass
An important question involving security is where this is being done? I got the impression reading your initial post that this was something for home use.
actually it's not for home but for work, so the security is a very important matter.

Quote:
Originally Posted by JimBass
If you are doing it across the internet, then you need to do it like a business would. Mount the NAS device to another computer exclusively, and force all connections to go through the other computer through SSH. That's how we do it at work.
I'm not sure if I understand what you mean with "through the other computer", which "other computer" do you mean? Do you mean: I take some computer that isn't been used right now, make a mount with this computer and the NAS, and all servers have to make a ssh to the computer? with a USB connection or through the LAN?

Quote:
Originally Posted by JimBass
Mounting it really is a "good" solution, particularly if you do it through a USB or serial type of cable, and not over an networking cable like cat5-5e-6. That exposes it to everything on the LAN, which still is safe, depending on the size of the LAN.
in the NAS's manual it only says something about LAN-cable, but nothing about direct USB or serial connection. the only thing I found is
Quote:
TeraStation Pro has two USB 2.0 ports on the rear. These ports can be used for adding external
USB Hard Drives or UPS systems. TeraStation will share connected USB storage devices, allowing
everyone on the network to use them. Up to two external USB hard drives may be added to
TeraStation Pro.
so it talks about adding HD but not about direct USB connection with a server for example. how come they don't say a word about it? how does the USB connection work? pluging a USB cable between the computer and the NAS, and then?

my situation is the following one: I have 3 webservers, 2 are in the same network, the other is in a different network. I do NOT have the possibility to install a firewall before all those conputers. In order not to expose the NAS too much I first decided to only use it for the 2 webservers that are located in the same network, so that I could leave blank the gateway's IP in the NAS's configuration. this way is the NAS only to be reached from the network where the 2 webservers are. But the mount is still a problem for the servers themselves, and the serrvers'iptables doesn't allow to mount. I would have to change the iptables's configuration, and I don't like the idea, especially since I read that NFS shouldn't be used in the wild www!

thanks for any further explanation and advice. this NAS solution should be something to improve the security and not something that exposes my webservers even more!

Last edited by xpucto; 07-26-2007 at 03:19 AM.
 
Old 09-28-2007, 09:11 AM   #5
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by JimBass View Post
Mounting it really is a "good" solution, particularly if you do it through a USB or serial type of cable, and not over an networking cable like cat5-5e-6. That exposes it to everything on the LAN, which still is safe, depending on the size of the LAN.
So mounting through a USB-cable is definitly not possible in my case. I've even contacted Buffalo to be sure.

now I'm trying to mount it through the command line (in order to backup the datas with the same permissions, but I'm getting some difficulty.

with
Code:
sudo mount -t nfs 192.00.00.1:/myNAS my_local_directory
I get an error message
Quote:
mount: mount to NFS server 192.00.00.1 failed: system error connection refused
I get the error message even when iptables is down.
Any suggestion how I can make this?
 
Old 10-08-2007, 09:20 AM   #6
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Well, how do you all use your NAS? I can't believe that you all use it through GUI!
 
Old 10-08-2007, 10:31 AM   #7
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
I mount my coraid devices like I would mount anything else, check man mount for details if you're unsure about it.

This is the server section of LQ, odds are good the majority of users don't even have a GUI on their servers. I know for sure not one of my servers has X installed.

Do you know for sure that your SAN is sharing data via NFS? According to this page, the Terastation only shares through Samba and FTP. ->

http://www.buffalotech.com/products/...tation-pro-ii/
on the specification tab towards the bottom.

Peace,
JimBass
 
Old 10-10-2007, 08:00 AM   #8
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by JimBass View Post
I mount my coraid devices like I would mount anything else, check man mount for details if you're unsure about it.

This is the server section of LQ, odds are good the majority of users don't even have a GUI on their servers. I know for sure not one of my servers has X installed.

Do you know for sure that your SAN is sharing data via NFS? According to this page, the Terastation only shares through Samba and FTP. ->

http://www.buffalotech.com/products/...tation-pro-ii/
on the specification tab towards the bottom.

Peace,
JimBass
Thank you JimBass! You seem to be absolutly right!
I have just tried with smbclient and it works. I will use smbmount in order to have a cronjob running.

Last edited by xpucto; 10-10-2007 at 08:11 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I access my CD drive from the command line? snarvey SUSE / openSUSE 2 03-19-2006 07:15 AM
Command line 'dictionary' access command. swiadek Linux - Software 3 02-23-2006 08:53 AM
Is it possible to access samba server from command line? RodWC Linux - General 5 02-02-2006 02:35 AM
How do I access metadata from the command line? WilliamMcMath Linux - General 1 11-03-2005 01:04 PM
Can I access the INTERNET from the command line???? Guvvy Linux - Newbie 4 02-02-2005 09:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration