I am looking for feedback, and or suggestions on how to identify TCPIP connections that are using Telnet or CCF to connect to the mainframe. I am working to eliminate all non-secure port connections 23 and 3001 to go SSL with 992 and 3013.
There are other non-secure port connections using application which i plan to address in a phased approach for migration.
Thank you
Val
On 8/31/2020 8:12 PM, Val wrote:
I am looking for feedback, and or suggestions on how to identify TCPIP connections that are using Telnet or CCF to connect to the mainframe. I am working to eliminate all non-secure port connections 23 and 3001 to go SSL with 992 and 3013.
There are other non-secure port connections using application which i plan to address in a phased approach for migration.
Thank you
Val
You can view the status of all connections for a given port number with
this command:
NW TCPIP CONN MYNAME=<port number>
You can also filter using IPADDRESS, STATE and and a few other
attributes. See the documentation in the Networking Commands and
Inquiries Help file. For example:
NW TCPIP CONN MYNAME=23 TCPSTATE=ESTABLISHED
This command may generate a long list, so you might want to run it from
an Action line in MARC and use the STORE command to save the results to
a file.
Paul
I’m not currently working on mainframe just now but when I was I developed some Windows Powershell script to translate the output from NW TCPIP CONN to a CSV file and also perform an NSLOOKUP (dns lookup on windows machines) - happy for you to use itif Powershell is useful to you.
Put the below into a file on a pc with a .ps1 file extension and run (change the file paths accordingly to where the output from the MCP is (I used STore as Paul suggested then grabbed the file off an nxservices share):
<# NW TCPIP CONN OUTPUT Parser - turns below into CSV output
TCP CONNECTION ID = 10
FILENAME = FILE_1
MY NAME = 1234
YOUR NAME = 45321
STATE = ESTABLISHED
YOUR IP ADDRESS 1.2.3.3
PROTOCOL STACK = LEGACY,
TCP CONNECTION ID = 11
FILENAME = MY_PORT
MY NAME = 9999
YOUR NAME = 54231
STATE = ESTABLISHED
YOUR IP ADDRESS 9.8.7.6
PROTOCOL STACK = LEGACY,
$srcData = (gc C:\TCP_CONNS.TXT|select -Skip 8) -join ',' `
-replace ' ','' `
-replace ',,',"`r`n" `
-replace ',TCPCONNECTIONID=','' `
-replace 'TCPCONNECTIONID=',''`
-replace 'FILENAME=','' `
-replace 'MYNAME=','' `
-replace 'YOURNAME=','' `
-replace 'STATE=','' `
-replace 'YOURIPADDRESS','' `
-replace 'PROTOCOLSTACK=',''
$outfile = @()
$srcdata -split "`r`n"|where-object {$_ -notlike ''}|foreach {
$obj = New-Object System.Object
$inparr = $_.Split(",")
$obj|Add-Member -MemberType NoteProperty -Name Connection_ID -Value $inparr[0]
$obj|Add-Member -MemberType NoteProperty -Name Filename -Value $inparr[1] $obj|Add-Member -MemberType NoteProperty -Name MCP_Port -Value $inparr[2] $obj|Add-Member -MemberType NoteProperty -Name Client_Port -Value $inparr[3] $obj|Add-Member -MemberType NoteProperty -Name Port_State -Value $inparr[4] $obj|Add-Member -MemberType NoteProperty -Name Client_IP -Value $inparr[5] $ErrorActionPreference = "Stop"
$Client_DNS_V = If ($obj.Port_State -ne "LISTEN") {Try { (NSLOOKUP $inparr[5] |Select-String Name).Line.ToString().Replace(" ","").Split(":")[1]} Catch {}} else {""}
$ErrorActionPreference = "SilentlyContinue"
$obj|Add-Member -MemberType NoteProperty -Name Client_DNS -Value $Client_DNS_V
$obj|Add-Member -MemberType NoteProperty -Name Protocol_Stack -Value $inparr[6]
$outfile += $obj
rv Client_DNS_V
}
$outfile|Export-Csv -Path C:\TCP_CONNS.CSV -NoTypeInformation
On Tuesday, September 1, 2020 at 4:32:47 PM UTC+1, Paul Kimpel wrote:
On 8/31/2020 8:12 PM, Val wrote:
I am looking for feedback, and or suggestions on how to identify TCPIP connections that are using Telnet or CCF to connect to the mainframe. I am working to eliminate all non-secure port connections 23 and 3001 to go SSL with 992 and 3013.
There are other non-secure port connections using application which i plan to address in a phased approach for migration.
Thank you
Val
You can view the status of all connections for a given port number with this command:
NW TCPIP CONN MYNAME=<port number>
You can also filter using IPADDRESS, STATE and and a few other
attributes. See the documentation in the Networking Commands and
Inquiries Help file. For example:
NW TCPIP CONN MYNAME=23 TCPSTATE=ESTABLISHED
This command may generate a long list, so you might want to run it from
an Action line in MARC and use the STORE command to save the results to
a file.
Paul
On Tuesday, September 1, 2020 at 1:39:31 PM UTC-4, Graham Gold wrote:it if Powershell is useful to you.
I’m not currently working on mainframe just now but when I was I developed some Windows Powershell script to translate the output from NW TCPIP CONN to a CSV file and also perform an NSLOOKUP (dns lookup on windows machines) - happy for you to use
Put the below into a file on a pc with a .ps1 file extension and run (change the file paths accordingly to where the output from the MCP is (I used STore as Paul suggested then grabbed the file off an nxservices share):
<# NW TCPIP CONN OUTPUT Parser - turns below into CSV output
TCP CONNECTION ID = 10
FILENAME = FILE_1
MY NAME = 1234
YOUR NAME = 45321
STATE = ESTABLISHED
YOUR IP ADDRESS 1.2.3.3
PROTOCOL STACK = LEGACY,
TCP CONNECTION ID = 11
FILENAME = MY_PORT
MY NAME = 9999
YOUR NAME = 54231
STATE = ESTABLISHED
YOUR IP ADDRESS 9.8.7.6
PROTOCOL STACK = LEGACY,
using lognalyzer over a monthly period as an option to generate that reporting?$srcData = (gc C:\TCP_CONNS.TXT|select -Skip 8) -join ',' `
-replace ' ','' `
-replace ',,',"`r`n" `
-replace ',TCPCONNECTIONID=','' `
-replace 'TCPCONNECTIONID=',''`
-replace 'FILENAME=','' `
-replace 'MYNAME=','' `
-replace 'YOURNAME=','' `
-replace 'STATE=','' `
-replace 'YOURIPADDRESS','' `
-replace 'PROTOCOLSTACK=',''
$outfile = @()
$srcdata -split "`r`n"|where-object {$_ -notlike ''}|foreach {
$obj = New-Object System.Object
$inparr = $_.Split(",")
$obj|Add-Member -MemberType NoteProperty -Name Connection_ID -Value $inparr[0]
$obj|Add-Member -MemberType NoteProperty -Name Filename -Value $inparr[1] $obj|Add-Member -MemberType NoteProperty -Name MCP_Port -Value $inparr[2] $obj|Add-Member -MemberType NoteProperty -Name Client_Port -Value $inparr[3]
$obj|Add-Member -MemberType NoteProperty -Name Port_State -Value $inparr[4]
$obj|Add-Member -MemberType NoteProperty -Name Client_IP -Value $inparr[5] $ErrorActionPreference = "Stop"
$Client_DNS_V = If ($obj.Port_State -ne "LISTEN") {Try { (NSLOOKUP $inparr[5] |Select-String Name).Line.ToString().Replace(" ","").Split(":")[1]} Catch {}} else {""}
$ErrorActionPreference = "SilentlyContinue"
$obj|Add-Member -MemberType NoteProperty -Name Client_DNS -Value $Client_DNS_V
$obj|Add-Member -MemberType NoteProperty -Name Protocol_Stack -Value $inparr[6]
$outfile += $obj
rv Client_DNS_V
}
$outfile|Export-Csv -Path C:\TCP_CONNS.CSV -NoTypeInformation
On Tuesday, September 1, 2020 at 4:32:47 PM UTC+1, Paul Kimpel wrote:
On 8/31/2020 8:12 PM, Val wrote:
I am looking for feedback, and or suggestions on how to identify TCPIP connections that are using Telnet or CCF to connect to the mainframe. I am working to eliminate all non-secure port connections 23 and 3001 to go SSL with 992 and 3013.
There are other non-secure port connections using application which i plan to address in a phased approach for migration.
Thank you
Val
You can view the status of all connections for a given port number with this command:
NW TCPIP CONN MYNAME=<port number>
You can also filter using IPADDRESS, STATE and and a few other attributes. See the documentation in the Networking Commands and Inquiries Help file. For example:
NW TCPIP CONN MYNAME=23 TCPSTATE=ESTABLISHED
This command may generate a long list, so you might want to run it from an Action line in MARC and use the STORE command to save the results to a file.
Thanks for providing this value information.Paul
The NW TCPIP CONN reporting is only for the connections that are active at a given time (point in time). There are many of our users/connections that may not connect everyday or may not stay up all the time. So, Would you suggest to get accurate counts
what options if any, should be specified in the LOG search criteria? we dont have Gregory's LOGEXTRACT utility
On Tuesday, September 1, 2020 at 1:39:31 PM UTC-4, Graham Gold wrote:it if Powershell is useful to you.
I’m not currently working on mainframe just now but when I was I developed some Windows Powershell script to translate the output from NW TCPIP CONN to a CSV file and also perform an NSLOOKUP (dns lookup on windows machines) - happy for you to use
using lognalyzer over a monthly period as an option to generate that reporting?On Tuesday, September 1, 2020 at 4:32:47 PM UTC+1, Paul Kimpel wrote:
On 8/31/2020 8:12 PM, Val wrote:
I am looking for feedback, and or suggestions on how to identify TCPIP connections that are using Telnet or CCF to connect to the mainframe. I am working to eliminate all non-secure port connections 23 and 3001 to go SSL with 992 and 3013.You can view the status of all connections for a given port number with
There are other non-secure port connections using application which i plan to address in a phased approach for migration.
Thank you
Val
this command:
NW TCPIP CONN MYNAME=<port number>
You can also filter using IPADDRESS, STATE and and a few other
attributes. See the documentation in the Networking Commands and
Inquiries Help file. For example:
NW TCPIP CONN MYNAME=23 TCPSTATE=ESTABLISHED
This command may generate a long list, so you might want to run it from
an Action line in MARC and use the STORE command to save the results to
a file.
Paul
Thanks for providing this value information.
The NW TCPIP CONN reporting is only for the connections that are active at a given time (point in time). There are many of our users/connections that may not connect everyday or may not stay up all the time. So, Would you suggest to get accurate counts
what options if any, should be specified in the LOG search criteria? we dont have Gregory's LOGEXTRACT utility
I am looking for feedback, and or suggestions on how to identify TCPIP connections that are using Telnet or CCF to connect to the mainframe. I am working to eliminate all non-secure port connections 23 and 3001 to go SSL with 992 and 3013.
There are other non-secure port connections using application which i plan to address in a phased approach for migration.
Thank you
Val
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 04:01:01 |
Calls: | 10,387 |
Calls today: | 2 |
Files: | 14,061 |
Messages: | 6,416,779 |