0

i have a small linux server on the internet on which i run socat.

socat UDP4-LISTEN:1194,fork UDP6-SENDTO:[****:****:****:****:*** *:****:****:****]:1194 

Which I installed as a service. So far it works well and without any problems. Incidentally, I need all of this because I only have an ipv6 that can be reached from the internet. There is also a service with tcp for port 80. Now I wanted to do it with haproxy. The idea was that I can redirect to other addresses based on the URL or the port. SSL would be nice too but first things first. At first I wanted to redirect the udp port 1194. So I added the following to the cfg:

listen vpn
        bind udp@:1194
        use-server wg_server if { hdr(host) -i abc.com }
        server wg_server ipv6@[####:####:####:####:####:####:####:####]:1194 check port 1194

But with cfg check (haproxy -c -f) I get the following message: 'bind' : dgram-type socket not acceptable in 'udp@:1194'

So without UDP:

listen vpn
        binding :1194
        use-server wg_server if { hdr(host) -i abc.com }
        server wg_server ipv6@[####:####:####:####:####:####:####:####]:1194

The cfg check is now ok but when I start haproxy I get the message: proxy vpn has no server available!

A query via nmap reports that the port can be reached at the address. So something is wrong in the cfg. Anyone have a tip?

Kind regards Orko

Orko
  • 1

1 Answers1

0

Okay. I probably should have checked that first.

haproxy doesn't support UDP. So I will stay with socat and simply redirect them based on the port number.

Dave M
  • 4,514
  • 22
  • 31
  • 30
Orko
  • 1