我需要在我的定制 Linux(基于 Debian)中配置 sslh 以进行端口倍增。我可以在没有透明代理模式的情况下进行端口倍增。但透明代理模式不起作用。我已按照 sslh 网站中提到的所有步骤进行配置(https://github.com/yrutschle/sslh#transparent-proxy-support)但事情仍然没有进展。
以下是 sslh.conf 文件的内容
~ # cat etc/sslh.cfg
verbose: true;
foreground: true;
inetd: false;
numeric: false;
transparent: true; ####### CHANGE THIS MODE
#transparent: false; ####### CHANGE THIS MODE
timeout: 2;
user: "_nobody"; # #### CHANGE THE USER
#user: "root"; # #### CHANGE THE USER
pidfile: "/var/run/sslh.pid";
# Change hostname with your external address name.
listen:
(
{ host: "10.50.157.194"; port: "443"; }
);
protocols:
(
{ name: "http"; host: "10.50.157.194"; port: "445"; },
{ name: "regex"; host: "10.50.157.194"; port: "3478"; regex_patterns: [ "\x21\x12\xa4\x42" ]; }
);
~ #
sslh程序执行的控制台显示以下内容
~ # /sbin/sslh -F/tandberg/etc/sslh.cfg -v
http addr: X194:microsoft-ds. libwrap service: (null) log_level: 1 family 2 2 []
regex addr: X194:nat-stun-port. libwrap service: (null) log_level: 1 family 2 2 []
listening on:
X194:https []
timeout: 2
on-timeout: http
listening to 1 addresses
turning into _nobody
sslh-fork tempo-boot-20-6-g271a27e-dirty started
capabilities: = cap_net_admin+ep
accepted fd 4
**** writing deferred on fd -1
probing for http
probing for regex
all probes failed, connecting to first protocol: http
connecting to X194:microsoft-ds family 2 len 16
accepted fd 4
**** writing deferred on fd -1
probing for http
probing for regex
all probes failed, connecting to first protocol: http
connecting to X194:microsoft-ds family 2 len 16
accepted fd 4
**** writing deferred on fd -1
probing for http
probing for regex
all probes failed, connecting to first protocol: http
connecting to X194:microsoft-ds family 2 len 16
forward to http failed:connect: Connection timed out
forward to http failed:connect: Connection timed out
connect: Connection timed out
connect: Connection timed out
forward to http failed:connect: Connection timed out
connect: Connection timed out
以下是我在 shell 中运行的 iptable 命令
~ # iptables -t mangle -N SSLH
iptables: Chain already exists.
~ # iptables -t mangle -A OUTPUT --protocol tcp --out-interface eth0 --sport 445 --jump SSLH
~ # iptables -t mangle -A SSLH --jump MARK --set-mark 0x1
~ # iptables -t mangle -A SSLH --jump ACCEPT
~ # ip rule add fwmark 0x1 lookup 100
RTNETLINK answers: Address family not supported by protocol
~ # ip route add local 0.0.0.0/0 dev lo table 100
RTNETLINK answers: File exists
如能得到任何帮助或指点我将非常感激。
谢谢〜S