Configure sslh com suporte a proxy transparente

1

Eu preciso configurar o sslh no meu Linux customizado (baseado no debian) para multiplicação de porta. Eu poderia fazer a multiplicação de porta sem o modo de proxy transparente. Mas o modo de proxy transparente não está funcionando. Eu segui todos os passos mencionados no site sslh para configurar ( link ). Mas ainda assim as coisas não estão funcionando.

O seguinte é o que o arquivo 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" ]; }
);
~ # 

O console de execução do programa sslh mostra o seguinte

~ # /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

a seguir é o comando iptable que eu executei no shell

~ # 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

Qualquer ajuda ou ponteiros seria muito apreciada.

Obrigado ~ S

    
por user2677279 23.09.2017 / 01:19

0 respostas