Monthly Archives: March 2011

openvpn on openwrt

I want to be connected to my home network from outside word.

Here is the how to:

and If I want to access internet from my home, here is “Routing all client traffic (including web-traffic) through the VPN” in the same document.

But remember to regard these points:

ip_forward should be set to 1.

and put these lines /etc/firewall.user to enable nat

iptables -t nat -A POSTROUTING -s x.x.x.x /24 -o br-lan -j MASQUERADE
iptables -I FORWARD -s x.x.x.x/24 -j ACCEPT

First steps in SPA 3102


I have just bought a Sipura SPA-3000 from ebay, 20 Euros. If I could wait I think I could buy it some 5 Euros cheaper.

Here are the initial steps for its configuration:

1. Connect Lan port of spa 3000 to the router, phone to a phone and line to PSTN line.

2. Using the connected phone, press 4 times *. The voice menu will be played.

3. press 111 to set static address, 121 to set network mask

4. you should be able to access its website. You can set DNS

5. I could easily connect to my jumblo and 1und1 account with these settings: Here I bring 1und1 settings:

6. in line1 menu:


Make Call Without Reg: yes

Ans Call Without Reg: yes

Register: yes

Register Expires: 3600

Display Name:  name

USer ID: 49xxxxxxxxxxx

password: xxxxxx


in SIP advanced menu, in NAT Support Parameters:

STUN enable: yes

STUN server:


that is it, next time I restart it, I can see in info that Line1 is registered and I can call from and call to it.


autorun empathy with wicd

I think I have not written that I have moved to wicd from network manager. It looks much simpler and more efficient.

I want to bring my empathy when network is connected. This is how I have done it:

1. create /usr/bin/runEmpathy as:

sudo -u smirzai /usr/bin/empathy -h &


2. Add this line in related section for desired wireless in file /etc/wicd/wireless-setting.conf:

afterscript = /usr/bin/runEmpathy


ca certificate libcurl in openwrt

It seems that libcurl in openwrt is not configured to look for ca certificate in path. CURL_CE_BUNDLE environment variable is only used by curl and not libcurl and there is no environment variable for CA_PATH.

Here is my solution:

1. find curl package in feeds/packages/lib/curl

2. move it to packages/curl

3. change Makefile. add line:


to CONFIGURE_ARGS += section

4. recompile

5. copy /bin/brcm-2.4/libcurl_7.21.3-1_brcm-2.4.ipk to openwrt

6. opkg update libcurl_7.21.3-1_brcm-2.4.ipk

7. now the certificates in /etc/ssl/certs will be used.

Wireless problem in ubuntu

I don’t know why, but it happens time to time. Suddenly wireless stops to connect. This time I could see all of the networks but was not able to connect to them. Some wrong “Bad password” problem appeared.

Here is a fast work around:

make sure that eth0 is properly defined in /etc/network/interfaces.

sudo apt-get remove wpa-supplicant

ifdown eth0

ifup eth0

sudo aptget install wicd


should be fixed now.


Experience with Asus WL-500g

This is my first technical post in my technical blog.

I have recently bought an  Asus WL-500g V2 premium. I selected it because of these unique features:

  • 32 MB RAM
  • 8 MB  Flash
  • 240 Mhz CPU
  • 2 USB ports
  • Good price

I bought it some 25 euros from ebay.

Till now, I have flashed it with openWRT, installed ntfs-3g and samb, so I can use it as a media server