Lozy / danted

Fast script for installing & configing Danted--Socks5 Proxy Server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Centos 7.6 提示如下问题

finallycc opened this issue · comments

uname -a
Linux iZj6c3p7aglcx7jvy6l08hZ 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

bash install.sh --version=1.4.2

/var/log/sockd.log

Dec 15 12:13:31 (1671077611.271922) sockd[1166]: info: block(1): tcp/accept ]: 49.72.245.94.38635 172.19.129.216.2016: blocked by higher-level socks-rule #2

》 service sockd adduser NAME PASSWORD

设置账号密码看看?或者修改配置文件中的 socksmethod: pam.username none

你好,安装没有问题的,我换了默认版本1.3.2,设置了用户,密码,使用了Proxifier,代理是没有问题的。

我如果不设置密码,没有sockd.passwd文件时,报错为pam_authenticate(): Authentication service cannot retrieve authentication info。
用的是谷歌浏览器SwitchyOmega代理,此代理不支持认证。

如果你不想设置密码

  • 修改配置文件 /etc/danted/sockd.conf

    • 修改 socksmethod: pam.username nonesocksmethod: pam.usernamesocksmethod: none (有2处)
  • 重启danted service sockd restart

如果无法设置密码,最好设置白名单,通过iptables 或者

pass {
        from:  你的IP网段 to: 0.0.0.0/0
        method: none
}

来限制

感谢您的回答,但是我在默认配置文件增加了一行 socksmethod: none ,程序启动失败sockd: dante v1.3.2。我的默认脚本安装配置里并没有socksmethod: pam.username none 和 socksmethod: pam.username 两行代码,不知道是不是版本问题?

# Generate by sockd.info
# Generate interface x.x.x.x
internal:  x.x.x.x  port = 1080
external:  x.x.x.x

method: pam none
socksmethod: none #此处增加了一行
clientmethod: none
user.privileged: root
user.notprivileged: sockd
logoutput: /var/log/sockd.log

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

1.3.2 的话,需要做以下修改

  1. 去掉增加的 socksmethod: none (这个是1.4.x版本的配置,1.3.x版本无法使用)
  2. method: pam none 修改为 method: none
  3. method: pam 修改为 method: none
  4. 最关键的,请做好防火墙限制,不加密码/白名单限制的socks5 可能会被扫描到 然后被滥用