Site icon moneyslow.com

利用Dante架设linux的socks5代理服务器

dante-server 是一个国外开源的socks5代理服务器软件,官网地址http://www.inet.no/dante/安装:apt-get install dante-server完成后主...


dante-server
是一个国外开源的socks5代理服务器软件,官网地址 http://www.inet.no/dante/

安装:apt-get install dante-server
完成后主要编辑/etc/danted.conf 这个文件:

# the server will log both via syslog, to stdout and to /var/log/lotsoflogs

#logoutput: syslog stdout /var/log/lotsoflogs

logoutput: syslog

 

# The server will bind to the address 10.1.1.1, port 1080 and will only

# accept connections going to that address.

internal: eth0 port = 2727

 

 

# outgoing connection

external: eth0

 

# methods for socks-rules.

method: username none #rfc931

 

 

user.privileged: proxy

 

user.notprivileged: nobody

 

user.libwrap: nobody

 

# client IP addresses that allowed to use this service

client pass {

from: 114.79.0.0/16 port 1-65535 to: 0.0.0.0/0

}

 

client pass {

from: 127.0.0.0/8 port 1-65535 to: 0.0.0.0/0

}

 

 

# block everyone else

client block {

    from: 0.0.0.0/0 to: 0.0.0.0/0

    log: connect error

}

 

 

block {

    from: 0.0.0.0/0 to: 127.0.0.0/8

    log: connect error

}

 

#allow client to connect to all ip addres/site via this proxy

pass {

from: 114.79.0.0/16 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

}

 

里面的注释写的非常清楚。

启动:service danted start

Exit mobile version