User Tools

Site Tools


perfer:guifi:servidor_socks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
perfer:guifi:servidor_socks [2011/09/06 08:40] – creado 213.229.132.19perfer:guifi:servidor_socks [2015/04/13 20:19] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Servidor SOCKS dante ====== +**Servidor SOCKS dante** 
-===== Instalación =====+====== Instalación ======
 # apt-get install dante-server # apt-get install dante-server
 +
 +====== Autenticación ======
 +
 +===== Configuración en squid =====
 +Fichero /etc/squid/squid.conf
 +  auth_param basic children 5
 +  auth_param basic realm Porta Escorxador de Mataro Sensefils
 +  auth_param basic credentialsttl 2 hour
 +  auth_param basic program /usr/lib/squid/ncsa_auth /usr/etc/passwd
 +
 +La autenticación de squid funciona:
 +Se lanza:
 +  # /usr/lib/squid/ncsa_auth /usr/etc/passwd
 +Y se pone usuario espacio contraseña
 +  aavv.escorxador pasqual
 +  OK
 +
 +  Si falla devuelve error:
 +  jose.legido aaa
 +  ERR Wrong password
 +  jose.legid hola
 +  ERR No such user
 +
 +===== Configuración en Dante =====
 +Fichero de configuración:
 +  /etc/danted.conf
 +====== Módulo PAM ======
 +
 +apt-get install libpam-ldapd libpam0g-dev
 +
 +http://www.ahosny.com/?p=28 \\
 +http://ace-host.stuart.id.au/russell/files/pam_python/ \\
 +
 +
 +===== Crear Módulo =====
 +Crear fichero  pam-structures.h
 +
 +<code>
 +#ifndef _PAM_USERPASS_H
 +#define _PAM_USERPASS_H
 +
 +#include <security/pam_appl.h>
 +typedef struct {
 +const char *user;
 +const char *pass;
 +} pam_userpass_t;
 +
 +extern int pam_userpass_conv(int num_msg, const struct pam_message **msg,
 +struct pam_response **resp, void *appdata_ptr);
 +
 +#endif
 +</code>
 +
 +
 +**pam_userpass_t** es la estructura de como guardamos los usuarios y las contraseñas
 +
 +
 +
 +
 +
perfer/guifi/servidor_socks.1315298445.txt.gz · Last modified: 2015/04/13 20:19 (external edit)