ProFTPd

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 21:56, 9 October 2007 (edit)
MeisterEder (Talk | contribs)
(Installing optware)
← Previous diff
Revision as of 23:16, 9 October 2007 (edit) (undo)
MeisterEder (Talk | contribs)
m (valueable)
Next diff →
Line 8: Line 8:
It is also possible to replace every occurances of (/mmc) with (/jffs) if you have it enabled. It is also possible to replace every occurances of (/mmc) with (/jffs) if you have it enabled.
-=Preparation=+====Preface====
 +To run a ftp-server you need appropriate free space on your device. So its best you have sd-card-modded your device (or you can connect an HD).
 +This tutorial points on an installed sd-card mounted to "/mmc".
-Install first optware!+====First: install optware====
 +If you dont have installed this wonderful system, so do it now!
 +It easy and descriped in [[Optware]] (up to 2.2).
-Then install xinetd+====Install xinetd====
 +Xinetd is a so called super-server. It receives requests on configurable ports and then starts an appropriate serverprocess.
 +In our case xinetd should manage the ftp-requests and start proftpd. So install xinetd:
 + /opt/bin/ipkg update xinetd
 + /opt/bin/ipkg install xinetd
-Then install proftpd+====Install proftpd====
 +Also install the proftpd-server:
 + /opt/bin/ipkg install proftpd
 + 
 +Because of the good work of the optware-people there is only a little bit configuration to do:
 +====Configure xinetd====
 +In default-configuration xinet only listens to requests from network 192.168.1.0/24
 +If your network does not meet this netmask you have to change the value:
 + 
 +Open the file /opt/etc/xinetd.conf with you favorite editor (maybe "nano")
 + nano opt/etc/xinetd.conf
 + 
 +Change the value for "only_from" to your netmask (something like 192.168.4.0/24?)
 +To allow request from everywhere you can comment this line out (note "#" at beginning of the line)
 + 
 +====Configure proftpd====
 +Open the file /opt/etc/proftpd.conf with you favorite editor (maybe "nano")
 + nano opt/etc/proftpd.conf
 +We have to change some values for meeting the standards of dd-wrt:
 +Replace the lines:
 + User nobody
 + Group nobody
 +with
 + User root
 + Group root
 + 
 +Also you can change the "DefaultRoot" to "/mmc" if you want.
 + 
 +If you dont want to allow anonymous access delete the entire "<Anonymous>" section!
 + 
 +====Start the xinet-superserver====
 + /opt/etc/init.d/S10xinetd start
 + 
 +====Test the service====
 +Connect with your favorite ftp-client to the new server. Login with your wrt-"root"-Login (or another existing user)
 +Maybe the login takes a while - the proftpd-server have to start for every connect!
=Installing optware= =Installing optware=
[http://www.dd-wrt.com/wiki/index.php/Optware Installing optware ] [http://www.dd-wrt.com/wiki/index.php/Optware Installing optware ]

Revision as of 23:16, 9 October 2007

by mcpat

Contents

Requirements

First be sure that you have enough memory free. Because of this I describe the installation on SD-cards (/mmc). Additionally this procedure will show how to install even the needed ipkg packages on the SD-card.

It is also possible to replace every occurances of (/mmc) with (/jffs) if you have it enabled.

Preface

To run a ftp-server you need appropriate free space on your device. So its best you have sd-card-modded your device (or you can connect an HD). This tutorial points on an installed sd-card mounted to "/mmc".

First: install optware

If you dont have installed this wonderful system, so do it now! It easy and descriped in Optware (up to 2.2).

Install xinetd

Xinetd is a so called super-server. It receives requests on configurable ports and then starts an appropriate serverprocess. In our case xinetd should manage the ftp-requests and start proftpd. So install xinetd:

/opt/bin/ipkg update xinetd
/opt/bin/ipkg install xinetd

Install proftpd

Also install the proftpd-server:

/opt/bin/ipkg install proftpd

Because of the good work of the optware-people there is only a little bit configuration to do:

Configure xinetd

In default-configuration xinet only listens to requests from network 192.168.1.0/24 If your network does not meet this netmask you have to change the value:

Open the file /opt/etc/xinetd.conf with you favorite editor (maybe "nano")

nano opt/etc/xinetd.conf

Change the value for "only_from" to your netmask (something like 192.168.4.0/24?) To allow request from everywhere you can comment this line out (note "#" at beginning of the line)

Configure proftpd

Open the file /opt/etc/proftpd.conf with you favorite editor (maybe "nano")

nano opt/etc/proftpd.conf

We have to change some values for meeting the standards of dd-wrt: Replace the lines:

User                            nobody
Group                          nobody

with

User                            root
Group                          root

Also you can change the "DefaultRoot" to "/mmc" if you want.

If you dont want to allow anonymous access delete the entire "<Anonymous>" section!

Start the xinet-superserver

/opt/etc/init.d/S10xinetd start

Test the service

Connect with your favorite ftp-client to the new server. Login with your wrt-"root"-Login (or another existing user) Maybe the login takes a while - the proftpd-server have to start for every connect!

Installing optware

Installing optware