Wait until I set all required settings at 127.0.0.1 to make my tomcat to listen to available port numbers.
Example ports I have found till now:
Code:
#0.0.0.0:22 sshd.exe
#0.0.0.0:135 svchost.exe
#0.0.0.0:1801 mqsvc.exe
I knew that following comment 10% not related to your query,
Code:
#!/bin/bash
IPv4=$(/cygdrive/c/WINDOWS/system32/ipconfig.exe 2>&1 | /usr/bin/tr -d "\r" | /usr/bin/awk '"IPv4" == $1 { print $NF}')
#0.0.0.0:22 %HOME%\..\..\usr\sbin\sshd.exe
#[::]:22 %HOME%\..\..\usr\sbin\sshd.exe
#0.0.0.0:49665 C:\WINDOWS\system32\wininit.exe
#[::]:49665 C:\WINDOWS\system32\wininit.exe
#0.0.0.0:49668 C:\WINDOWS\system32\spoolsv.exe
#[::]:49668 C:\WINDOWS\system32\spoolsv.exe
#0.0.0.0:49669 C:\WINDOWS\system32\svchost.exe
#[::]:49669 C:\WINDOWS\system32\svchost.exe
#0.0.0.0:49667 C:\WINDOWS\system32\svchost.exe
#[::]:49667 C:\WINDOWS\system32\svchost.exe
#0.0.0.0:49666 C:\WINDOWS\system32\svchost.exe
#[::]:49666 C:\WINDOWS\system32\svchost.exe
#0.0.0.0:5040 C:\WINDOWS\system32\svchost.exe
#0.0.0.0:135 C:\WINDOWS\system32\svchost.exe
#[::]:135 C:\WINDOWS\system32\svchost.exe
#0.0.0.0:49664 C:\WINDOWS\system32\lsass.exe
#[::]:49664 C:\WINDOWS\system32\lsass.exe
#0.0.0.0:49671 C:\WINDOWS\system32\services.exe
#[::]:49671 C:\WINDOWS\system32\services.exe
#0.0.0.0:49670 C:\WINDOWS\system32\mqsvc.exe
#[::]:49670 C:\WINDOWS\system32\mqsvc.exe
#0.0.0.0:1801 C:\WINDOWS\system32\mqsvc.exe
#[::]:1801 C:\WINDOWS\system32\mqsvc.exe
#0.0.0.0:2103 C:\WINDOWS\system32\mqsvc.exe
#[::2103]] C:\WINDOWS\system32\mqsvc.exe
#0.0.0.0:2107 C:\WINDOWS\system32\mqsvc.exe
#[::]:2107 C:\WINDOWS\system32\mqsvc.exe
#0.0.0.0:2105 C:\WINDOWS\system32\mqsvc.exe
#[::]:2105 C:\WINDOWS\system32\mqsvc.exe
#0.0.0.0:5357 System
#[::]:5357 System
#$IPv4:139 System
/cygdrive/c/WINDOWS/system32/netstat.exe -nato 2>&1 |\
/usr/bin/grep -E -v "\
\[::\]:22|\
0.0.0.0:22|\
0.0.0.0:135|\
\[::\]:135|\
$IPv4:139|\
0.0.0.0:1801|\
\[::\]:1801|\
0.0.0.0:2103|\
\[::\]:2103|\
0.0.0.0:2105|\
\[::\]:2105|\
0.0.0.0:2107|\
\[::\]:2107|\
0.0.0.0:5357|\
\[::\]:5357|\
0.0.0.0:49664|\
\[::\]:49664|\
0.0.0.0:49665|\
\[::\]:49665|\
0.0.0.0:49666|\
\[::\]:49666|\
0.0.0.0:49667|\
\[::\]:49667|\
0.0.0.0:49668|\
\[::\]:49668|\
0.0.0.0:49669|\
\[::\]:49669|\
0.0.0.0:49670|\
\[::\]:49670|\
0.0.0.0:49671|\
\[::\]:49671|\
0.0.0.0:5040" |\
/usr/bin/grep LISTEN
Hence I need to use the port at tomcat excluding following ports at localhost:
Code:
22
135
139
1801
2103
2105
2107
5040
5357
49664
49665
49666
49667
49668
49669
49670
49671