Monday, August 4, 2014

Show nonpresent devices in Windows device manager

Reveal the hidden network adapters in Windows. I'm using this in Windows Server 2008 R2.
Run these commands from the command prompt with administrator privileges:

set devmgr_show_nonpresent_devices=1
start devmgmt.msc

Now click View from the File menu and then check 'Show hidden devices'. 

This will only work for this session of the device manager, because we started it from the command prompt with the devmgr_show_nonpresent_devices environment variable set. If you wanted this to be a permanent change, you could add it to the environment variables in system properties.

Monday, July 21, 2014

The correct MSSQL collation for Cisco ICM/UCCE

If you're installing ICM/UCCE in US English, you need to use the LATIN1_GENERAL_BIN  collation. Note this is not the default collation. Here's the screenshot of the correct choice:

Remove hidden network adapters in Windows

From a command prompt, run:
set devmgr_show_nonpresent_devices=1
start devmgmt.msc


Then enable "show hidden devices" in Device Manager.

Wednesday, May 14, 2014

How to test a TCP or UDP port in linux

from http://superuser.com/questions/621870/test-if-a-port-on-a-remote-system-is-reachable-without-telnet

is this localhost's SSH running?
$ cat < /dev/tcp/localhost/22
SSH-2.0-OpenSSH_6.2p2 Debian-6
YEP

is port 8080 on 192.168.30.5 open?
$ cat < /dev/tcp/192.168.30.5/8080
-bash: connect: Connection refused
-bash: /dev/tcp/192.168.30.30/8080: Connection refused
NOPE

IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
...
Offending RSA key in /Users/coty/.ssh/known_hosts:13


If you know that the server key you're connecting to is the correct key - that is, it's changed because you're connecting to a server that shares an IP address with a server on a different network or VPN, or you've reinstalled or rekeyed the server in question - here's the quick sed command to "forget" the old key:

coty@jupiter:~$ sed -i".bak" '13d' ~/.ssh/known_hosts

Cisco IOS error: Static entry in use, cannot remove

This is a Cisco 2951 ISR running 15.0(1r)M16 (c2900-universalk9-mz.SPA.154-1.T.bin)

If a NAT entry is in use, you'll get an error:
router(config)# no ip nat inside source static tcp 192.168.30.5 80 interface GigabitEthernet0/1 12345
%Static entry in use, cannot remove

Clear the NAT translations first:
router(config)# do clear ip nat translation *

Then try again:
router(config)# ip nat inside source static tcp 192.168.30.5 80 interface GigabitEthernet0/1 12345
router(config)#

update apt-get's slow us.archive.ubuntu.com server setting

sudo sed -i 's`http://us.archive.ubuntu.com/ubuntu/`http://us-east-1.ec2.archive.ubuntu.com/ubuntu/`g' /etc/apt/sources.list