Article Title: DebianLinux Socks5 server Installation Method. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
[1] Download
Http://www.haikuo.googlepages.com/socks5-v1.0r11.patched.tgz
[2] compiling
$./Configure -- with-threads -- with-srvconffile =/etc/socks5/config -- with-srvpwdfile =/etc/socks5/passwd
$ Make
[3] Installation
$ Sudo make server. install
[4] Configuration
$ Vim/etc/socks5/config
### A socks5 Config file to use between 2 servers, using a VPN
#
# Auth source-host source-port auth-methods
# Permit auth cmd src-host dest-host src-port dest-port [user-list]
# Deny auth cmd src-host dest-host src-port dest-port [user-list]
# Proxy lines are of the form:
# Proxy-type dest-host dest-port proxy-list
# Socks4 dest-host dest-port proxy-list
# Socks5 dest-host dest-port proxy-list
# Noproxy dest-host dest-port proxy-list
# Set SOCKS5_BINDINFC 9301
# SOCKS4
Set SOCKS5_V4SUPPORT
#
Set SOCKS5_MAXCHILD 30
#
Set SOCKS5_TIMEOUT 15
Set SOCKS5_NOIDENT
Set SOCKS5_DEMAND_IDENT
#
# Set SOCKS5_PWDFILE/etc/socks5.pwd
# User authentication method
Auth-u
# Allow users of all IP addresses
Permit u ------
# If an IP address segment (192.168.0.0/255.255.255.0) is restricted
# Permit--192.168.0 .---
# If you restrict access from an IP address (192.168.0.10)
# Permit--192.168.0.10 ---
Deny ------
# Cascading
# Socks4--202.110.217.75: 1080
# Socks5--61.167.58.77: 1080
Then the password file
$ Vim/etc/socks5/passwd
# UserA passwd
UserA passA
[5] Starting a service
Make sure that your/etc/services file contains socks descriptions. Otherwise, manually add
$ Vim/etc/services
Socks 1080/tcp # socks proxy server
Socks 1080/udp
The Service adopts the inetd method.
Add/etc/inetd. conf
$ Vim/etc/inetd. conf
# Socks5 server
Socks5 stream tcp nowait root/usr/local/bin/socks5 socks5-I
Restart inetd
$ Sudo/etc/init. d/inetd restart
Now, a socks5 service is started.