This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
virtualisation:file-server [2018/02/28 07:58] – buettner | virtualisation:file-server [2025/04/22 14:02] (current) – [Store a local domain with a static IP address] gray | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to set up a NB2800 | + | ====== How to set up a File Server ====== |
- | This Article describes how to install a file server on the NB2800 router. | + | ===== Goal ===== |
- | If you need instructions on how to set up a LXC Container | + | This Article describes |
- | This setup contains the installation and configuration of the vsftpd FTP server, the Net2FTP web frontend for vsftpd, and Samba shares. In addition, a way is shown to transfer files from an USB stick to your container: | + | This setup contains the installation and configuration of the vsftpd FTP server, the Net2FTP web frontend for vsftpd, and Samba shares. In addition, a way is shown to transfer files from an USB stick to your container. |
- | ==== 1) Preparations | + | ===== Prerequisites ===== |
- | The first step you should take is to give your router a static IP adress. For this, use | + | * NetModule Wireless Router with wireless connection |
- | < | + | * NetModule Software [[https://share.netmodule.com/public/system-software/ |
- | nano /etc/network/interfaces | + | * A license is required for the LXC container |
- | </code> | + | * Not available for legacy products NB1600, NB2700, NB3700, NB3710 |
- | and set up a static IP configuration for your primary interface. In this example, the configuration for the eth0 interface looks like this: | + | |
- | < | + | |
- | auto eth0 | + | |
- | iface eth0 inet static | + | |
- | address 192.168.1.50 | + | |
- | netmask 255.255.255.0 | + | |
- | network 192.168.1.0 | + | |
- | broadcast 192.168.1.255 | + | |
- | gateway 192.168.1.105 | + | |
- | dns-nameservers 192.168.1.105 | + | |
- | </ | + | |
- | After that, use | + | |
- | < | + | ===== - Setting up an LXC container and then implementing File Server ===== |
- | apt-get update | + | |
- | </ | + | The link below takes you to a wiki that describes how to install |
- | and | + | |
- | < | + | ---- |
- | apt-get upgrade | + | |
- | </ | + | * Set up an LXC container / [[app-notes: |
- | to bring your system | + | |
+ | ---- | ||
+ | |||
+ | |||
+ | Once the '' | ||
+ | |||
+ | |||
+ | ===== Store a local domain with a static IP address ==== | ||
If your network setup doesn' | If your network setup doesn' | ||
- | For this, get access to the routers web interface and go to Services -> DNS Server. Under " | + | For this, get access to the routers web interface and go to Services -> DNS Server. Under '' |
- | Now enter the IP address and the domain name you want it linked to and click " | + | Now enter the IP address and the domain name you want it linked to and click '' |
- | {{ : | + | |
+ | {{ : | ||
After this, your configuration should look like this: | After this, your configuration should look like this: | ||
- | {{ : | + | {{ : |
Now you can access the file server with both its IP address a its local domain name. | Now you can access the file server with both its IP address a its local domain name. | ||
- | + | ===== - The vsftpd FTP server ==== | |
- | + | ||
- | ==== 2) The vsftpd FTP server ==== | + | |
Vsftpd (Very Secure File Transfer Protocol Deamon) is a very compact and secure FTP server. It provides a high amount of data security and user management features. | Vsftpd (Very Secure File Transfer Protocol Deamon) is a very compact and secure FTP server. It provides a high amount of data security and user management features. | ||
Line 122: | Line 117: | ||
local_root=/ | local_root=/ | ||
allow_writeable_chroot=YES | allow_writeable_chroot=YES | ||
- | force_ssl_enable=YES | + | #force_ssl_enable=YES |
force_local_data_ssl=YES | force_local_data_ssl=YES | ||
force_local_logins_ssl=YES | force_local_logins_ssl=YES | ||
Line 153: | Line 148: | ||
[[https:// | [[https:// | ||
- | First, you have to download the Software from this [[https:// | + | First, you have to download the Software from this [[https:// |
In the next step, you have to install a web server and PHP in your container: | In the next step, you have to install a web server and PHP in your container: | ||
Line 163: | Line 158: | ||
After this, upload your downloaded and renamed folder to your web servers default location (e.g. / | After this, upload your downloaded and renamed folder to your web servers default location (e.g. / | ||
- | You also have to change the rigths | + | You also have to change the rights |
< | < | ||
chmod 777 temp | chmod 777 temp | ||
Line 344: | Line 339: | ||
This file contains the hash values of the password the user uses to login to the router. So this file is necessary automatically run actions with root level access. | This file contains the hash values of the password the user uses to login to the router. So this file is necessary automatically run actions with root level access. | ||
- | In the next step you have to create the " | + | In the next step you have to create the " |
{{ : | {{ : | ||
Line 356: | Line 351: | ||
</ | </ | ||
- | In the second example, all files in the container will be replaced by the files stored on the USB stick. | + | In the second example, all files in the container will be replaced by the files stored on the USB stick. |
< | < | ||
rsync -arv --delete / | rsync -arv --delete / | ||
Line 363: | Line 358: | ||
</ | </ | ||
- | Now format an USB stick to the FAT16 oder FAT32 file format. Copy the " | + | Now format an USB stick to the FAT16 oder FAT32 file format. Copy to it the " |
- | {{ :virtualisation:usb_3.png? | + | < |
+ | / | ||
+ | drw-r--r-- | ||
+ | drw-r--r-- | ||
+ | drw-r--r-- | ||
+ | drw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | |||
+ | </ | ||
If you now plug in the stick into the router, the stick is mounted to the file system and all tasks from the " | If you now plug in the stick into the router, the stick is mounted to the file system and all tasks from the " | ||