Solved Publishing Exchange Server and port 25 forwarder


#1

Hi
I am new in Haproxy world I configured 2 mail servers exchange 2016 as bellow is the configuration what I proceeded in /etc/haproxy/haproxy.cfg every thing is fine I browsed using the the IP of haproxy and forwarded me successfully to the exact mail servers in LAN the haproxy located in DMZ .
haproxy ip is 192.168.200.16
Exchange servers IP ( 192.168.1.10,192.168.1.11).
I have machine located in DMZ its IP is 192.168.200.15 windows os
When I telnet from this machine (windows above) telnet 192.168.200.16 443 its working but when
I telnet to 192.168.200.16 25 there is an error bellow
(Cloud not open connection to the host on port 25 : connection failed )
here my configurations I hope some one help:

global

  # for logging section

log         127.0.0.1 local2 info
chroot      /var/lib/haproxy
pidfile     /var/run/haproxy.pid

  # max per-process number of connections

maxconn     1000
  # set 2048 bits for Diffie-Hellman key

tune.ssl.default-dh-param 2048



  # process' user and group

user        haproxy
group       haproxy

  # makes the process fork into background

daemon

defaults

  # running mode

mode               http

  # use global settings

log                global
 # get HTTP request log

option             httplog

  # timeout if backends do not reply

timeout connect    10s

  # timeout on client side

timeout client     300s

  # timeout on server side

timeout server     300s

define frontend ( set any name for “http-in” section )

##frontend http-in

  # listen 80

bind *:8080

frontend Haproxy_Frontend
bind *:8080
# 4/9/2018
bind *:443 ssl crt /etc/pki/tls/certs/haproxy.pem
# bind *:25

mode http

maxconn 10000

enable statistics reports

stats enable

  # auth info for statistics site

stats auth admin:Pa$$w0rd

  # hide version of HAProxy

stats hide-version

  # display HAProxy hostname

stats show-node

  # refresh time

stats refresh 10s

  # statistics reports' URI

stats uri /monitor


  # set default backend

default_backend    Backend_Servers

  # send X-Forwarded-For header

option             forwardfor

define backend

  # define backend

backend Backend_Servers

  # balance with roundrobin

mode tcp

 balance            roundrobin

  # define backend servers




server             Exchange1      192.168.1.10:443  check ssl verify none
server             Exchange2      192.168.1.11:443  check ssl verify none


#2

You did not configure haproxy for port 25.


#3

Thank you for your reply will you please guide me for what I missed


#4

I just told you what you missed. I don’t know what you need to do with that port 25, presumably it will have to point to a backend server?


#5

Thank you I could finally solved my problem the issue was in my firewall I just forward port 25 by firewall-cmd command and its working
Thank you