Quantcast
Viewing all articles
Browse latest Browse all 3822

Adding SSL Port on TMG

I have would like to add ssl port 7201 on TMG which is causing the error below.

Error Code: 502 Proxy Error. The specified Secure Sockets Layer (SSL) port is not allowed. ISA server is not configured to allow SSL requests from this port. Most Web browsers use port 443 for SSL requests. (12204)

i have tried this script but its giving and error, do i need to key in the ports on the script givenhere  ?

Someone can assist with a working script.

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Copyright (c) Microsoft Corporation. All rights reserved.
' THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE
' RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE
' USER. USE AND REDISTRIBUTION OF THIS CODE, WITH OR WITHOUT MODIFICATION, IS
' HEREBY PERMITTED.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' This script creates a new tunnel port range containing a single user-specified
' port to allow clients to send requests, for example, SSL requests, to that
' port.
' This script can be run from a command prompt by entering the
' following command:
'     CScript AddTPRange.vbs RangeName PortNumber
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit

' Define the constants needed.
Const Error_TypeMismatch = &HD
Const Error_AlreadyExists = &H800700B7
Const Error_OutOfRange = &H80070057

Main(WScript.Arguments)

Sub Main(args)
    If(args.Count <> 2) Then
        Usage()
    Else
       AddTPRange args(0), args(1)
    End If
End Sub

Sub AddTPRange(newRangeName, newTunnelPort)

    ' Create the root object.
    Dim root  ' The FPCLib.FPC root object
    Set root = CreateObject("FPC.Root")

    'Declare the other objects needed.
    Dim isaArray     ' An ISA Server array object
    Dim tpRanges     ' An FPCTunnelPortRanges collection
    Dim newRange     ' An FPCTunnelPortRange object
    Dim port         ' An Integer

    ' Get a reference to the array and to
    ' the collection of tunnel port ranges.
    Set isaArray = root.GetContainingArray
    Set tpRanges = isaArray.ArrayPolicy.WebProxy.TunnelPortRanges

    ' Create a new tunnel port range.
    On Error Resume Next
    port = CDbl(newTunnelPort)
    If Err.Number = Error_TypeMismatch Then
        WScript.Echo "A number must be entered for the port to be included."
        WScript.Quit
    End If
    Err.Clear
    Set newRange = tpRanges.AddRange(newRangeName, port, port)
    If Err.Number = Error_AlreadyExists Then
       WScript.Echo "A port range with the name specified already exists."
       WScript.Quit
    ElseIf Err.Number = Error_OutOfRange Then
        WScript.Echo "The range of permissible ports is from 1 through 65535."
        WScript.Quit
    End If
    On Error GoTo 0

    ' Save the changes to the collection of tunnel port ranges
    ' with fResetRequiredServices set to True to restart the Firewall service.
    tpRanges.Save True
    WScript.Echo "Done!"
End Sub

Sub Usage()
    WScript.Echo "Usage:" & VbCrLf _
        & "  " & WScript.ScriptName & " RangeName TunnelPort" & VbCrLf _
        & "" & VbCrLf _
        & "  RangeName  - Name of the tunnel port range to be added" & VbCrLf _
        & "  TunnelPort - Port to be included in the new tunnel port range"

    WScript.Quit
End Sub


Meshax


Viewing all articles
Browse latest Browse all 3822

Trending Articles