LogMeIn and Windows7

Windows 7 won’t work with the standard LogMeIn installer, but the manual installation does work. Here’s the run-through:

1. Download: https://secure.logmein.com/logmein.zip

2. Extract the archive.

3. Start->All Programs->Accessories, right-click on Command Prompt and select “Run as Administrator.”

4. Run: cd\users\<user name>\desktop\logmein\x86 (NOTE: if running 64-bit Windows change the ‘x86′ to ‘x64′)

5. From the prompt, run “logemein install

6. The installer will run and you should then see the tray icon when it’s finished. Right click on the icon and select ‘Open LogMeIn…

7. Your browser will open to an error. Click OK.

8. Go to this address: https://127.0.0.1:2002/

9. Ignore/accept the certificate warning.

10. When prompted, enter your user credentials and then your LogMeIn credentials.

Credit

Posted in Tips, Windows | Tagged | Comments closed

BlackBerry Tethering in Windows Vista

I am a subscriber of Verizon Wireless’ BroadbandAccess Connect service, which allows me to use my BlackBerry 8703e as a wireless modem via a USB data cable. Under Windows XP, this is accomplished with Verizon’s VZaccess software package, which automatically configured the BlackBerry as a modem, sets up the appropriate dialing settings, and offers an easy-to-use interface for connection to the WWAN.

Unfortunately, neither BlackBerry or Verizon offer software for Vista yet. To get the BlackBerry working as a modem, a workaround is required:

First, download and install the BlackBerry Desktop Manager software (for XP, I know). After installation, plug in your BlackBerry and start up the software for the first time. Open the Options -> Connection Settings… window and set the connection to USB. Plug in the BlackBerry, enter your password if applicable, and Vista will find the device and install a “standard modem”.

  1. Open the Control Panel
  2. Network and Internet
  3. Connect to a network
  4. Set up a connection or network
  5. Set up a dial-up connection
  6. Select Standard Modem
  7. Dial-up phone number is #777, username is phonenumber@vzw3g.com, password vzw
  8. Connect!

You should see the Modem Mode Enabled message on the screen of your BlackBerry and Vista should report a network connection established.

I have noticed that this is very flaky. Make sure you disconnect correctly: disconnect the dial-up connection, then close Desktop Manager, then unplug the phone. If you don’t do it in that precise order, you will BSOD and be forced to restart Vista.

Verizon Wireless says support for Vista for their VZaccess and BlackBerry Desktop software is coming soon. Until then: best of luck!

Posted in Tips, Windows | Comments closed

Expanding a Virtual Disk in VMware ESX Server

It may be necessary at some point to increase the size of a virtual disk on a guest OS. Here’s how to do it without creating a new disk and migrating the data manually:

  • Shut down the VM
  • Expand the virtual disk
    • Log into the ESX server via ssh
    • Navigate to the guest’s storage location (ex: /vmfs/volumes/cx300/guest)
    • Use the vmkfstools command to expand the disk. For example:
  • vmkfstools -X 8g guest.vmdk
  • Boot from the gparted LiveCD
    • Download the .iso to your desktop
    • Mount it on the virtual CD-ROM device
    • Select CD-ROM from boot menu
    • Select Xvesa from the boot options menu -> done
    • Select defaults from the remainder of the options
  • Extend the partition
    • Use the gparted GUI to resize the ext3 partition
  • Reboot into Linux
Posted in Linux, Open Source, Tips | Comments closed

Squid Caching Appliance

Content Caching with Squid

This guide will present a solution to network bandwidth and latency issues using an application-layer solution that is completely transparent at the network layer.

Objective

New web-based deployment architectures have placed a strain on wide area network connections. I am attempting to alleviate some of this pain by providing a simple-to-use virtual appliance that transparently caches files on the local area network for increased bandwidth, all without the need to configure any settings on the client workstations.

Network Configuration

Hardware Requirements

The remote location must have a Cisco router supporting WCCP v2. The virtual machine expects to receive network configuration information via DHCP.

Configuration

Here is the basic Cisco router IOS configuration:

ip cef
ip wccp version 2
ip wccp web-cacheinterface FastEthernet0
ip wccp web-cached redirect in
end

Setup Instructions

Requirements

The cache appliance is completely open-source software housed within a VMware virtual machine. This enables the solution to be implemented on existing hardware with no additional licensing costs.

VMware Player runs the appliance as an application in the foreground, so if the window is closed the machine stops running. VMware Server sets the machine up as a service to execute in the background whenever the machine is on. Hardware Requirements

  • PC running Windows or Linux (capable of running VMware Player or Server)
  • 256 MB+ Free RAM
  • 1 GB+ Available Disk Space

Installation Instructions (VMware Server)

  1. Download VMware Server (146MB) here.
  2. You may register for your free serial numbers here.
  3. The installer will walk you through the setup. You may choose to accept all default settings.
  4. Run the caching appliance (we will create one below).
  5. The “Server Console” window will appear, click the “Play” button to power on the virtual appliance. The console window will display the startup process. When prompted, enter the router IP address and identifier
  6. When the login screen appears, the caching appliance is up and running
  7. You may close the Server Console window at this point and the virtual appliance will continue to run in the background.
  8. To power down the appliance, use the “Stop” button at the top of the Server Console menu

Operating Instructions

  • During boot, you will be prompted for:
    • The router’s IP address
    • The router’s identifier (as displayed on the router using show ip wccp)
  • You can verify the router has seen the caching appliance:
show ip wccp
  • You can log into the caching appliance with:
    • Username = root
    • Password = squid
  • You can see statistics of the cache performance by running the following command:
sudo cat /var/log/squid/access.log | calamaris -S0 | less

Creating the Virtual Machine from Scratch

  • Create a new virtual machine with all the default settings, except as noted below:
    • Typical configuration
    • Guest OS > Linux, Version > Ubuntu
    • VM name and location are your choice
    • Bridged networking
    • Download the Ubuntu 6.06 x86 server CD image from here.
  • Mount the CD image as virtual machine’s optical drive.
  • Power on the machine.
  • Select “Install to the hard disk”
  • Proceed through the installation process, following the on-screen instructions and accepting all default settings, except as noted below:
  • Change the hostname to something more descriptive, like “squid”
  • User ? squid, Password ? squid
  • Hostname ? squid
  • After reboot, sign in.
  • Remove the CD-ROM line and uncomment the universe lines in /etc/apt/sources.list:
sudo vi /etc/apt/sources.list
sudo apt-get update
  • Install server software (answer Y when prompted):
sudo apt-get install ssh squid squid-prefetch calamaris
  • Create boot configuration script for squid settings:
sudo vi /usr/local/bin/configure_squid.sh
#!/bin/bash
GATEWAY=`route | grep "^default" | awk '{print $2}'`
LOCALIP=`ifconfig eth0 | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{print $1}'`

# Create the custom squid.conf file, backup the current to squid.conf.old
cp /etc/squid/squid.conf /etc/squid/squid.conf.old
cat > /etc/squid/squid.conf <<END
http_port 3128
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
wccp_router $GATEWAY
visible_hostname $HOSTNAME

cache_mem 64 MB
cache_dir ufs /var/spool/squid 6000 16 256
refresh_pattern . 0 20% 8640 ignore-reload
maximum_object_size 64 MB
hierarchy_stoplist cgi-bin
acl QUERY urlpath_regex cgi-bin
no_cache deny QUERY

acl www_ports port 80
acl localhost src 127.0.0.1/32
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl CONNECT method CONNECT
acl PURGE method PURGE

http_access allow manager localhost
http_access deny manager
http_access allow PURGE localhost
http_access deny PURGE

http_access allow all all
END

# Set up the GRE tunnel
iptunnel add gre1 mode gre remote $GATEWAY local $LOCALIP dev eth0
ifconfig gre1 127.0.0.2 up

# Enable packet forwarding
sysctl -w net.ipv4.ip_forward=1

# Create firewall rule
iptables -A PREROUTING -i gre1 -p tcp -m tcp --dport 80 -t nat -j DNAT --to-destination $LOCALIP:3128

# Restart squid to apply all settings
/etc/init.d/squid restart
  • Change permissions:
chmod +x /usr/local/bin/configure_squid.sh
  • Add a line to /etc/rc.local to have the configuration script run on boot:
sudo vi /etc/rc.local
/usr/local/bin/configure_squid.sh
  • Clean up apt cache:
sudo apt-get clean
  • Remove eth0 entry in /etc/iftab to prevent a new MAC address from messing up configuration:
sudo vi /etc/iftab
  • Remove /etc/resolv.conf to prevent DNS conflicts:
sudo rm /etc/resolv.conf
sudo touch /etc/resolv.conf
  • Remove squid logs:
sudo rm /var/log/squid/*
  • Halt virtual machine.
  • Edit .vmx file and remove the following lines:
ethernet0.generatedAddress
ethernet0.generatedAddressOffset
uuid.location
uuid.bios
  • Use 7zip to make a snapshot of the directory containing .vmx and .vmdk files (self-extracting .exe, maximum 7z compression).

References

  • http://www.sublime.com.au/squid-wccp/
  • hr_url=http://www.reub.net/node/3

Statistics

You can gather useful statistics through a cron job that runs the following command:

cat /var/log/squid/access.log | calamaris -S0 | less

To Do

Some ideas on how to expand this project:

  • Active status display at console prompt: include cache status, bandwidth savings, tail logs, IP address, etc.
Posted in Linux, Open Source, Tips | Comments closed
  • Archives