Accessing Lacie Network Space through web interface

Northernsky
Posts: 10
Joined: Tue Apr 26, 2011 10:05 am

Accessing Lacie Network Space through web interface

Post by Northernsky » Tue Apr 26, 2011 10:17 am

I'd like to start by saying that I'm totally new to this and really don't have much idea of what I'm doing so please be VERY clear with instructions.

I have my Lacie connected to a Netgear WNR2000 where I am able to forward ports and have set a static IP for Lacie. I want to be able to access my Lacie from anywhere so I registered on Dyndns and created a host and forwarded ports 21 and 80 in my router. Although this does only work with computers connected to the same internet company as my router because they block these ports in their firewall. So now I'm looking for a way around this and someone from Dyndns suggested a webhop. I tried setting up a webhop and forwarding the port i selected in my router instead but this gave me no access to Lacie at all.

Now I don't know how to take this further, can I edit my Lacie Network Space 2 to work with a different port than the usual ones? If not, is there perhaps some other way around this? I didn't find a way to forward to another port within my router but perhaps I've missed something there. I really apreciate all the help!

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: Accessing Lacie Network Space through web interface

Post by Mijzelf » Wed Apr 27, 2011 11:10 am

You can use this trick to edit your ftp settings. I suppose a similar way can be used to edit the webserver configuration.
Although this does only work with computers connected to the same internet company as my router because they block these ports in their firewall.
In that case I'd expect the ports from outside not to be accessible at all.

Northernsky
Posts: 10
Joined: Tue Apr 26, 2011 10:05 am

Re: Accessing Lacie Network Space through web interface

Post by Northernsky » Wed Apr 27, 2011 12:10 pm

Okej, where should I type this code-line, do I need some sort of additional software to make these changes? As I said, I don't know anything about this!

What du you mean "ports from outside not beeing accessible at all"? According to my internet-deliverer they only block these ports:
FTP (21/tcp)
Telnet (23/tcp)
SMTP (25/tcp)
HTTP (80/tcp)
PORTMAP (111/tcp)
netbios-dgm (138/udp)
netbios-ssn (139/tcp)
SNMP (161/udp)
SNMP-trap (162/udp)
HTTPS (443/tcp)

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: Accessing Lacie Network Space through web interface

Post by Mijzelf » Wed Apr 27, 2011 1:07 pm

Northernsky wrote:Okej, where should I type this code-line, do I need some sort of additional software to make these changes? As I said, I don't know anything about this!
You'll need to have ssh access first. This gives you the possibility to change the service configs beyond the webinterface limits. This is necessary, as the webinterface doesn't let you change the basic port numbers. If your router cannot translate ports, you'll have to change the ports itself.
What du you mean "ports from outside not beeing accessible at all"?
I mean that the blocked ports are not accessible, even from 'computers connected to the same internet company'.

Northernsky
Posts: 10
Joined: Tue Apr 26, 2011 10:05 am

Re: Accessing Lacie Network Space through web interface

Post by Northernsky » Wed Apr 27, 2011 7:43 pm

Okej, what exactly is ssh and how do I do to get it?

No, I have acctually tried from another computer with another IP but with the same internet company and it worked. They block only connections coming from outside there network.

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: Accessing Lacie Network Space through web interface

Post by Mijzelf » Thu Apr 28, 2011 7:34 am

Northernsky wrote:Okej, what exactly is ssh and how do I do to get it?
SSH is (among many more) a way to open a command prompt on a remote computer. Your NS2 in this case. And how to get it? Read this thread, and don't forget to read the last post, from april 26.

For the client side PuTTY is a good choice.

Northernsky
Posts: 10
Joined: Tue Apr 26, 2011 10:05 am

Re: Accessing Lacie Network Space through web interface

Post by Northernsky » Fri Apr 29, 2011 5:41 pm

I did the first step and all seemed to have worked as i should. But I don't understand the second step. I downloaded Putty but I don't know where to type the string "ssh-keygen -b 1024 -t rsa -N YOUR_PASSWORD -f lacie_ns2".

Really huge thanks for trying to help me with this!

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: Accessing Lacie Network Space through web interface

Post by Mijzelf » Fri Apr 29, 2011 6:08 pm

That line is to be executed on a *nix commandline.

You can use PuTTYgen to get the same result:
* - Use puttygen to create a public/private key pair
* - Save the public and private key to your computer
* - Copy the key from the puttygen box "Public key for pasting into OpenSSH authorized_keys file"

Northernsky
Posts: 10
Joined: Tue Apr 26, 2011 10:05 am

Re: Accessing Lacie Network Space through web interface

Post by Northernsky » Fri Apr 29, 2011 9:28 pm

Okay. I've done all the steps and restarted the device. How wo I connect through ssh, do I need a program for that to? How do I do to change the standard ports now? As far as I know I can only forward the traffic fron dyndns to one port, is it possible that one port is enough or is there some way that I can forward to multiple ports?

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: Accessing Lacie Network Space through web interface

Post by Mijzelf » Sat Apr 30, 2011 6:31 am

Northernsky wrote:How wo I connect through ssh, do I need a program for that to?
Yes, PuTTY. You'll have to provide your private key in the Auth panel in the 'Private key file for authentication' box, and then login as root on your NAS.
Northernsky wrote:How do I do to change the standard ports now?
I already told you how to change the ftp server settings here.
You'll have to change 'MasqueradeAddress', 'PassivePorts' and 'Port'. Suggestions:
Port 60000
PassivePorts 60001 60010
MasqueradeAddress <your-dyndns-domain>

Now you'll have to forward the ports 60000 to (and including) 60010 to your NAS, and everything should work. In your FTP client you'll have to connect to port 60000.
BTW, proftpd is a full-blown server with a zillion options. More here.
As far as I know I can only forward the traffic fron dyndns to one port
DynDNS has nothing to do with ports. It's just a lookup table which translates some domain name into an IP address. You could also skip DynDNS and just use your public IP address (the one which you see when you go to www.whatismyip.com), but that's not very convenient, as your public IP can change without notice. DynDNS keeps track of this.
The portforwarding is done in your router. According to this page, you'll have to
- Login on your router
- Click the Port Forwarding / Port Triggering link near the left of the page.
- Click the 'Add service' button
- Fill in the form:
-- Service name: Anything you like
-- Protocol: TCP
-- Starting port: 60000
-- Ending port: 60010
-- Server IP address: <ip-of-your-nas>

Northernsky
Posts: 10
Joined: Tue Apr 26, 2011 10:05 am

Re: Accessing Lacie Network Space through web interface

Post by Northernsky » Sat Apr 30, 2011 7:46 am

Yes, PuTTY. You'll have to provide your private key in the Auth panel in the 'Private key file for authentication' box, and then login as root on your NAS.
Okay, so how do I log in as root on my NAS?

Also, I'm not sure you have understood fully. I want to be able to access my NAS from any computer without having to install any program on it. I want to use the original dashboard. This is because I can't install programs on all the computers I want to use to access my NAS. This means I will have to change the standard port for both ftp and http, right? Is this possible?
I already told you how to change the ftp server settings here.
Yes, I'm aware of that but I don't understand your instructions there. Where should I type what? As I said from the beginning I don't know anything about this or these programs.

I have no problem with forwarding in my router, I was just wondering if I'm supposed to connect through the http port when I try to access it later and I want to reach the dashboard.

kalleguld
Posts: 36
Joined: Thu Mar 31, 2011 10:55 am

Re: Accessing Lacie Network Space through web interface

Post by kalleguld » Sat Apr 30, 2011 1:00 pm

This means I will have to change the standard port for both ftp and http, right? Is this possible?
yes, but a bit tricky (as i'm sure you know by now :))

You need to change a few system files on the box.
I'm going to take it from the top here. If you get confused, please specify where. I assume you use windows (almost any version will do)

step 1: install PuTTY
2: run puttygen, and generate a key. make a password and save the private key somewhere safe-ish. copy the "public key for pasting..." to the clipboard.
3: go to this site:
http://downloads.lacie.nas-central.org/ ... links.html
enter the ip of your NS2 at the top, and click on "generate links".
Open the links in step one, one by one, in order.
4: paste your public key in the textarea and press "encode and generate links".
5: click on the rest of the links

6: Open putty, and enter the ip of your NS2.
in the connection >> SSH >> auth category, locate your private key
click "open"

7: you should now have a black window, asking you to log in. log in as root, and use the password you created in step 2
8: since the webinterface overwrites the ftp config file, we need to make another one, and tell the server program to use it. but the only text editor (called vi) on the system is strange if you're used to notepad. so just copy the files you need to edit into the OpenShare dir, like this:

Code: Select all

cp /etc/initng/proftpd.i /shares/OpenShare/
that will copy the file "/etc/initng/proftpd.i" into the folder "/shares/OpenShare/"
Then copy the file the other way when you're done (cp will overwrite the old one automatically).
9: can't be arsed to write any more right now, but i'll be happy to help another time.

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: Accessing Lacie Network Space through web interface

Post by Mijzelf » Sat Apr 30, 2011 1:01 pm

Okay, so how do I log in as root on my NAS?
Well, I don't have a Windows machine here, so I can't tell it exactly. But it's a bit like: Start PuTTY, goto 'SSH->Auth->Private key file for authentication' and point to your private key file. Then goto 'Session', type root@<ip-of-your-nas> in the address field, and click on 'Open'.
Now you have a shell on your NAS, in which you can do the 'ftp config' things.
Also, I'm not sure you have understood fully. I want to be able to access my NAS from any computer without having to install any program on it. I want to use the original dashboard. This is because I can't install programs on all the computers I want to use to access my NAS. This means I will have to change the standard port for both ftp and http, right? Is this possible?
I suppose so. For ftp it's certainly possible, and I think for http it can be done the same way. For both services the problem is that the config files are generated by the firmware, and the firmware doesn't give you the option to use custom ports.
So the service start script is changed to use a custom config file, which isn't controlled by the firmware. Then you can apply all configurations you want (as long as the service supports it, of course).
I have no problem with forwarding in my router, I was just wondering if I'm supposed to connect through the http port when I try to access it later and I want to reach the dashboard.
Your ISP is blocking the http port, so it has to be changed to. Let's say we put it on 8080, in that case you can reach to the dashboard by entering http://<your-dyndns-domain>:8080 in the address bar or your browser.

Northernsky
Posts: 10
Joined: Tue Apr 26, 2011 10:05 am

Re: Accessing Lacie Network Space through web interface

Post by Northernsky » Mon May 02, 2011 6:59 pm

Ok, so i managed to connect to my NAS and I've got the black window. Now I'm wondering which files I need to edit, and from what to what?

kalleguld
Posts: 36
Joined: Thu Mar 31, 2011 10:55 am

Re: Accessing Lacie Network Space through web interface

Post by kalleguld » Tue May 03, 2011 2:26 pm

Ok, great. you need to edit /etc/initng/proftpd.i so proftpd starts with another config file. And you need to create that config file (or just copy the one already there, and change it). See the link in 2nd post.
And you need to do something similar with the http server. I can't remember what what server is used, but I think it's Lighttpd.

Best of luck.

Edit: critical spelling error
Last edited by kalleguld on Wed May 04, 2011 9:17 pm, edited 1 time in total.

Post Reply