- 论坛徽章:
- 0
|
1,搭建环境
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)+socks5-1.0r11-3.i386.rpm
2,安装
rpm -ivh socks5-1.0r11-3.i386.rpm
3,配置
touch /etc/socks5.conf
# A Socks5 Config file for a normal, single homed server
auth - - u
set SOCKS5_V4SUPPORT
#
permit u - - - - - zhq
touch /etc/socks5.passwd
zhq zhq
4,其他
vi /etc/init.d/socks5
#!/bin/sh
#
# chkconfig: 345 86 24
# description: This script takes care of starting and stopping socks5.
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -f /usr/sbin/socks5 ] || exit 0
# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting socks5: "
/usr/sbin/socks5 -t -s 2> /var/log/socks5(修改后)
touch /var/lock/subsys/socks5
echo "Good Job,Boy~"
;;
stop)
# Stop daemons.
echo -n "Shutting down socks5: "
stopsocks -KILL(修改后)
echo "done"
rm -f /var/lock/subsys/socks5
;;
restart|reload)
$0 stop
$0 start
;;
status)
status socks5
"/etc/init.d/socks5" 46L, 899C
加入自启动:vi /etc/rc.local
添加:/etc/init.d/socks5 start |
|