无法在 cent os 上连接 socks 代理服务器

无法在 cent os 上连接 socks 代理服务器

我在 cent os (VPS) 上安装了 ss5 或 3proxy。我使用在线端口检查器检查端口 1080,发现端口 1080 已打开,但当我尝试连接到代理服务器时,却无法连接。firewalld 已被删除。服务器内存 512MB。CPU 1 核 1400 MHZ

答案1

首先禁用 selinux

sudo setenforce 0

但是,此更改仅对当前运行时会话有效。

永久禁用

vi /etc/selinux/config

并进行更改SELINUX=disabled,使其永久生效。保存文件并使用 sudo 重启 CentOS 系统。shutdown -r now 重启后,验证 selinux 状态,sestatus您的状态应为SELinux status: disabled

其次确保您的 3proxy.cfg - 配置应该看起来像这样:

 # use global nameserver using google DNS here
nserver 8.8.8.8
nserver 8.8.8.4

# options
daemon
nscache 65536
timeouts 1 5 10 30 180 1800 15 60

# authentication mode, you can auth with username and password or from an IP address, see below
auth iponly strong

# users list - here if you want to login with username and password
users “username:CL:password”

# ip allow list —— if you want to login from an IP address
allow * 82.224.29.140 * *

# Must be the same with the username you have in the userlist
allow username * * *

# Number of maximum connections 100 is more then enough
maxconn 100

# proxy - here you create the socks -p is the port -i the local IP address(the ip you should connect to) and -e is the exit IP address, in case you have more then 1 IP on the server 
socks -a -p51365 -i172.22.33.11 -e172.22.33.11

# another example with another exit IP address if you have more then 1 ip addresses on the vps
socks -a -p51365 -i172.22.33.11 -e172.33.44.44

# feel free to remove the lines with # since they are just comments so you can understand what you are doing and if you have only 1 IP address remove the last example also

相关内容