Chinaunix首页 | 论坛 | 博客
  • 博客访问: 608712
  • 博文数量: 74
  • 博客积分: 1845
  • 博客等级: 上尉
  • 技术积分: 731
  • 用 户 组: 普通用户
  • 注册时间: 2005-03-14 20:49
文章分类

全部博文(74)

文章存档

2017年(3)

2016年(7)

2015年(4)

2014年(6)

2013年(7)

2012年(10)

2011年(10)

2010年(4)

2009年(5)

2008年(4)

2007年(7)

2006年(6)

2005年(1)

分类: LINUX

2012-08-07 14:06:41

原文地址  http://blog.chinaunix.net/space.php?uid=405749&do=blog&id=27514

少许改动

实现的功能:
1.对于UDP代理 (比如QQ),不做任何限制.
2.对于TCP代理 (比如 ftp ,联众),需要身份验证才能通过.
 
官方:
wget   (现在这个ftp的dante的版本已经是1.3.2了)
tar -zxvf dante-1.1.19.tar.gz
cd dante-1.1.19
./configure
make ;make install
 
配置文件:
进入源码目录的example,将sockd-basic.conf 复制到/etc/sockd.conf
cp sockd-basic.conf /etc/sockd.conf
cat  /etc/sockd.conf
## general configuration (taken from FAQ; <>)
#使用端口1080
internal: eth0 port = 1080   
#使用对外网络接口 
external: eth0  
#使用的验证方式
method: username none            (还未测试 要在后面加用户名还是不加,不加的话应该是试用系统用户)
##user.privileged: root
#user.notprivileged: sockd
#日志目录
logoutput: /var/log/sockd.log       (touch一个sockd.log)
## client access rules
#client pass {
#        from: 10.1.1.0/24 to: 0.0.0.0/0 #internal network
#        log: connect disconnect
#}
#允许所有的客户端连接
client pass {
        from: 0.0.0.0/0 to:0.0.0.0/0
        log: connect disconnect
}

## server operation access rules
#allow bind to ports greater than 1023
#pass {
#        from: 0.0.0.0/0 to: 0.0.0.0/0 port gt 1023
#        command: bind
#        log: connect disconnect
#}
#allow outgoing connections (tcp and udp)
pass {
        from: 0.0.0.0/0 to: 0.0.0.0/0
        command: connect udpassociate
        log: connect disconnect
}
 
#允许所有UDP代理 和 DNS解析.
#allow replies to bind, and incoming udp packets
pass {
       from: 0.0.0.0/0 to: 0.0.0.0/0
       command: bindreply udpreply
       log: connect error
}
#log the rest
#block {
#       from: 0.0.0.0/0 to: 0.0.0.0/0
#       log: connect error
配置完成,,可以可以试一下了
/usr/local/sbin/sockd -D
现在可以无密码运行,但也可以加上
#使用的验证方式
method: username
这样就要用户名和密码了!!!~~~
 
就可以运行了,,日志可以看
cat /var/log/sockd.log
info: dante/server[1] v1.3.2 running 说明已经在运行了
再netstat -nat |grep 1080 看看有没有
阅读(12484) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~