elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Sigue las noticias más importantes de seguridad informática en el Twitter! de elhacker.NET


  Mostrar Temas
Páginas: [1]
1  Sistemas Operativos / GNU/Linux / Duda con Proftpd en Debian 6 en: 16 Febrero 2015, 18:16 pm
Buenas chicos, sigo haciendo el proyecto, esta vez con proftpd, parece que todo funciona "aparentemente" pero me gustaría enseñaros las líneas de código y me dierais vuestra opinión o al menos saber que cambios haríais vosotros, esto es lo que se plantea:

Se deberá instalar y configurar un servidor PROFTPD con los siguientes parámetros:

Host:  authenticated.seas-linux.es   

Configuración:

Directorio raíz: /var/ftp-<usuario>/
Accesible para el usuario guest-seas con la contraseña del sistema para el usuario del alumno.
Permisos:
   - MKD, STOR, RETR.
Solo accesible desde la subred del alumno.

Código:
#

# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.

# To really apply changes reload proftpd after modifications.

#



# Includes DSO modules

Include /etc/proftpd/modules.conf



# Set off to disable IPv6 support which is annoying on IPv4 only boxes.

UseIPv6 off

# If set on you can experience a longer connection delay in many cases.

IdentLookups off



ServerName "authenticated.seas-linux.es"

ServerType standalone

DeferWelcome on



MultilineRFC2228 on

DefaultServer on

ShowSymlinks off



TimeoutNoTransfer 600

TimeoutStalled 600

TimeoutIdle 1200



DisplayLogin                    welcome.msg

DisplayChdir               .message true

ListOptions                 "-l"



DenyFilter \*.*/



# Use this to jail all users in their homes

DefaultRoot "/var/ftp-alumno/" guest-seas



# Users require a valid shell listed in /etc/shells to login.

# Use this directive to release that constrain.

# RequireValidShell off



# Port 21 is the standard FTP port.

Port 21



# In some cases you have to specify passive ports range to by-pass

# firewall limitations. Ephemeral ports can be used for that, but

# feel free to use a more narrow range.

# PassivePorts                  49152 65534



# If your host was NATted, this option is useful in order to

# allow passive tranfers to work. You have to use your public

# address and opening the passive ports used on your firewall as well.

# MasqueradeAddress 1.2.3.4



# This is useful for masquerading address with dynamic IPs:

# refresh any configured MasqueradeAddress directives every 8 hours

<IfModule mod_dynmasq.c>

# DynMasqRefresh 28800

</IfModule>



# To prevent DoS attacks, set the maximum number of child processes

# to 30.  If you need to allow more than 30 concurrent connections

# at once, simply increase this value.  Note that this ONLY works

# in standalone mode, in inetd mode you should use an inetd server

# that allows you to limit maximum number of processes per service

# (such as xinetd)

MaxInstances 30



# Set the user and group that the server normally runs at.

User proftpd

Group nogroup



# Umask 022 is a good standard umask to prevent new files and dirs

# (second parm) from being group and world writable.

Umask 022  022

# Normally, we want files to be overwriteable.

AllowOverwrite on



# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:

# PersistentPasswd off



# This is required to use both PAM-based authentication and local passwords

# AuthOrder mod_auth_pam.c* mod_auth_unix.c



# Be warned: use of this directive impacts CPU average load!

# Uncomment this if you like to see progress and transfer rate with ftpwho

# in downloads. That is not needed for uploads rates.

#

# UseSendFile off



TransferLog /var/log/proftpd/xferlog

SystemLog   /var/log/proftpd/proftpd.log



<IfModule mod_quotatab.c>

QuotaEngine off

</IfModule>



<IfModule mod_ratio.c>

Ratios off

</IfModule>





# Delay engine reduces impact of the so-called Timing Attack described in

# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02

# It is on by default.

<IfModule mod_delay.c>

DelayEngine on

</IfModule>



<IfModule mod_ctrls.c>

ControlsEngine        off

ControlsMaxClients    2

ControlsLog           /var/log/proftpd/controls.log

ControlsInterval      5

ControlsSocket        /var/run/proftpd/proftpd.sock

</IfModule>



<IfModule mod_ctrls_admin.c>

AdminControlsEngine off

</IfModule>



#

# Alternative authentication frameworks

#

#Include /etc/proftpd/ldap.conf

#Include /etc/proftpd/sql.conf



#

# This is used for FTPS connections

#

#Include /etc/proftpd/tls.conf



#

# Useful to keep VirtualHost/VirtualRoot directives separated

#

#Include /etc/proftpd/virtuals.con



# A basic anonymous configuration, no upload directories.



# <Anonymous ~ftp>

#   User ftp

#   Group nogroup

#   # We want clients to be able to login with "anonymous" as well as "ftp"

#   UserAlias anonymous ftp

#   # Cosmetic changes, all files belongs to ftp user

#   DirFakeUser on ftp

#   DirFakeGroup on ftp

#

#   RequireValidShell off

#

#   # Limit the maximum number of anonymous logins

#   MaxClients 10

#

#   # We want 'welcome.msg' displayed at login, and '.message' displayed

#   # in each newly chdired directory.

#   DisplayLogin welcome.msg

#   DisplayChdir .message

#

#   # Limit WRITE everywhere in the anonymous chroot

#   <Directory *>

#     <Limit WRITE>

#       DenyAll

#     </Limit>

#   </Directory>

#

#   # Uncomment this if you're brave.

#   # <Directory incoming>

#   #   # Umask 022 is a good standard umask to prevent new files and dirs

#   #   # (second parm) from being group and world writable.

#   #   Umask 022  022

#   #            <Limit READ WRITE>

#   #            DenyAll

#   #            </Limit>

#   #            <Limit STOR>

#   #            AllowAll

#   #            </Limit>

#   # </Directory>

#

# </Anonymous>



<Limit LOGIN>

Order Allow,Deny

Allow from 10.0.2.15/24

Deny from all

</Limit>



<Limit LOGIN>

Order Allow,Deny

AllowUser guest-seas

DenyAll

</Limit>



<Directory "/var/ftp-alumno/">

<Limit MKD STOR RETR>

AllowUser guest-seas #¿Se podria cambiar por AllowAll?

</Limit>

</Directory>

1. No sé exactamente si tengo que crear de alguna manera especial ese host authenticated.seas-linux.es, yo de todas formas he agregado las líneas dentro de las zonas directa e inversa.

2. Podría crear expresamente ese host virtual basado en nombre dentro del proftpd verdad? Se modificaría dentro del mismo proftpd.conf?

3. Las últimas líneas son las que en principio se piden, estarían correctas?

Muchas gracias por vuestro tiempo.

Un saludo para todos.
2  Sistemas Operativos / GNU/Linux / Dudas con Apache2 y Debian 6.0 en: 3 Febrero 2015, 18:40 pm
Buenas tardes, soy nuevo en este foro y en el mundo de linux en el que me estoy metiendo poco a poco jeje. Me gustaría pedir vuestra ayuda si fuera posible ya que tengo que hacer un proyecto con Apache2 y la verdad no sé por donde meterle mano. Os planteo el caso y ya me decís si podéis echarme un cable, vale? Algunos puntos los tengo "mas o menos" claros pero agradecería toda la ayuda que fuese posible.

** Se configurarán dos host virtuales con los dominios public.seas-linux.es y restricted.seas-linux.es escuchando en el puerto 80.

Host1: public.seas-linux.es   

Configuración:
Directorio raíz: /var/www/public/
Listado de contenidos permitido.
Accesible para cualquier máquina.

Directorio: /var/www/public/tmp/
Listado de contenidos permitido.
Accesible sólo desde la subred del alumno.
Escuchará también en el puerto 443.

Host2: restricted.seas-linux.es

Configuración:
Directorio raíz: /home/<usuario>/
Listado de contenidos permitido.
Accesible solo para los usuarios:
User: admin.
Password: admin.
User: <usuario>.
Password: 1234.
Esta configuración deberá llevarse a cabo sin utilizar el archivo .htaccess.

Gracias por vuestro tiempo.

Un saludo para todos.
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines