Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    HaProxy Multiplexing

    pfSense Packages
    2
    3
    5.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      menetas
      last edited by

      Hi, I wonder is there a way to duplicate tcp traffic from specific port to a remote server using haProxy or any other way..

      Im receiving tcp traffic to port 14000…
      Then I want to duplicate this traffic to local port 14001 and to remote server port 14000..

      I successfully can do that but haproxy will split traffic to two servers using the balance options supported by it... (roundrobin, static-rr, source, etc)..

      So I get more traffic to one of the servers than the other..

      What I really need is to receive a copy of the incoming 14000 port in the remote server in the same port 14000..

      Is there a way to do this??

      Here's my current config (the one that splts in half the traffic)

      global
              maxconn 100000
              user root
              group root
              daemon

      defaults
              mode    tcp
              option  dontlognull
              retries 3
              option redispatch
              contimeout  5000
              clitimeout  50000
              srvtimeout  50000

      listen localhost 0.0.0.0:14000
              mode tcp
              balance static-rr
              maxconn 100000

      server remote 99.99.99.99:14000 check
              server local 127.0.0.1:14001 check

      Any help would be very appreciated..

      Thanks in advance

      1 Reply Last reply Reply Quote 0
      • P
        PiBa
        last edited by

        haproxy is not designed to duplicate/copy traffic to a secondary server. without modifications to the program it will not be possible with that.
        (it has been asked for on the haproxy mailinglist.. but i cant find the thread currently..)

        1 Reply Last reply Reply Quote 0
        • M
          menetas
          last edited by

          I finally solved it using "agnoster duplicator"…
          It does exactly as i wanted..  :D

          https://github.com/agnoster/duplicator

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.