Never ending headache … disconnect problem again

The VPN connection on Vista drops after every 5-10 minutes idle times ( means no surfing or other net related activities ). Why ? Fuck me if i know. It doesn’t matter over wireless or LAN, wired connection breaks all the time too.

And the employees in uni are reporting disconnecting problem on XP with their home DSL … How could i fix it, given that i’ve never ever used a dsl line before ? Otherwise reproducing disconnecting problems is very time consuming and boring.

Writing guidelines

This is not mine. One day I stumpled upon Prof. Mankiw’s blog. He composed some very good writing guidelines for economic reports ( it should be applied for general writing as well ):

  • Stay focused. Remember the take-away points you want the reader to remember. If some material is irrelevant to these points, it should probably be cut.
  • Keep sentences short. Short words are better than long words. Monosyllabic words are best.
  • The passive voice is avoided by good writers.
  • Positive statements are more persuasive than normative statements.
  • Use adverbs sparingly.
  • Avoid jargon. Any word you don’t read regularly in a newspaper is suspect.
  • Never make up your own acronyms.
  • Avoid unnecessary words. For instance, in most cases, change
    o “in order to” to “to”
    o “whether or not” to “whether”
    o “is equal to” to “equals”
  • Avoid “of course, “clearly,” and “obviously.” Clearly, if something is obvious, that fact will, of course, be obvious to the reader.
  • The word “very” is very often very unnecessary.
  • Keep your writing self-contained. Frequent references to other works, or to things that have come before or will come later, can be distracting.
  • Put details and digressions in footnotes. Then delete the footnotes.
  • To mere mortals, a graphic metaphor, a compelling anecdote, or a striking fact is worth a thousand articles in Econometrica.
  • Keep your writing personal. Remind readers how economics affects their lives.
  • Remember two basic rules of economic usage:
    o “Long run” (without a hyphen) is a noun. “Long-run” (with a hyphen) is an adjective. Same with “short(-)run.”
    o “Saving” (without a terminal s) is a flow. “Savings” (with a terminal s) is a stock.
  • Buy a copy of Strunk and White’s Elements of Style. Also, William Zinsser’s On Writing Well. Read them—again and again and again.
  • Keep it simple. Think of your reader as being your college roommate who majored in English literature. Assume he has never taken an economics course, or if he did, he used the wrong textbook.

The beauty of VPS

I did a terrible mistake two days ago trying to compile and install the glibc library. The process failed and left me out of the cold without any option to restore back to previous state. Every commands except cd threw this back at me :

relocation error: /lib/tls/libc.so.6: symbol _dl_out_of_memory, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference

If I were on a dedicated server, there would be an option to reformat the disk, reinstall the os then restore the backed up databases & files (thank god i did do back up, not often but enough to save my ass some times). But that would take at least a day to complete: 12 hours waiting for the support to reformat & reinstall OS, plus the time you need to download off-site backups and restoring them. The latter is definitely not a pleasant experience.

The VPS technology did save me this time: a few click on the VPS control panel and after a cup of coffee everything went back to normal. Not the state right before the glibc corruption but 5 days ago (i should do backup more frequently).

Another strong point of a VPS is scalability. Not the scalability Amazon AWS offers (it’s on a complete different level). I’m talking about the scale of the gap between a shared hosting environment and a dedicated hosting environment. The server can gradually grow with your site, although not instantly, and you can move your server image around if you want.

So what’s the point ? The point is: virtualization & cloud computing has unquestionably very bright future !

AmazonAWS speedtest between USA and Europe datacenter

Amazon has introduced a new API for S3 to store data in it’s Europe datacenter ( with higher pricing, of course ). I decided to make a small test to see if the higher price worths the money, and here is the result:

lamnk@lamnk:~> wget http://testmeplease-eu.s3.amazonaws.com/100mb.bin
–17:28:42– http://testmeplease-eu.s3.amazonaws.com/100mb.bin
=> `100mb.bin’
Auflösen des Hostnamen »testmeplease-eu.s3.amazonaws.com«…. 87.238.86.131
Verbindungsaufbau zu
testmeplease-eu.s3.amazonaws.com|87.238.86.131|:80… verbunden.
HTTP Anforderung gesendet, warte auf Antwort… 200 OK
Länge: 104.857.600 (100M)

100%(==================================>)
104.857.600 9.16M/s ETA 00:00

17:28:53 (9.93 MB/s) – »100mb.bin« gespeichert [104857600/104857600]

lamnk@lamnk:~>
lamnk@lamnk:~> wget http://testmeplease-us.s3.amazonaws.com/100mb.bin
–17:29:02– http://testmeplease-us.s3.amazonaws.com/100mb.bin
=> `100mb.bin.1′
Auflösen des Hostnamen »testmeplease-us.s3.amazonaws.com«…. 72.21.211.247
Verbindungsaufbau zu
testmeplease-us.s3.amazonaws.com|72.21.211.247|:80… verbunden.
HTTP Anforderung gesendet, warte auf Antwort… 200 OK
Länge: 104.857.600 (100M)

100%(==================================>)
104.857.600 580.40K/s ETA 00:00

17:32:02 (571.80 KB/s) – »100mb.bin.1« gespeichert [104857600/104857600]

lamnk@lamnk:~>

So for almost double the price (10 cent in US versus 18 cent in Europe pro GB/month storage) it really worths considering if the target audience is in Europe

Cisco VPN now runs on linux 64 bit systems

Errm … with a patch. Cisco hasn’t released a new version for Linux yet.

Quick guide: ( I assume you knew all the requirements to install the Cisco client )

  • Go to the extracted vpn directory
  • wget http://tuxx-home.at/projects/cisco-vpnclient/cisco_skbuff_offset.patch
  • patch < cisco_skbuff_offset.patch
  • sudo ./vpn_install

That’s it.

Cisco VPN Client: Reason 412 – The remote peer is no longer responding

The error: "Secure VPN connection terminated locally by the Client. Reason 412: The remote peer is no longer responding" means the software VPN Client detected that the VPN server is not responding anymore and deleted the connection. This is caused by several different reasons, for example:

  • The user is behind a firewall that is blocking ports UDP 4500/500 and/or ESP.
  • The VPN client is using connecting on TCP and the default TCP port 10000 for NATT is blocked.
  • The internet connection is not stable and some packets are not reaching the VPN concentrator/server or the replies from the server/concentrator aren’t getting to the client, hence the client thinks the server is no longer available.
  • The VPN client is behind a NAT device and the VPN Server doesn’t have NAT-T enabled. In this case the user will not be able to send or receive traffic at all. It will be able to connect but that’s all. After some time the software client deletes the VPN tunnel.

Suggested solutions:

  • If you are using wireless, try to connect with cable
  • Turn your firewall off, then test the connection to see whether the problem still occurs. If it doesn’t then you can turn your firewall back on, add exception rules for port 500, port 4500 and the ESP protocol in your firewall
  • Turn on NAT-T/TCP in your profile ( remember to unblock port 10000 in your firewall)
  • Edit your profile with your editor and change ForceKeepAlive=0 to 1

How to fix Cisco VPN Client error 442 on Windows Vista

Update 2010-10-31: If you use windows 7 and latest version of Cisco VPN Client (like 5.0.06 or 5.0.07) and have this error then you can quickly fix it by turning off Windows Internet Connection Sharing (ICS) service:

  • Press Windows and R key to open Run window, type in services.msc
  • Stop the Cisco Systems … service
  • Stop the Internet Connection Sharing (ICS) service
  • Right click on ICS service and choose Properties. Then change Startup type to Disabled or Manual.
  • Start Cisco Systems … service
  • Done. Now create a VPN connection, error 442 no more !

If it doesn’t help then try to remove Cisco VPN, update Deterministic Network Enhancer, and reinstall Cisco VPN.

Please ignore the old post since it’s not up2dated:

Everyone has dealed with Cisco VPN Client on Vista probably knows the notorious Error 442 – Failed to enable virtual adapter. AFAIK this is a bug from Cisco that stays unfixed for at least 5 months (from the version 5.0.00.0340 released on May 2007 until now). Whether it is Cisco or Microsoft to point the finger at, i really don’t know.

So … you probably already tried this work-around suggestion from Cisco’s release notes:

Run cmd as Administrator and execute the following command:
reg add HKLM\System\CurrentControlSet\Services\Tcpip\Parameters /v ArpRetryCount /t REG_DWORD /d 0 /f

It just does not work ( at least every time i faced Error 442 ). What you should do is:

  • Remove the client
  • Activate the real Administrator account ( for detailed howto see this post )
  • Restart, then log into the administrator account
  • Install the file as normal ( right-click on it, choose “Run as Administrator”)
  • After the installation finishes, restart again.

The client should work now. If not try to remove the Deterministic Network Enhancer protocol first, then reinstall VPN. Have patience, you will need to restart your computer sometimes.

Some people say the removal of Microsoft SQL do the trick (strange, erh ?), or simply turn on Media Sharing in the Network and Sharing Center. I haven’t tried this, so if it fixes your problem, then good for you.

If you could post your result here, then i am very appreciated :-)

Users’ comments:

From Nathan Le:

Under Services, I disabled Internet Connection Sharing (ICS) and then reboot. It then worked like a charm. By the way, I am using Windows Vista and Cisco VPN Client version 5.0.03.0560. Hope this helps.

From Chkrata:

The fix for 442 is simple – just tick ‘Allow Local LAN Access’ on the Transport tab of connection properties.

From fakh:

Many reasons that can cause this error, for instance if you have mcafee installed make sure you removed the NDIS filter under network, adaptors, choose the cicso vpn go to properties and uncheck NDIS.

From Chris:

The problem exists with MS Network Monitor and Vista. However, simply uninstalling NetMon will not solve the problem. Before uninstalling NetMon, run “nmconfig /uninstall” from the directory the application is installed. Once this is done you can uninstall Network Monitor. Reboot your system and all is right in the world!

From Tim:

I had this same problem start out of nowhere. After coming to this site and seeing some of the fixes, all I did was open C:\Program Files\Cisco Systems\VPN Client, right clicked on ipsecdialer.exe and vpngui.exe and clicked properties. I set both to run in xpSP2 compatibility mode and run as administrator. Problem was immediately fixed, no reinstallation was necessary and no DNE update was necessary. But yes I have to agree to let it run each time I start it.

Update: Updating DNE solves the problem indeed (uninstall VPN, get the latest DNE driver at deterministicnetworks.com, install it and then install VPN again). Deterministic Networks was acquired by Citrix, it’s site is redirected to Citrix’s

Update: If you happen to use the latest version (5.0.04.0300, as of Nov 2nd 2008) and still have this 442 error, uninstall the client and use an older version e.g. 5.0.03.0560

Update: In case the problem is stubborn and doesn’t want to go away, there is Shrewsoft VPN Client, which is compatible with many types of VPN gateway, and especially, free. It helped me many times when the Cisco client refused to run.

Acer Extensa 5520 wireless problem under linux

This laptop has a Broadcom 4311 wireless adapter and it doesn’t work under openSUSE. An ifconfig eth1 up shows

SIOCSIFFLAGS: No such file or directory

It turns out that we must patch the firmware although the bcm43xx driver is included in kernel 2.6.22:

wget http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o
wget http://linuxwireless.org/download/bcm43xx/fwcutter/bcm43xx-fwcutter.tar.bz2
tar -xzf bcm43xx-fwcutter.tar.bz2
bcm43xx-fwcutter/bcm43xx-fwcutter -w /lib/firmware wl_apsta -3.130.20.0.o

Reboot, and voila … there is wireless

More info about this problem at the linux driver homepage

openSUSE 10.3 typopgraphy is suprisingly good

I must say incredible good looking. Even better than Windows typography. Heck, if Ubuntu’s fonts were this good … Maybe because of the 19″ monitor ?

The only thing you need to do is to install MS font pack and the default dpi setting need to be tuned. But it looks so good that I’m thinking of switching to openSUSE now :P

Update: I can make the fonts on Ubuntu look like in Windows now, we just need to turn anti-alias off in /etc/fonts/local.conf

Update: it seems not turning anti alias off will solve the problem …

Can not compile Cisco VPN client on openSUSE 10.3 64bit

Update: as i guessed, this appears to be a bug from revision 4.8.00.0640, the older 0490 works just fine on my Ubuntu 64 bit (with the patch of course)

Just got the new openSUSE 10.3 on my work PC with 64 bit kernel set up and like i expected, there are errors during compiling the kernel module:

Making module
make -C /lib/modules/2.6.22.5-31-default/build SUBDIRS=/home/xn1/vpnclient modules
make[1]: Entering directory `/usr/src/linux-2.6.22.5-31-obj/x86_64/default'
make -C ../../../linux-2.6.22.5-31 O=../linux-2.6.22.5-31-obj/x86_64/default modules
CC [M] /home/xn1/vpnclient/interceptor.o
In file included from /home/xn1/vpnclient/Cniapi.h:15,
from /home/xn1/vpnclient/interceptor.c:34:
/home/xn1/vpnclient/GenDefs.h:110:2: warning: #warning 64 bit
/home/xn1/vpnclient/interceptor.c: In function ‘recv_ip_packet_handler’:
/home/xn1/vpnclient/interceptor.c:639: warning: assignment makes integer from pointer without a cast
/home/xn1/vpnclient/interceptor.c:660: warning: passing argument 2 of ‘CniNewFragment’ makes pointer from integer without a cast
/home/xn1/vpnclient/interceptor.c: In function ‘do_cni_send’:
/home/xn1/vpnclient/interceptor.c:778: error: invalid operands to binary -
make[4]: *** [/home/xn1/vpnclient/interceptor.o] Fehler 1
make[3]: *** [_module_/home/xn1/vpnclient] Fehler 2
make[2]: *** [modules] Fehler 2
make[1]: *** [modules] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.6.22.5-31-obj/x86_64/default'
make: *** [default] Fehler 2
Failed to make module "cisco_ipsec.ko".

Google doesn’t help at all :-(

Update: not only openSUSE, the new Gutsy 64 bit falls for this too