# Solved Publishing Exchange Server and port 25 forwarder

**URL:** <https://discourse.haproxy.org/t/solved-publishing-exchange-server-and-port-25-forwarder/2950>\
**Category:** Help!\
**Created:** [September 4, 2018, 4:20pm UTC](https://discourse.haproxy.org/t/solved-publishing-exchange-server-and-port-25-forwarder/2950 "2018-09-04T16:20:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![most122](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@most122](https://discourse.haproxy.org/u/most122)\
**Post date:** [September 4, 2018, 4:20pm UTC](https://discourse.haproxy.org/t/solved-publishing-exchange-server-and-port-25-forwarder/2950/1 "2018-09-04T16:20:13Z")

</div>

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

```

##

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [September 5, 2018, 5:34pm UTC](https://discourse.haproxy.org/t/solved-publishing-exchange-server-and-port-25-forwarder/2950/2 "2018-09-05T17:34:58Z")

</div>

> [@most122](#):
>
> 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 )

You did not configure haproxy for port 25.

---

<div class="post-metadata">

**Author:** ![most122](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@most122](https://discourse.haproxy.org/u/most122)\
**Post date:** [September 5, 2018, 5:47pm UTC](https://discourse.haproxy.org/t/solved-publishing-exchange-server-and-port-25-forwarder/2950/3 "2018-09-05T17:47:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [September 5, 2018, 5:50pm UTC](https://discourse.haproxy.org/t/solved-publishing-exchange-server-and-port-25-forwarder/2950/4 "2018-09-05T17:50:01Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![most122](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@most122](https://discourse.haproxy.org/u/most122)\
**Post date:** [September 6, 2018, 11:03am UTC](https://discourse.haproxy.org/t/solved-publishing-exchange-server-and-port-25-forwarder/2950/5 "2018-09-06T11:03:18Z")

</div>

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
