title: How to configure haproxy port range to range one by one?
body: <p>I want to use haproxy to deploy one ftp proxy server. Here's scene:</p>
  
  <p>ftp client &lt;---> ftp-proxy-server(ip:10.0.1.1) &lt;---> ftp-server(ip:172.126.1.1)</p>
  
  <p>ftp server listen on port 21 for control command, data port range [20100-20199]</p>
  
  <p>I had haproxy config on ftp-proxy-server:</p>
  
  <pre><code>listen ftp-proxy-server 10.0.1.1:21
      mode tcp
      server ftp-server 172.126.1.1:21
  
  listen ftp-proxy-server 10.0.1.1:20100-20199
      mode tcp
      server ftp-server 172.126.1.1:20100-20199
  </code></pre>
  
  <p>Here's the question, I can successfully login ftp service from ftp-client, but failed to execute ls command which output "connection refused" message. I guess the reason is port mapping from ftp-proxy-server to ftp-server is random. So when ftp-client get a reserved port（e.g. 20101), but ftp-proxy-server may map it to another port(e.g. 20109)， which is not the port ftp-server assigned to ftp-client. </p>
  
  <p>I am think of one solution that configured 100 listens, one listen to one port, but it's complex to write the configure file. Is'there a simply configuration option to map port one by one? Just like 10.0.1.1:20001 -> 172.126.1.1:20001, 10.0.1.1:20002 -> 172.126.1.1:20002.</p>
  
  <p>Welcome any answer:)</p>