@echo off
echo This is a simple batch file to troubleshoot a FW connectivity between
echo 2 hosts to be run under Win host , set your own vars
call GetNiceTime_on_%computername%.cmd
set _SourceServerHostName=sourceHostname
set _DestinationServerHostName=target
set _SourceServerIpAddress=101.125.51.140
set _DestinationServerIpAddress=110.135.52.31
set _RunDir=%CD%
set _InConfigLog=%_RunDir%\ifconfig_%NiceTime%.txt
set _PingLog=%_RunDir%\ping_%NiceTime%.txt
set _TracertLog=%_RunDir%\tracert_%NiceTime%.txt
set _SysInfoLog=%_RunDir%\sysinfo_%NiceTime%.txt
echo who , where , when >%_InConfigLog%
echo %userName% , %computername% , %date% , %time% >> %_InConfigLog%
echo runing: ipconfig /all >> %_InConfigLog%
ipconfig /all >> %_InConfigLog%
echo who , where , when >%_PingLog%
echo %userName% , %computername% , %date% , %time% >> %_PingLog%
echo running ping %_DestinationServerIpAddress% >> %_PingLog%
ping %_DestinationServerIpAddress% >> %_PingLog%
echo who , where , when >%_TracertLog%
echo %userName% , %computername% , %date% , %time% >> %_TracertLog%
echo running tracert %_DestinationServerIpAddress% >> %_TracertLog%
tracert %_DestinationServerIpAddress% >> %_TracertLog%
echo who , where , when >%_SysInfo%
echo %userName% , %computername% , %date% , %time% >> %_SysInfo%
echo running sysinfo on %computername% >> %_SysInfo%
sysinfo %_DestinationServerIpAddress% >> %_SysInfo%