33dots

Posts RSS Comments RSS

Assigning Static IP addresses to computers while using DHCP in Linksys WRT54G2

It is sometimes necessary to have computers with Static IP even if you are under DHCP, one such instance is when you are doing port forwarding to a machine for some application.

The Linksys WRT54G2 does not support DHCP reservations (A mechanism by which you can lease predefined IP to client computers based on their MAC address)

However, a workaround is available.

In the Basic Setup page of the WRT’s administration webpage,
Enable DHCP and specify a DHCP range by giving a Staring IP Address and the Number of DHCP users. (say, 10.0.0.2 and 100). The remaining addresses [ie 10.0.0.102 - 254] are not used in DHCP and can be used as static IPs for client computers .

Now manually set static IPs in each client computer.

The problem with this approach is that you have to manually set IPs in each of the client computers, whereas with DHCP reservations, you just set them to use DHCP and the same IP will be leased to them automatically every time.

The best alternative will to update the WRT with open source fimrware DD-WRT. DD-WRT has support of DHCP reservations.

No responses yet

Adding an initialization file for XBoard in Linux

You can set the different startup options as X resources (typically in your .Xdefaults file) or in a file named XBoard in your home directory.
A typical option sometimes has two names; a short name and a long name. Short names cannot be specified in the initialization file, they are used by typing them on the shell command line you use to start xboard.

The format of the file contains, one option per line like,
XBoard*longOptionName attributeIfAny

For Boolean options it is,
XBoard*longOptionName: True

My XBoard file,

[tony@localhost ~]$ cat XBoard
XBoard*searchDepth 5
XBoard*searchTime 0:5
XBoard*showThinking: True
XBoard*showCoords: True
XBoard*internetChessServerInputBox: True
XBoard*ponderNextMove: False 

The full list of available options can be found in man Xboard

If you play over ICS (Internet chess server) frequently, you could create a .icsrc file in your home directory so that XBoard feeds the file’s contents to the ICS as commands upon connecting.
Usually the first two lines of the file should be your ICS username and password. This will automatically log you in to ICS upon connecting.

Here is mine,

[tony@localhost ~]$ cat .icsrc
tonyjjose
myPassword
games

The third command games just prints a list of the ongoing games.

Btw it may be also very useful to create an application launcher (shortcut icon).
In GNOME, Rightclick on Desktop > Create Launcher
Type : Application in Terminal
Name: XBoard ICS
Command: xboard -ics -icshost freechess.org

Ok done. 1.E4 E5! ;)

One response so far

To test the speed of your DNS server

Modern webpages reference resources from many domains. So time for DNS lookups can cause significant delay in browsing.

These days i was having slow internet speeds, and i suspect its due to bad performance by my ISP’s DNS server.

The speed of DNS lookup can be determined by the dig command combined with a time command,

[root@localhost ~]# time dig @10.0.0.1 www.yahoo.co.in
......
rc.a07.yahoodns.net.    148     IN      A       87.248.120.14
.....
real    0m0.607s
.....

replace 10.0.0.1 with your DNS server’s IP address.

you could also use nslookup instead of dig

[root@localhost ~]# time nslookup www.yahoo.co.in 8.8.8.8
.....
Address: 87.248.120.148
.....
real    0m0.366s
.....

Here i am checking the resolution time taken from GoogleDNS

You could compare the performance of your DNS server with some of the free open DNS servers like, GoogleDNS(8.8.8.8), OpenDNS(208.67.222.222)

Make sure you test with less commonly used domains as the common ones will be already cached in the DNS server’s cache.

No responses yet

Mount an .iso image in linux

I just wanted to extract the USB boot image from the .iso of the CentOS DVD image that i downloaded.

Now i mounted it by

[root@localhost ~]# mkdir /mnt/iso
[root@localhost ~]# mount /home/dloads/CentOS-5.2-i386-bin-DVD.iso /mnt/iso/ -t iso9660 -o loop,ro

ro mounts it read only so that we dont accidentally make no changes.
loop is required to mount it as a loop device (so as to access the file as a block device).

No responses yet

Wordpress error “Is its parent directory writable by the server?”

I was not able to upload images to my wordpress post after i transferred my entire wordpress to a new host. The error returned was
“Unable to create directory /blog/wp-content/uploads/2010/xx. Is its parent directory writable by the server?”

Tried changing the permission of the wp-content folder and its subdirectories to 775 and then to 777.

[jaguars]$ chmod -R 775 wp-content/
......
......
[jaguars]$ chmod -R 777 wp-content/

But both didnt work.. :(

Next,
The wordpress upload folder was set to /blog/wp-content/uploads in the Settings > Miscellaneous
Changed this to blog/wp-content/uploads (removed the ‘/’ before blog)
Now uploading works, but still there was a problem. The files are uploaded and saved to new folder /blog/blog/wp-content/uploads [two 'blog' in the path.]

Finally, changed the upload folder to wp-content/uploads in the Settings > Miscellaneous
Everything works perfect now.

I changed back the permission setting to 755

[jaguars]$ chmod -R 755 wp-content/ 

I guess the misconfiguration happend because, in my earlier installation, wordpress was installed into root. and in here to the /blog directory.

No responses yet

« Prev - Next »