February 16th, 2009
Netsh.exe can be very useful in viewing and editing TCP/IP settings from the command line.
To view your TCP/IP settings in a Command Prompt, type
netsh interface ip show config
To configure an IP address and other TCP/IP related settings:
netsh interface ip set address name="Local Area Connection" static 192.168.1.101 255.255.255.0 192.168.1.1 1
To obtain an IP address from a DHCP server:
netsh interface ip set address "Local Area Connection" dhcp
To configure DNS and WINS addresses:
netsh interface ip set dns "Local Area Connection" static 192.168.0.200
and this for WINS:
netsh interface ip set wins "Local Area Connection" static 192.168.0.200
Or, to dynamically obtain DNS settings:
netsh interface ip set dns "Local Area Connection" dhcp
As a bonus tip, you can export your IP settings to a text file using the following command:
netsh -c interface dump > c:IPSettings.txt
To import the settings, type
netsh -f c:IPSettings.txt
OR
netsh exec c:location2.txt
You can use this to quickly switch between different settings.
Posted in howto, windows | 1 Comment »
December 5th, 2008
psexec \\remotepc -u Domain\User -p Password msiexec /i "pathto.msi switches"
Posted in howto, windows | No Comments »
November 6th, 2008
This one had been bothering me for quite some time now. Ever since upgrading from ISA 2004 to ISA 2006, I noticed that the context menu item for editing the per rule HTTP Filter settings was missing from all the web publishing/access rules.

The only way I could edit these settings was the HTTPFilterConfig.vbs script which is included in the ISA SDK. This script lets you import the filter settings to a rule from an XML file or export them to an XML file from a rule for which the filter settings have already been modified. This works quite well but is a hassle every time a rule needs to be modified.
It turns out that the Web Proxy Filter must be enabled for the HTTP protocol. Without this enabled, you loose the HTTP filter configuration menu. If you dont want to enable the Web Proxy filter, as it may not work well with some sites, enable it temporarily, change the HTTP filter setting and then disable it. The HTTP filter settings will still remain active. Problem solved.


Posted in howto, windows | No Comments »
October 16th, 2008
By default CentOS allows ssh access to all users who can authenticate with the server. This can be a security risk especially when you have setup the server to authenticate against an Active Directory domain. In this case all the users on the domain can login via ssh to your CentOS server. You can, however, very easily restrict logins to specific users, computers, or even users on specific computers.
To do this, edit /etc/ssh/sshd_config by adding the AllowUsers directive in the following format.
AllowUsers user@host
This allows the user ‘user’ to login at the host named ‘host’. Multiple users can listed by separating each with a space. You can also use * to specify wildcards. You can also specify IP addresses and ranges using *.
AllowUsers *@192.168.1.* johndoe@192.168.1.3
This will allow all users to log into all computers with address starting with 192.168.1 and the user johndoe to log only into the with IP address 192.168.1.3.
This will work for other Linux OSes as well.
Posted in *nix, howto | No Comments »
October 15th, 2008
The only working way I’ve found is to first insert and image into a google document and then copy/pasting it into gmail in Rich Text mode. It’s as simple as that.
Posted in web | 1 Comment »