Exchange Server 2010与TMG的结合使用

1-概述

关于TMG安装和使用,可以看看这个link: www.isacn.org

环境介绍:

Exchange Server 2010与TMG的结合使用

注意一点: 模拟公网DNS服务器,建立HOST的时候IP地址一定要是公网地址

Exchange Server 2010与TMG的结合使用

注意第二点 在TMG建立规则允许内到外

Exchange Server 2010与TMG的结合使用

2-发布 Exchange POP3/SMTP (明文)

2.1-Operation in TMG

TMG先要发布一条规则

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

2.2-Operation in exchange server

首先pop3的身份验证 要改为’纯文本登入’

其次smtp link可以开启匿名也可以不开启匿名

Exchange Server 2010与TMG的结合使用

若关闭了匿名则用户名这一栏必须填[email protected]

2.3-客户端测试

可以telenet mail.lab.com 25 和110端口看服务是否开启

Exchange Server 2010与TMG的结合使用

3-发布 Exchange POP3/SMTP (加密)

3.1-Operation in exchange server

调整POP3 的身份验证为安全登入

Exchange Server 2010与TMG的结合使用

3.2 Operation in TMG

新建一个规则的时候选择 POP3S 和SMTPS

Exchange Server 2010与TMG的结合使用

需要注意一个点的是,在TMG上pops用的端口是:995,SMTPS用的端口465

但在 exchange 上POPS 用的端口是995,smtps用的端口是587

Outlook client上用的POPS则是995, smtp端口是25

所以可以看到明显的端口不匹配

解决思路:我们需要做个端口映射

1在 TMG smtps 改为25端口 (当然你也可以不改,但是在客户端配置的 时候就麻烦)

2在TMG上把 25端口映射到exchange 587端口

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

3.3客户端测试配置

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

4-发布exchange HTTS

4.1-隧道模式

传统的端口映射 ,在TMG上发布的时候选择 ‘非web服务器的发布规则’

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

下一步直到完成

在客户端验证成功

Telenet mail.lab.com 443

Exchange Server 2010与TMG的结合使用

4.2-桥接模式

(禁用隧道模式https发布规则)

TMG会拆包进行分析后,符合安全条件后,再丢包给exchange server

条件:

1一定要把exchange server的私钥导出到TMG中 (个人用户快快)

2TMG要信任内部的CA,且导入exchange server 私钥

3 TMG能解析出 exchange访问的域名

4 在TMG上要选择’新建exchange web 客户端发布规则’

桥接 模式比隧道模拟的优点:它 可以做https筛选.

4.2.1导出 exchange server 私钥

Exchange Server 2010与TMG的结合使用

导出的格式为pfx格式的私钥证书

4.2.2 导入exchange server 私钥

Exchange Server 2010与TMG的结合使用

同时,TMG必须信任CA, 由于TMG是加入域 的成员服务器,所以是自动信任CA (windows server 2012 -7)

4.2.3TMG能解析 mail.lab.com

关于TMG是否能解析 mail.lab.com,可以添加host记录

4.2.4TMG发布https 桥接模式规则

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

下一步直到完成

在bob client上 telnet mail.lab.com 443

结果是成功的 同时可以看下是不是我们exchange的证书

Exchange Server 2010与TMG的结合使用

5-发布outlook anywhere (outside)

由于mapi是使用动态接口,那么在防火墙上就不好做端口映射了

由此有了outlook anywhere的技术,即把端口二次封装进443端口


5.1-Open outlook anywhere services in exchange server

Exchange Server 2010与TMG的结合使用

5.2-Create Rule in TMG

安装硬 防火墙的规则的话,发布了443端口就可以了

但是tmg软防火并不可以,所以需要创建规则

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

5.3 测试TMG 规则

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

5.4客户端测试

打开https://mail.lab.com/rpc有跳出输入用户名和密码就ok

看下客户端是怎么设置的

Exchange Server 2010与TMG的结合使用

Exchange Server 2010与TMG的结合使用

记得在public DNS 上注册下 win2008-1.lab.com,具体参考下下面的文章

https://support.microsoft.com/en-us/kb/2580470/zh-cn

Exchange Server 2010与TMG的结合使用