[sslh] sslh with iptables load balancing

salil GK gksalil at gmail.com
Thu Mar 15 23:42:34 UTC 2018


Hi

    I am trying to do port demultiplexing with sslh for turn and web
access. Things are working perfect. But I have to implement load balancing
using iptables in turn ports - which means when sslh redirect the packet to
turn it need to be load balanced between some 6 ports. I have applied the
rules for the same. But it doesn't work. If I have only load balancing
iptables rules, it works perfect. If I have sslh iptables rules, sslh works
but load balancing doesn't work. What could be the issue ?

my load balancing rules

-A TURN_TCP -p tcp -i eth0 --dport 3478 -m statistic --mode nth --every 6
--packet 0 -j REDIRECT --to-port 3478

-A TURN_TCP -p tcp -i eth0 --dport 3478 -m statistic --mode nth --every 5
--packet 0 -j REDIRECT --to-port 3479

-A TURN_TCP -p tcp -i eth0 --dport 3478 -m statistic --mode nth --every 4
--packet 0 -j REDIRECT --to-port 3480

-A TURN_TCP -p tcp -i eth0 --dport 3478 -m statistic --mode nth --every 3
--packet 0 -j REDIRECT --to-port 3481

-A TURN_TCP -p tcp -i eth0 --dport 3478 -m statistic --mode nth --every 2
--packet 0 -j REDIRECT --to-port 3482

-A TURN_TCP -p tcp -i eth0 --dport 3478 -j REDIRECT --to-port 3483

my ssh rules

-A OUTPUT -o eth0 -p tcp -m tcp --sport 2020 -j SSLH

-A OUTPUT -o eth0 -p tcp -m tcp --sport 1010 -j SSLH

-A SSLH -j MARK --set-xmark 0x1/0xffffffff

-A SSLH -j ACCEPT

Thanks
~S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rutschle.net/pipermail/sslh/attachments/20180316/6e2b9d87/attachment.html>


More information about the sslh mailing list