Thursday 8 September 2022

script to gather network information on windows

.bat script to gather network information on windows, you can add or remove things as needed



Set > %userprofile%\downloads\_Set.txt


echo %logonserver% > %userprofile%\downloads\_logonserver.txt

whoami  > %userprofile%\downloads\_whoami.txt

hostname  > %userprofile%\downloads\.txt

ipconfig /all  > %userprofile%\downloads\_ipconfig_all.txt

ipconfig /displaydns > %userprofile%\downloads\_displaydns_post.txt

route print  > %userprofile%\downloads\_routeprint.txt

tracert -d 192.168.2.100  > %userprofile%\downloads\_tracert_2_100.txt

ping 192.168.2.100  > %userprofile%\downloads\_ping_2_100.txt

nslookup cust.url.com > %userprofile%\downloads\_nslookup.txt

wmic NIC where NetEnabled=true get Name,Speed  > %userprofile%\downloads\_NICSpeed.txt

gpresult /V >> %userprofile%\downloads\_gpresult.txt


Wednesday 7 September 2022

can't ping SVI interface on remote switch across S2S VPN

 Had an issue could ping vlan1 (LAN) SVI but not vlan146 (VOICE)

The setup was

LAN client -> L2 VL1 -> L3 SVL VL1 -> Inside ASA -> S2S VPN -> HQ 

Phone client -> L2 VL146 -> L3SVI VL146 -> L3 SVI 1 -> Inside ASA-> S2S VPN -> HQ -> Phone server


I found some messed up NAT's


Removed the global

object network obj_any

 nat (any,outside) dynamic interface


The NoNat had a missing object in the destination

nat (voice,outside) source static obj-10.60.146.0 obj-10.60.146.0 destination static HQ-NET HQ-NETS no-proxy-arp route-lookup


Also needed this NAT on the INSIDE with the 146 networks to ping the SVI. This is becuase the route to the HQ network is through the inside interface of the ASA.

nat (inside,outside) source static obj-10.60.146.0 obj-10.60.146.0 destination static HQ-NET HQ-NETS no-proxy-arp route-lookup