dante-server 1.1.19 命令詳解 (未集成)
Socks4/Socks5 代理服務器。
另請參閱: danted.conf ifconfig IP 地址查詢 默認TCP/IP端口
01. 安裝 dante-server apt-get install dante-server 02. 添加用戶socks5user 設置口令4 useradd socks5user passwd socks5user 03. 禁止 socks5user 用戶遠程登錄係統 (安全考慮) vi /etc/passwd 將 socks5user 的 shell 改為 /bin/false,如下所示 socks5user:x:1002:1002::/home/socks5user:/bin/false 04. 備份配置文件 cp /etc/danted.conf /home/ftp/danted.conf 更名配置文件 mv /etc/danted.conf /etc/danted.conf.bak 05. 創建日誌目錄 mkdir /var/log/socks_dante 06. 自定義配置 cd /etc rm /etc/danted.conf vi /etc/danted.conf 粘貼自定義配置內容 07. 啓動 Dante /etc/init.d/danted stop /etc/init.d/danted start
08. 檢查啓動情況
netstat -anp | grep 1080
若無輸齣信息
vi /var/log/socks_dante/socks_dante.log
rm /var/log/socks_dante/socks_dante.log
殺除所有 danted 進程
killall danted
09. 阿裏雲 ECS 雲服務器
通過後颱啓用 ECS 安全組入網 1080 端口 (默認禁用)
自定義 danted.conf 配置文件
#
logoutput: /var/log/socks_dante/socks_dante.log
internal: eth0 port = 1080
external: eth0
method: username none
clientmethod: none
user.privileged: root
user.notprivileged: socks5user
user.libwrap: nobody
compatibility: sameport
compatibility: reuseaddr
extension: bind
client pass {
from: 0.0.0.0/0 port 1-65535 to: 0.0.0.0/0
log: connect disconnect error
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
protocol: tcp udp
log: connect error
}
基本語法
danted [-DLNVdfhnv]
選項參數
| 參數 | EN 解釋 | 中文翻譯 | 備注 |
|---|---|---|---|
| -D | run in daemon mode | 在守護模式下運行 | |
| -L | shows the license for this program | 展示此程序的許可 | |
| -N <number> | fork of <number> servers [1] | <number> 服務器的分叉 [1] | |
| -V | verify configuration and exit | 驗證配置並退齣 | |
| -d | enable debugging | 啓用調試 | |
| -f <filename> | use <filename> as configuration file [/etc/danted.conf] | 使用 <filename> 作為配置文件 [/etc/danted.conf] | |
| -h | print this information | 打印此信息 | |
| -n | disable TCP keep-alive | 禁用 TCP 保持存活 | |
| -v | print version info | 打印版本信息 |
| 功能 | 命令 | 文字解釋 | 示例 | 示例解釋 |
|---|---|---|---|---|
| 幫助 | danted -h | 展示幫助信息 | ||
| danted -help | ||||
| danted -v | 展示版本信息 |
版權聲明: 本文為獨傢原創稿件,版權歸 樂數軟件 ,未經許可不得轉載。