Posts

Showing posts with the label networking

Cisco block telnet and SSH access

Block telnet and SSH access to the Cisco router.

The user must have the privilege to change the settings or basically the admin user account.

block all (telnet and ssh):

  line vty 0 4
  transport input none

sh startup-config (save config and will persist after reboot or shutdown)

sh running-config (config is save but will not persist after reboot or shutdown)

To enable or unblock:

line vty 0 4
 privilege level 15
 login local
 line vty 0 4
transport input telnet ssh

Before rolling out to production be sure to test it out or else you will leave a vulnerability in your network.

Cheers..till next time!

================================ Free Android Apps:
Click on links below to find out more:
Linux Android App cheat sheet: https://play.google.com/store/apps/details?id=com.LinuxMobileKit
Multiplication Table for early learnershttps://play.google.com/store/apps/details?id=com.TableMultiplication
Catholic Rosary Guide  for Android:
https://play.google.com/store/apps/details?id=com.myrosaryapp
http:…

Able to ping but cannot browse in Windows

If the PC, Laptop or Server has ever worked before then it will be easier to troubleshoot.
Since it has worked before, what are the changes done to the machine?
If there are quite a few changes done to the machine, undo or remove all the changes done.
After removing or undoing all the changes, check whether web page will load or not.
If still not working, try "resetting" the browser settings.
For IE or Internet Explorer, go to "Tools", click "Internet options", click "Advanced" tab and click on "Reset" button.
Close the browser and open again, check whether the page will load or not.
If still not loading, open an elevated command prompt and do the following one by one:

To open an elevated command prompt you need administrator credentials, check out the link below on how to open an elevated command prompt.

http://quickbytesstuff.blogspot.sg/2014/10/open-elevated-command-prompt.html
ipconfig /flushdns


ipconfig /release


netsh winsock reset


s…

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 Windows registry. The above command shows the description and the interface GUID, but the above command also can be used to sniff or capture traffic.
netsh trace start capture=YES report=YES persistent=YES
Netsh packet sniffing is quite handy because it's already built-in on the system and no …

Show localports opening in Advfirewall using netsh

Rename interface or network adapter name using PowerShell or Command line

How to rename interface or network adapter name using command line or Powershell?


In  Windows network connection window, it shows the list of available network card on the computer, NICs are listed with its name, interface card vendor name (like Intel(R) I350 Gigabit) and its connection name whether it's domain network, local network, private or other network connection name.

Network connections window can be access by typing "ncpa.cpl" from windows run box. Or typing "control cpa.cpl" from command line. Of course it can also be access via GUI from the control panel or task bar.

To rename Interface name using netsh via command line:

Netsh interface set interface name="Local Network" newname="Private LAN Network"


If the server or computer has multiple nics; its better to set the interface name with identifiable name that best describes the interface connection.

Netsh interface set interface name="Local Network" newname="NIC 1 W…

PowerShell get network adapter Speed

How to check network adapter speed installed on a computer using PowerShell?
Code snippet below will get the name of all the network adapter installed on a computer and also the speed.
To use the script on a remote computer supply the computer name and run the script with appropriate privileges to get the data on the remote computer.
#===========================
$computer_name="." $Net_adapter=gwmi-classWin32_NetworkAdapter-namespace"root\CIMV2" ` -computername$computer_name

foreach ($objItemin$Net_adapter) {
"Adapter is: "+$objItem.name +" -- "+"Adapter Speed is: "+[math]::truncate($objItem.speed/1MB) +" MB"
}
#===========================
Change the 1MB to 1GB if you need the output in GB.

Sample Output:
Adapter is: Teredo Tunneling Pseudo-Interface -- Adapter Speed is: 0 MB Adapter is: Microsoft ISATAP Adapter #3 -- Adapter Speed is: 0 MB Adapter is: VMware Virtual Ethernet Adapter for VMnet1 -- Adapter Speed is: 95 MB Adapter is:…

WMIC Get IP Address

How to get IP Address via command line using WMIC?

Get IP Address of   remote computer.

Get IP Address using WMIC.

wmic nicconfig get IPAddress,ServiceName

Sample output:
IPAddress                                       ServiceName
                                                kdnic
{"169.254.0.241", "fe80::26d0:eff6:cc27:e1"}    VBoxNetAdp
{"192.168.11.6", "fe80::8798:acfe:6ee9:8b7c"}    athr
                                                L1C
                                                RFCOMM
                                                BthPan
                                                vwifimp
                                                tunnel
                                                RasSstp
                                                RasAgileVpn
                                                Rasl2tp
                                                PptpMiniport
                                                RasPppo…

PowerShell Get IP Address and Subnet mask

Get IP Address, MAC Address and Subnet mask.

It also displays the CIDR (Classless InterDomain Routing) notation.

Here's the script:
 ======================================

$nic_configuration = gwmi -computer .  -class "win32_networkadapterconfiguration" | Where-Object {$_.defaultIPGateway -ne $null}
$IP = $nic_configuration.ipaddress
write-output " IP Address : $IP"

$MAC_Address = $nic_configuration.MACAddress
write-output " MAC Address :  $MAC_Address"

$SubnetMask = $nic_configuration.ipsubnet

switch ($SubnetMask) {
255.255.255.255   {" Subnet mask is: 255.255.255.255 or /32 "}
255.255.255.254   {" Subnet mask is: 255.255.255.254  or   /31 "}
255.255.255.252   {" Subnet mask is:  255.255.255.252 or   /30 "}
255.255.255.248   {" Subnet mask is: 255.255.255.248 or  /29 "}
255.255.255.240   {" Subnet mask is:   255.255.255.240   or   /28"}
255.255.255.224   {" Subnet mask is:   255.255.255.224   or   /27&q…