Enable WS 2008 TCP TOE

In Windows Server 2008 R2 the TCP Offload Engine TOE will be enabled by default, however WS2008 is shipped turned off for some reason.

To Enable it, run the following netsh command from a elevated command prompt:
netsh interface tcp set global chimney=enabled

What this does is it moves the processing over to the network adapter, however the NIC needs to have the appropriate capabilities to offload the entire network stack.

Best thing to do is test it first and then implement it.

Also note, don’t bother making this change in a VM guest machine.

Ubuntu Firewall Utility UFW

The default firewall configuration tool for Ubuntu is ufw. Developed to ease iptables firewall configuration, ufw provides a user friendly way to create an IPv4 or IPv6 host-based firewall.

NOTE: ufw by default is initially disabled.

Enable Firewall:
# ufw enable

Turn off firewall:
# ufw disable

Show current status rules:
# ufw status

Allow 80/tcp to any IP on this host:
# ufw allow 80/tcp

Delete above rule
# ufw delete allow 80/tcp

You can also do more complex rules like:
# ufw allow proto tcp from 1.2.3.4 to any port 25

More Info at Ubuntu Documentation:
https://help.ubuntu.com/9.04/serverguide/C/firewall.html

Handy Windows Scripts

How Can I Query Event Logs to Discover Active Directory Information?
http://www.microsoft.com/technet/scriptcenter/resources/qanda/apr09/hey0407.mspx

How Can I Retrieve a List of Unique Users from the Security Event Log?
http://www.microsoft.com/technet/scriptcenter/resources/qanda/oct07/hey1019.mspx

How Can I Backup an Event Log to a Text File?
http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept07/hey0906.mspx

Can I Retrieve Just Failure Events from the Security Event Log?
http://www.microsoft.com/technet/scriptcenter/resources/qanda/oct04/hey1026.mspx

How Can I Determine the Percentage of Free Space on a Drive?
http://www.microsoft.com/technet/scriptcenter/resources/qanda/oct04/hey1013.mspx

The Sudoers file

Sudo (su “do”) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments.

Ubuntu uses the SUDO method, if you want to use sudo and the sudoers file in Debian you will need to install it e.g. aptitude install sudo

Then edit the sudoers file at /etc/sudoers and add users/groups to it for that user/group.

More info at:
Introduction: http://www.sudo.ws/sudo/intro.html
Sample file: http://www.sudo.ws/sudo/sample.sudoers
Another example: http://www.go2linux.org/sudoers-how-to

TAR & GZIP Commands -Tar files /folders and compress

A very common task to do on Linux systems is to backup files and folders to a single zip file.
Another task you might want to do is package up a directory and send to another host.

Here is a great site with examples and explanations on using tar and gzip:
http://www.fluidthoughts.com/howto/tar-gzip/

To backup all the files and folders in my home folder and store them into a folder called backup with a compressed file called homebu.tgz issue the following command:
[email protected]:~$ sudo tar -czvf /home/keith/backup/homebu.tgz /home/keith/

Linux Shred command

Use the Shred command to wipe data in Linux:

$ sudo shred -zn10 /dev/sda # to wipe a partition/drive
$ sudo shred -zn10 -u -v /home/fred/filedoc.txt # to shred and remove a file or files

Shred can be used to shred a given partition or a complete disk. This should insure that no data is left on your disk.