|
Linux /
FTPserverLinux.FTPserver HistoryHide minor edits - Show changes to markup Sunday 28 August 2005, at 03:26 GMT+8
by -
Changed lines 128-129 from:
to:
Monday 04 July 2005, at 12:31 GMT+8
by -
Changed lines 1-2 from:
NOTE: THIS ARTICLE IS NOT YET COMPLETE AND VERIFIED. to:
NOTE: THIS ARTICLE IS NOT YET COMPLETE AND VERIFIED. Added lines 129-130:
(:comments:) Wednesday 01 December 2004, at 09:17 GMT+8
by -
Added lines 1-2:
NOTE: THIS ARTICLE IS NOT YET COMPLETE AND VERIFIED. Changed line 99 from:
Effectively, it would be a one-way drop-box, making abuse practically impossible, although you still may have to be weary about people dropping stuff in to to:
Effectively, it would be a one-way drop-box, making abuse practically impossible, although you still may want to check what's in the box once in a while. Added lines 111-116:
FTP traffic is quite cumbersome to filter: if your rules are too strong, ftp won't work very well, and if they are too lax, you are at greater risk of attack. The difficulty of protecting ftp traffic is that is comes in 2 flavours: passive and active mode. While ftp uses port 21 to initiate a connection, the server will open other ports to allow data to be sent back to the client. In particular port 20 and ports above 1024. ..... Added line 125:
Monday 29 November 2004, at 00:42 GMT+8
by -
Changed line 93 from:
By default, the to:
By default, the Changed lines 95-97 from:
One concern with anonymous access is that anyone could use your server as a storage for their more-or-less legal files. Tehy would eat your bandwidth and, worse, would expose you to legal prosecution if the content shared is illegal. This is a big risk, but we still want people to be able to upload safely.
A simple way to enable that is to create an to:
One concern with anonymous access is that anyone could use your server as a storage for their files. They would eat your bandwidth and, worse, would expose you to legal prosecution if the content shared is illegal. This is a big risk, but we still want people to be able to upload safely.
A simple and safe way to enable that is to create an Changed line 99 from:
To achieve this, the simple magic of *nix user and group access is enough: to:
To achieve this, the simple magic of *nix user and group access is enough. Perfom the following as Changed lines 101-102 from:
mike:x:1001:1001:Mike SMITH:/home/mike:/bin/nologin john:x:1002:1002:John DOE:/home/john:/bin/sh to:
Added lines 106-108:
And that's it. Firewall settingsUnless you only want people on your local network to use your ftp server, you must open your firewall just enough for access from the Internet. Added lines 110-112:
If your firewall is separate from your server, then you need to open port 21 and forward it to your ftp server. More likely, your server will be directly connected to the Internet and will be protected through Changed lines 114-115 from:
to:
=] Monday 29 November 2004, at 00:28 GMT+8
by -
Added line 11:
Here I detail a possible configuration of Deleted line 23:
Changed line 44 from:
to:
Added lines 75-104:
Access ControlLocal UsersThere are many mechanisms to control access to the server. Here, we'll use the credentials of local users defined on the machine to decide if they have access to their respective home directory when they login with their normal login/password. Usually, I disable users from being able to access a terminal on my server in 2 ways:
For a local user to be able to log into a ftp server, he needs to have a login account on the machine, so these users need to have a proper login entry in the mike:x:1001:1001:Mike SMITH:/home/mike:/bin/nologin john:x:1002:1002:John DOE:/home/john:/bin/sh Here, only John will be able to access his files through FTP. As explained above, since he is not explicitely in the Anonymous accessBy default, the One concern with anonymous access is that anyone could use your server as a storage for their more-or-less legal files. Tehy would eat your bandwidth and, worse, would expose you to legal prosecution if the content shared is illegal. This is a big risk, but we still want people to be able to upload safely.
A simple way to enable that is to create an To achieve this, the simple magic of *nix user and group access is enough: mike:x:1001:1001:Mike SMITH:/home/mike:/bin/nologin john:x:1002:1002:John DOE:/home/john:/bin/sh Sunday 28 November 2004, at 23:10 GMT+8
by -
Added line 23:
Sunday 28 November 2004, at 23:08 GMT+8
by -
Changed line 21 from:
to:
Changed lines 24-25 from:
The main configuration file is vstpd.conf located usually under to:
The main configuration file is Added lines 27-57:
Open # --------------- Main Options # Allow local users to log in local_enable=YES # Allow anonymous FTP anonymous_enable=YES # Allow anonymous upload and make them owned by the unpriviledged ftp user anon_upload_enable=YES chown_uploads=YES chown_username=ftp # --------------- Security Options # Ensure that local users cannot wander into the filesystem chroot_local_user=YES # Limit the number of clients to avoid resource attacks max_clients=20 # Don't shown the real and group ID, just show as ftp hide_ids=YES # Make sure uploaded files are not executable file_open_mode=0666 local_umask=0117 # --------------- Misc Options # Banner displayed when client connects ftpd_banner=Welcome to my very own FTP service. # Enable logging of uploads/downloads xferlog_enable=YES # PORT Transfer connections connect_from_port_20=YES # Allow recursing by clients ls_recurse_enable=YES Changed line 63 from:
chkconfig sends a SIGHUP signal to the xinetd process to force it to re-evaluate its services, so there is no need to do anything else for it to work straight away. to:
chkconfig sends a SIGHUP signal to the Changed line 80 from:
to:
Sunday 28 November 2004, at 21:28 GMT+8
by -
Changed line 9 from:
A good candidate for FTP service is vsftpd, the Very Secure FTP deamon. It has a number of security-oriented features and is actively maintained. to:
A good candidate for FTP service is Changed line 12 from:
On most systems, installing vsftpd is as simple as: to:
On most systems, installing Changed line 17 from:
If you are on a Redhat or Fedora system and not using yum or apt, you should: managing rpms by hand can be tedious if there are many dependencies. yum and apt identify those and do the right thing for you, adding and removing packages as necessary. to:
If you are on a Redhat or Fedora system and not using Changed line 21 from:
vsftpd is managed through the inetd or, more securely, through the xinetd super-server: this means that vsftpd will only be running when you need it rather than eat resources while iddle. It also means you can use xinetd and tcp_wrapper (/etc/host.allow and deny files) security features to limit access based on domain names, IP addresses or time slots. to:
Changed line 24 from:
The main configuration file is vstpd.conf located usually under /etc/ or /etc/vsftp/ and the man page for it contains a detailed description of every parameter. to:
The main configuration file is vstpd.conf located usually under Changed lines 26-27 from:
Now that the ftp service is configured, just enable it to run through reboots and force xinetd to re-read its configuration to avoid rebooting now: to:
Now that the ftp service is configured, just enable it to run through reboots: Changed line 31 from:
chkconfig sends a SIGHUP signal to the xinetd process to force it to re-evaluate its services, so there is no need to do anything else. to:
chkconfig sends a SIGHUP signal to the xinetd process to force it to re-evaluate its services, so there is no need to do anything else for it to work straight away. Sunday 28 November 2004, at 20:42 GMT+8
by -
Changed line 17 from:
If you are on a Redhat or Fedora system and not using http:// yum or apt, you should. to:
If you are on a Redhat or Fedora system and not using yum or apt, you should: managing rpms by hand can be tedious if there are many dependencies. yum and apt identify those and do the right thing for you, adding and removing packages as necessary. Added line 19:
You can of course choose to install everything by hand and compile from source. Check out the links below for more detail information about manual installation. Changed lines 21-27 from:
Below is what I did to make Nagios work for me. There are more comprehensive notes on the main site. I suggest you follow the following pages in sequence:
Nagios has a reputation of being fairly convoluted to install and configure. It is true that power and flexibility are often poor friends of ease of installation. Having said that, installing Nagios is fairly straightforward, especially On RedHat and Fedora where it's even pretty easy to install core functionality using pre-packaged RPMs. Configuration is another matter: Nagios is flexible and can adapt to almost any scenario, that's the only way to ensure you get what you want out of it, rather than being force-fed someone else's view of what you should get. to:
vsftpd is managed through the inetd or, more securely, through the xinetd super-server: this means that vsftpd will only be running when you need it rather than eat resources while iddle. It also means you can use xinetd and tcp_wrapper (/etc/host.allow and deny files) security features to limit access based on domain names, IP addresses or time slots. Changed lines 23-24 from:
I use the [Linux/PackageManagement Dag apt]] software repository. It contains a lot of extra packages that are not available elsewhere, including all the Nagios goodies. to:
ConfigurationThe main configuration file is vstpd.conf located usually under /etc/ or /etc/vsftp/ and the man page for it contains a detailed description of every parameter. Changed lines 26-47 from:
Note: Make sure that Apache can run on your server. You will need it to access the web interface. to:
Now that the ftp service is configured, just enable it to run through reboots and force xinetd to re-read its configuration to avoid rebooting now: # chkconfig vsftpd on chkconfig sends a SIGHUP signal to the xinetd process to force it to re-evaluate its services, so there is no need to do anything else. Check the output of the message log to ensure everything went fine: # tail /var/log/messages Nov 28 20:34:52 testserver xinetd[12931]: Starting reconfiguration Nov 28 20:34:52 testserver xinetd[12931]: readjusting service imap Nov 28 20:34:52 testserver xinetd[12931]: readjusting service pop3 Nov 28 20:34:52 testserver xinetd: xinetd -HUP succeeded Nov 28 20:34:53 testserver xinetd[12931]: Reconfigured: new=1 old=2 dropped=0 (services) Links
Deleted line 48:
To see what packages are available: Sunday 28 November 2004, at 19:39 GMT+8
by -
Changed lines 1-32 from:
Describe FTPserver here. to:
It is generally recommended that you disable FTP on your server if you don't really need it. The main reason for that is that FTP has a history of security issues and most common implementations are easy to exploit. FTP is nevertheless a convenient way to share files and allowing others to store files on your server can be very usefull. However, there are some considerations to be taken to make things a bot more secure:
A good candidate for FTP service is vsftpd, the Very Secure FTP deamon. It has a number of security-oriented features and is actively maintained. InstallationOn most systems, installing vsftpd is as simple as: # apt-get update # apt-get install vsftpd If you are on a Redhat or Fedora system and not using http:// yum or apt, you should. Below is what I did to make Nagios work for me. There are more comprehensive notes on the main site. I suggest you follow the following pages in sequence:
Nagios has a reputation of being fairly convoluted to install and configure. It is true that power and flexibility are often poor friends of ease of installation. Having said that, installing Nagios is fairly straightforward, especially On RedHat and Fedora where it's even pretty easy to install core functionality using pre-packaged RPMs. Configuration is another matter: Nagios is flexible and can adapt to almost any scenario, that's the only way to ensure you get what you want out of it, rather than being force-fed someone else's view of what you should get. I use the [Linux/PackageManagement Dag apt]] software repository. It contains a lot of extra packages that are not available elsewhere, including all the Nagios goodies. Note: Make sure that Apache can run on your server. You will need it to access the web interface. To see what packages are available: |