Tabla de Contenidos

Dante: configuración de un servidor proxy SOCKS 4/5

Introducción

When working on a private LAN with no direct internet access available, squid is normally used a proxy server for internet and ftp traffic. SSH or scp (or other traffic) however, will require a SOCKS server in order to reach the internet.

Dante socks server provides just that.

Instalación

En Debian Lenny dante-server no está disponible. Se debe bajar el paquete de los repositorios de Etch o Squeeze

aptitude install dante-server

o bien, si se lo ha bajado manualmente, con dpkg:

dpkg -i dante-server_1.1.19.dfsg-3_i386.deb

Configuración

Por defecto, la mayoría de las líneas requeridas están comentadas. Las siguientes líneas deben ser insertadas, modificadas o descomentadas en danted.conf:

#logoutput: stderr
logoutput: syslog
#the above line will send any logs to /var/log/syslog instead to a terminal

internal: eth0 port = 1080
internal: 127.0.0.1 port = 1080

external: eth0

method: username none
#the above puts no username or password. Access will instead be controlled via client ip address/range.
#if there is no username or password - then danted socks server needs to run as nobody, i.e.

#method: pam
# if you choose to use pam instead - a valid username&password as required for sshing to the socks server is required.
#Note: not sure if proxy login details are sent in clear text.

#user.privileged: proxy
user.notprivileged: nobody

client pass {
        from: 136.201.251.21/0 port 1-65535 to: 0.0.0.0/0
        # 136.201.251.21/0 = specific ip address.
} 

client pass {
        from: 127.0.0.0/8 port 1-65535 to: 0.0.0.0/0
}

client block {
        from: 0.0.0.0/0 to: 0.0.0.0/0
        log: connect error
}

#Finally block other traffic
block {
  from: 0.0.0.0/0 to: 127.0.0.0/8
  log: connect error
}

pass {
  from: 136.201.251.21/0 to: 0.0.0.0/0
  protocol: tcp udp
}

pass {
  from: 127.0.0.0/8 to: 0.0.0.0/0
  protocol: tcp udp
}

block {
  from: 0.0.0.0/0 to: 0.0.0.0/0
  log: connect error
}

Bibliografía