设置Exchange客户端访问静态端口
2013-04-01 23:47
232 查看
看到了一篇好文章,转了过了,做了些简单的翻译。
如果你部署的Exchange环境中的负载均衡或防火墙不能处理动态的RPC端口,那么你将要在CAS服务器上给RPC客户端连接服务和地址薄服务定义静态端口。如果你使用了公共文件夹,你还得在Mailbox服务器上定义公共文件夹端口。我常用的端口是:
RPC客户端连接服务:TCP 60000
地址薄服务:TCP 60001
RPC客户端连接(公共文件夹):60002
对于前面两个,我已以下面的脚本中做好了快速设置端口的工作,只需要在CAS服务器上运行即可,当然,针对自己的情况得做些必要的修改。
If you are deploying Exchange in an environment with load balancers or firewalls which aren’t able to handle dynamic RPC port ranges, chances are you’ll be defining static ports for the RPC Client Access Service and the Address Book Service on each CAS server. If you’re using Public Folders, you’ll want a third static port on the Mailbox servers hosting Public Folders. I typically use these ports for this:
RPC Client Access Service – TCP 60,000
Address Book Service – TCP 60,001
RPC Client Access (Public Folders) – TCP 60,002
For the first two, I’ve included a script below which makes quick work of setting the ports. Just run it on the CAS server to make the required changes.
以下为脚本:
param([int32]$MAPIPort = 60000, [int32]$AddressBookPort = 60001, [bool]$RestartServices = $true)
# ==============================================================================================
# NAME: Configure Exchange Static Ports
#
# AUTHOR: Brian Desmond, brian@briandesmond.com
# DATE : 4/9/2012
#
# COMMENT:
#
# ==============================================================================================
Set-PSDebug -Strict:$true
function CheckProcessElevation()
{
$identity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$principal = New-Object System.Security.Principal.WindowsPrincipal($identity)
return $principal.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)
}
function CreateRegistryKeyIfNecessary([string]$path)
{
if (Test-Path -Path $path)
{
return
}
else
{
[void](New-Item -Path $path)
}
}
Function Test-RegistryValue($regkey, $name)
{
Get-ItemProperty $regkey $name -ErrorAction SilentlyContinue | Out-Null
$?
}
function CreateOrUpdateRegistryValue([string]$path, [string]$valueName, [Microsoft.Win32.RegistryValueKind]$valueType, $value)
{
if ((Test-Path -Path $path) -ne $true)
{
CreateRegistryKeyIfNecessary $path
}
if ((Test-RegistryValue $path $valueName) -eq $false)
{
[void](New-ItemProperty -Path $path -Name $valueName -PropertyType $valueType -Value $value)
}
else
{
[void](Set-ItemProperty -Path $path -Name $valueName -Value $value)
}
}
if ((CheckProcessElevation) -eq $false)
{
Write-Warning "Script must be run from an elevated prompt. Exiting..."
exit 1
}
$domtParamsPath = "HKLM:\System\CurrentControlSet\Services\MSExchangeAB\Parameters"
$momtParamsPath = "HKLM:\System\CurrentControlSet\Services\MSExchangeRPC\ParametersSystem"
Write-Host "Setting Address Book Service Port to $($AddressBookPort)"
CreateOrUpdateRegistryValue $domtParamsPath "RpcTcpPort" "String" $AddressBookPort.ToString()
Write-Host "Setting RPC Client Access Port to $($MAPIPort)"
CreateOrUpdateRegistryValue $momtParamsPath "TCP/IP Port" "DWord" $MAPIPort
if ($RestartServices)
{
Write-Host "Restarting Services..."
Restart-Service -Name "MSExchangeAB" -Confirm:$false
Restart-Service -Name "MSExchangeRPC" -Confirm:$false
}
Write-Host "Complete." -ForegroundColor Green
如果正在寻找定义公共文件夹连接的端口,除了上面的脚本,还可以用以下的注册表修改来搞定。
If you’re looking to restrict the port used for Public Folder access, you’ll need to do this in addition to the script above. The registry setting you want is below:
Key: “HKLM\System\CurrentControlSet\Services\MSExchangeRPC\ParametersSystem”
Value Name: "TCP/IP Port”
Value Type: REG_DWORD
Value Data: “60002” (decimal)
原文地址:Setting Static Ports for Exchange Client Access
如果你部署的Exchange环境中的负载均衡或防火墙不能处理动态的RPC端口,那么你将要在CAS服务器上给RPC客户端连接服务和地址薄服务定义静态端口。如果你使用了公共文件夹,你还得在Mailbox服务器上定义公共文件夹端口。我常用的端口是:
RPC客户端连接服务:TCP 60000
地址薄服务:TCP 60001
RPC客户端连接(公共文件夹):60002
对于前面两个,我已以下面的脚本中做好了快速设置端口的工作,只需要在CAS服务器上运行即可,当然,针对自己的情况得做些必要的修改。
If you are deploying Exchange in an environment with load balancers or firewalls which aren’t able to handle dynamic RPC port ranges, chances are you’ll be defining static ports for the RPC Client Access Service and the Address Book Service on each CAS server. If you’re using Public Folders, you’ll want a third static port on the Mailbox servers hosting Public Folders. I typically use these ports for this:
RPC Client Access Service – TCP 60,000
Address Book Service – TCP 60,001
RPC Client Access (Public Folders) – TCP 60,002
For the first two, I’ve included a script below which makes quick work of setting the ports. Just run it on the CAS server to make the required changes.
以下为脚本:
param([int32]$MAPIPort = 60000, [int32]$AddressBookPort = 60001, [bool]$RestartServices = $true)
# ==============================================================================================
# NAME: Configure Exchange Static Ports
#
# AUTHOR: Brian Desmond, brian@briandesmond.com
# DATE : 4/9/2012
#
# COMMENT:
#
# ==============================================================================================
Set-PSDebug -Strict:$true
function CheckProcessElevation()
{
$identity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$principal = New-Object System.Security.Principal.WindowsPrincipal($identity)
return $principal.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)
}
function CreateRegistryKeyIfNecessary([string]$path)
{
if (Test-Path -Path $path)
{
return
}
else
{
[void](New-Item -Path $path)
}
}
Function Test-RegistryValue($regkey, $name)
{
Get-ItemProperty $regkey $name -ErrorAction SilentlyContinue | Out-Null
$?
}
function CreateOrUpdateRegistryValue([string]$path, [string]$valueName, [Microsoft.Win32.RegistryValueKind]$valueType, $value)
{
if ((Test-Path -Path $path) -ne $true)
{
CreateRegistryKeyIfNecessary $path
}
if ((Test-RegistryValue $path $valueName) -eq $false)
{
[void](New-ItemProperty -Path $path -Name $valueName -PropertyType $valueType -Value $value)
}
else
{
[void](Set-ItemProperty -Path $path -Name $valueName -Value $value)
}
}
if ((CheckProcessElevation) -eq $false)
{
Write-Warning "Script must be run from an elevated prompt. Exiting..."
exit 1
}
$domtParamsPath = "HKLM:\System\CurrentControlSet\Services\MSExchangeAB\Parameters"
$momtParamsPath = "HKLM:\System\CurrentControlSet\Services\MSExchangeRPC\ParametersSystem"
Write-Host "Setting Address Book Service Port to $($AddressBookPort)"
CreateOrUpdateRegistryValue $domtParamsPath "RpcTcpPort" "String" $AddressBookPort.ToString()
Write-Host "Setting RPC Client Access Port to $($MAPIPort)"
CreateOrUpdateRegistryValue $momtParamsPath "TCP/IP Port" "DWord" $MAPIPort
if ($RestartServices)
{
Write-Host "Restarting Services..."
Restart-Service -Name "MSExchangeAB" -Confirm:$false
Restart-Service -Name "MSExchangeRPC" -Confirm:$false
}
Write-Host "Complete." -ForegroundColor Green
如果正在寻找定义公共文件夹连接的端口,除了上面的脚本,还可以用以下的注册表修改来搞定。
If you’re looking to restrict the port used for Public Folder access, you’ll need to do this in addition to the script above. The registry setting you want is below:
Key: “HKLM\System\CurrentControlSet\Services\MSExchangeRPC\ParametersSystem”
Value Name: "TCP/IP Port”
Value Type: REG_DWORD
Value Data: “60002” (decimal)
原文地址:Setting Static Ports for Exchange Client Access
相关文章推荐
- Exchange 2010 RPC配置静态RPC端口客户端访问、通讯簿服务和公用文件夹连接
- Exchange部署之:配置客户端访问服务器角色CAS(部署证书/设置OWA)
- Exchange2010RPC配置静态RPC端口客户端访问、通讯簿服务和公用文件夹连接
- exchange2013 pop3模式客户端设置的一些端口变化
- 配置Exchange 2010客户端访问服务器使用静态RPC端口
- windowser server 2012 r2 8080外网访问端口发布设置
- 修改Win7远程桌面端口及路由器端口设置 路由器端口映射,远程桌面连接--端口映射+花生壳=让人访问你个人服务器或WEB站点_陈卓欣_百度空间
- 详解在Tomcat7.0中设置默认服务器和不加端口名访问
- Linux防火墙Iptable如何设置只允许某个ip访问80端口,只允许特定ip访问某端口
- Exchange 日常管理七之:客户端访问服务器高可用部署
- windows server 2012 r2 8080外网访问端口发布设置
- Tomcat设置只需IP加端口访问项目网站
- EXCHANGE 完全访问权限邮箱的设置
- Linux防火墙Iptable如何设置只允许某个ip访问80端口,只允许特定ip访问某端口
- linux下统计某个端口来自客户端的访问连接数
- 使用TCP协议编写一个网络程序,设置服务器端的监听端口是8002,当与客户端建立连接后,服务器端向客户端发送数据“Hello, world”,客户端收到数据后打印输出
- 微软邮件系统Exchange 2013系列(三)安装客户端访问角色
- linux下通过iptables只允许指定ip地址访问指定端口的设置方法
- 将 RedirectToOptimalOWAServer 设置为 False 后通过代理连接到客户端访问服务器失败
- 小工具-IP地址获取和设置及端口访问验证(windows)