IFPCWebListenerProperties2::SSLAcceleratorPort property

Applies to: desktop apps only

The SSLAcceleratorPort property gets or sets the Secure Sockets Layer (SSL) accelerator port for the Web listener.

This property is read/write.

Syntax

HRESULT put_SSLAcceleratorPort(
  long lSSLAcceleratorPort
);

HRESULT get_SSLAcceleratorPort(
  long *plSSLAcceleratorPort
);
' Data type: Long

Property SSLAcceleratorPort( _
  ByVal lSSLAcceleratorPort As long, _
  ByVal plSSLAcceleratorPort As long _
) As Long

Property value

A 32-bit integer that specifies the SSL accelerator port for the Web listener.

Error codes

These property methods return S_OK if the call is successful; otherwise, they return an error code.

Remarks

This property is read/write. Its default value is 0, which indicates that no SSL accelerator is used, and its range of permissible values is from 0 through 65,535.

When the Forefront TMG computer sits behind an external SSL accelerator that receives HTTPS requests sent over the Internet from clients, the SSL accelerator terminates the SSL connections initiated by these clients and forwards their requests as HTTP requests to the port configured for sending HTTP requests on the Forefront TMG computer, which then forwards the requests to the published server if the traffic is allowed. If the Forefront TMG computer needs to generate links to itself when it performs link translation or redirects clients to authentication forms, Forefront TMG uses this property and the FQDN of the SSL accelerator from the Host header in the request to format such links with the HTTPS protocol. For example, if this property is set to 4443 and the FQDN from the Host header in the request is www.contoso.com, the URL will have the form https://www.contoso.com:4443/*full\_path. If this property is set to 443, Forefront TMG will not include the port number in the URL.

If this property is not set to 0, the SSLPort property of the Web listener must be set to 0 to prevent the Web listener from listening for direct SSL (HTTPS) connections from the Internet. If the SSLPort property is not set to 0, Forefront TMG will use the port specified in the SSLPort property for link translation.

This property cannot be accessed through Forefront TMG Management.

Examples

This VBScript script retrieves the current value of the SSLAcceleratorPort property for the user-specified Web listener in the local array and asks the user whether the current value should be changed. The script changes the value of the SSLAcceleratorPort property to the value supplied by the user and then ensures that the SSLPort property is set to 0 if the SSLAcceleratorPort property is not set to zero.

Option Explicit
'Define the constant needed
const Error_FileNotFound = &H80070002
Main(WScript.Arguments)
Sub Main(args)
    If(args.Count = 1) Then
        SetSslAcceleratorPort args(0)
    Else
        Usage()
    End If
End Sub
Sub SetSslAcceleratorPort(wlName)
    ' Create the root object.
    Dim root  ' The FPCLib.FPC root object
    Set root = CreateObject("FPC.Root")
    ' Declare the other objects needed.
    Dim isaArray        ' An FPCArray object
    Dim webListener     ' An FPCWebListener object
    Dim text            ' A String
    Dim input           ' A String
    ' Get a reference to the local array object.
    Set isaArray = root.GetContainingArray()
    ' Get a reference to the Web listener specified.
    On Error Resume Next
    Set webListener = isaArray.RuleElements.WebListeners.Item(wlName)
    If Err.Number = Error_FileNotFound Then
        WScript.Echo "The Web listener specified could not be found."
    Else
        Err.Clear
        On Error GoTo 0
        With webListener.Properties
            If .SSLAcceleratorPort = 0 Then
                text = "No SSL accelerator port is configured." & VbCrLf _
                       & "You can enter a nonzero value to enable" & VbCrLf _
                       & "an SSL accelerator port."
            Else
                text = "Current SSL accelerator port: " & .SSLAcceleratorPort _
                       & VbCrLf _
                       & "You can change this value, or enter 0" & VbCrLf _
                       & "to disable the SSL accelerator port."
            End If
            input = InputBox(text,"SSL Accelerator Port", "443")
        End With
        If CInt(input) <> webListener.Properties.SSLAcceleratorPort Then
            WScript.Echo "Changing the SSL accelerator port to " & CInt(input) _
                         & "..."
            webListener.Properties.SSLAcceleratorPort = CInt(input)
        End If
        If webListener.Properties.SSLAcceleratorPort <> 0 Then
            WScript.Echo "Ensuring that the SSL port is set to 0..."
            webListener.Properties.SSLPort = 0
        End If
        webListener.Save
    End If
End Sub
Sub Usage()
    WScript.Echo "Usage:" & VbCrLf _
        & "  CScript " & WScript.ScriptName & " WebListener" & VbCrLf _
        & "" & VbCrLf _
        & "    WebListener - Name of the Web listener" 
    WScript.Quit
End Sub

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)

Version

Forefront Threat Management Gateway (TMG) 2010

IDL

Msfpccom.idl

DLL

Msfpccom.dll

See also

FPCWebListenerProperties

 

 

Build date: 7/12/2010