通过sockd代理解决电信网通互联问题

sockd服务器端(Linux)  安装dante
1 下载源码 http://www.inet.no/dante/
./configure
make
make install
2 安装 编辑 /etc/sockd.conf(需自己创建)
3 sockd �Cf /etc/sockd.conf & 启动

使用代理的客户端(对于Linux) 安装 proxychains
下载源码 (http://proxychains.sourceforge.net/)
./configure
make
make install 安装
vi /etc/proxychains.conf
在[ProxyList]字段加入代理信息 socks5 x.x.x.x 1080
使用方法:
proxychains ssh  ….

写了个简单的停启sockd脚本
#!/bin/bash
stop() {
        ps aux|grep sockd|awk '{print $2}'|xargs kill
}
start() {
        sockd -f /etc/sockd.conf &
}
case $1 in
start)
        start
;;
stop)
        stop
;;
esac

sockd.conf配置示例
参见 http://www.360doc.com/content/06/1106/15/13188_251512.shtml
logoutput: /var/log/sockd/sockd
##等待接收连接
的网卡和端口
internal: eth0 port = 1080
##代理出去所用网卡
external: eth1
method: none username pam
clientmethod: none
user.privileged: root
user.unprivileged: root
timeout.negotiate: 30   # on a lan, this should be enough.
client pass {
        from: 0.0.0.0/0 port 1-65535 to: 0.0.0.0/0
        log: connect disconnect
}


pass {
   from: 0.0.0.0/0 to: 0.0.0.0/0
   command: bindreply udpreply
   log: connect error
}

pass {
    from: 0.0.0.0/0 to: 0.0.0.0/0
    protocol: tcp udp
    log: error
}
client block {
        from: 0.0.0.0/0 to: 0.0.0.0/0
        log: connect error
}

你可能感兴趣的:(代理,职场,sock,休闲,跨电信网通)