Cisco 1262 WAP

Had to replace a dead WAP with this 1262 the other day, but the replacement had an automous config which need to be converted to lightweight for it to talk to WLC.

The WAP got an ip from DHCP which I needed to telnet to it later. (Otherwise would need a console cable)
Setup a tftp server (SolarWinds), which will serve the tar file.

Use putty, telnet to the WAP (u: cisco, p: Cisco)

ap> Enable
ap# archive download-sw tftp://<tftp-ip>/ap3g1-rcvk9w8-tar.124-23c.JA.tar
ap# wr mem
ap# reload

Windows activation with KMS and TMG2010

Our TMG2010 was deactivated for sometimes now. Eventhough tmg is still working, but it is annoying that it prompts you to activate everytime you login. (And the black background)

So I decided to deal with it, and it is quite easy to fix.

Basically you need to allow TCP port 1688 outbound to the KMS server.

Full article from Microsoft Support here.

 

How-to import certificates in Chromebook

in Chrome, chrome://settings/certificates
select -> Your Certificates tab -> "Import and Bind to Device" .pfx
select -> Authorities tab -> import (ex: Deet.cer)

In Chrome settings, under Internet Connection, Add Connection
Join wifi (Advanced), insert SSID and identity, and proxy details if needed.

Secure Password & Key with Powershell

To encrypt credential which works on different computer(s), you need to generate the key and the encrypted password file.

After you have both key and encrypted file, you could run powershell using that credential generated.

Here is the reference which I referred on.

Creating AES key with random data and export to file:

$KeyFile = "\\Machine1\SharedPath\AES.key"
$Key = New-Object Byte[] 16   # You can use 16, 24, or 32 for AES
[Security.Cryptography.RNGCryptoServiceProvider]::Create().GetBytes($Key)
$Key | out-file $KeyFile

Creating SecureString object

$PasswordFile = "\\Machine1\SharedPath\Password.txt"
$KeyFile = "\\Machine1\SharedPath\AES.key"
$Key = Get-Content $KeyFile
$Password = "P@ssword1" | ConvertTo-SecureString -AsPlainText -Force
$Password | ConvertFrom-SecureString -key $Key | Out-File $PasswordFile

Creating PSCredential object

$User = "MyUserName"
$PasswordFile = "\\Machine1\SharedPath\Password.txt"
$KeyFile = "\\Machine1\SharedPath\AES.key"
$key = Get-Content $KeyFile
$MyCredential = New-Object -TypeName System.Management.Automation.PSCredential `
 -ArgumentList $User, (Get-Content $PasswordFile | ConvertTo-SecureString -Key $key)

Example of how to use PSCredential to map network drive:

New-PSDrive -Name P -PSProvider FileSystem -Root $UNC_PATH -Credential $MyCredential -Persist

* Keep the key file somewhere safe, because it is the key that could encrypt/decrypt the password file.

Cisco CLI Commands

For future reference:

ENABLE PASSWORD: example 1

switch> enable
switch# conf t
switch# enable password somethinghere
switch# end
switch# show running-config
switch# copy running-config startup-config


ENABLE PASSWORD: example 2

switch> enable
switch# conf t
switch# enable password level 15 0 cisco
switch# ip http server
switch# ip http authentication enable
switch# show running-config
switch# copy running-config startup-config


ENABLE WEB AUTHENTICATION:

switch> enable
switch# conf t
switch# ip http server
switch# end
switch# show running-config
switch# copy running-config startup-config


Other commands:

switch> enable
switch# show running-config
switch# copy running-config startup-config
(save the config)
switch> dir flash: (show flash files)
switch> rename flash:config.text flash:config.text.old
switch# sho run | inc http (show running config with http)
switch# ip http authentication local (using enable password/username saved in the switch)