Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centos 7.6 提示如下问题 #106

Open
finallycc opened this issue Dec 15, 2022 · 5 comments
Open

Centos 7.6 提示如下问题 #106

finallycc opened this issue Dec 15, 2022 · 5 comments

Comments

@finallycc
Copy link

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

@Lozy
Copy link
Owner

Lozy commented Dec 15, 2022

》 service sockd adduser NAME PASSWORD

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

@finallycc
Copy link
Author

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

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

@Lozy
Copy link
Owner

Lozy commented Dec 16, 2022

如果你不想设置密码

  • 修改配置文件 /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
}

来限制

@finallycc
Copy link
Author

感谢您的回答,但是我在默认配置文件增加了一行 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
}

@Lozy
Copy link
Owner

Lozy commented Dec 18, 2022

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 可能会被扫描到 然后被滥用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants