Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4731

Single TCP port forward with haproxy

$
0
0

@orion777 wrote:

Due to network configuration I need to re-create the TCP connection with specific port, say, 5555, like:
source NIC 192.168.10.70 -> NAT server with proxy 192.168.10.1 - haproxy - 213.100.60.20 -> WAN destination server 213.100.70.30

So, haproxy must listen port 5555 on eth0 192.168.10.1 and automatically redirect this TCP flow to 213.100.70.30:5555 over eth1 213.100.60.20.
The remaining traffic should be routed via typical NAT (shorewall) to be able to access the internet (this is optional, but desirable).

To do this I was trying to make such haproxy.cfg
cat /etc/haproxy/haproxy.cfg
global

daemon

maxconn 10

defaults
mode tcp
timeout connect 5000ms
timeout client 10000ms
timeout server 10000ms

frontend tcp-in
bind 192.168.10.0:14550
default_backend servers

backend servers
server server1 213.100.70.30:5555 maxconn 32

The haproxy has been started with such options:

haproxy -f /etc/haproxy/haproxy.cfg -V

The TCP connection nas been made from the source NIC 192.168.10.70 to 192.168.10.1:5555 , but the connection was not espablished wit the destination 213.100.70.30

Since I’m new, I’m asking for help. Thank you.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4731

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>