Skip to main content

Posts

Showing posts with the label Subnetting

PowerShell Ping IPV4 addresses

Ping a range of IPV4 and resolve its hostnames via PowerShell. Here’s a simple PowerShell code snippet to ping a range of an IPV4 addresses and any IP address that will reply will be shown as per the sample output below. #======================   ( 240 .. 254 | ForEach {     write $_     Test-Connection -computername "192.168.8. $_ "   -count 1 -erroraction 'silentlycontinue' | Format-Table -AutoSize   })   #====================== 240 .. 254 –- change this to a desired IP range from 1 to 254. 192.168.8. $_ -- change this IP Address on the IP Address configured or set on the network -count 1 –- ping 1 time -erroraction 'silentlycontinue' –- this will not display any errors on the screen if the IP Address can’t be found or is not set to reply to ICMP or ping protocol Format-Table -AutoSize –- if the device will reply with the hostname then the full name will be displayed on the screen and not trunca...

PPTP VPN not connecting

Ever encounter connecting PPTP VPN from a Ruckus router or other new routers but VPN keep on failing? Or does not connect at all. However, if you test the VPN outside the network of the Ruckus router or use another Wi-Fi Router the VPN goes through and able to connect. One reason is the Wi-Fi router does not allow the unsecure PPTP VPN protocol to pass through. The firmware filters the PPTP traffic. PPTP VPN has quite a few vulnerabilities and some Wi-Fi router does not allow this protocol to pass through for some obvious reason, because it could compromise the network security. Solution is to select another VPN protocol that is supported by the Wi-Fi router and is considered a secure protocol.  To easily troubleshoot whether it’s the Wi-Fi router that is filtering the VPN protocol, is to grab some old Wi-Fi router if ever you have some that is just lying around and collecting dust. And check whether VPN goes through. If it goes through, then the firm...

PowerShell Test Port Forwarding - check if port is open

Port forwarding is necessary if the device is that needs to connect to the unsecured world of the Internet. Of course, before opening port or doing any port forwarding make sure that security is in place. Firewall rules, software configuration are properly set, up-to-date anti-virus and other settings that needs to be done to secure the system. PowerShell can test whether a remote port is open or a Port Forwarding rules on either on the Firewall or router is set correctly. Here’s a one liner code, to check whether the Port is open or not. Both one line code below does the same thing, check whether the Port is open or not. 1 . New-Object System.Net.Sockets.TCPClient -ArgumentList "Remote.Public.IP.Address", 3389 2. Test-NetConnection -Port 80 -InformationLevel Detailed Replace the port number, with any port number to be tested. If the connected property on the displayed output is true, then the port is open. More details on the link b...

Get network interfaces description in Windows

Netsh is a command line tool that is very useful provided of course you know exactly on how to use it. Below is an example on how to display the GUID and the description of the network interface card.    netsh trace show interfaces Sample output: Ethernet adapter Ethernet:     Description:      Intel(R) I350 Gigabit Network Connection     Interface GUID:   {1C8DC74A-0BCD-48FF-F3B7-26B1FF4D5650}     Interface Index: 12     Interface Luid:   0x8000008000000 Tunnel adapter isatap.{BCF65C9D-CB58-49F7-8BA1-88DBF2A6FBCE}:     Description:      Microsoft ISATAP Adapter #3     Interface GUID:   {F8BB0A84-D5A4-CA93-BA100-27EF2898CC82}     Interface Index: 19     Interface Luid:   0x12000005000000 The GUID (globally unique identifier) is used to identify objects in Wi...