Friday, November 30, 2007

Computer stuff

I just appropriated a new (to me) computer from my job. They love to just "dispose" of their older computers so if it's worth it, I take them home and put them to good use =]

I "appropriated" a Dell server, 2.8GHZ HT machine with 2 40 gig HDs and a Gig of RAM. I thought this would be a good time to replace my Linux server which is a 1.2Ghz PIII. This server acts as a firewall/gateway for the other computers on my network. It's also my webserver http://gypsy.sytes.net/ which isn't always up, but I'll get into that later.

I have DSL at home (6M/768K) which isn't bad, it's pretty quick normally, with a dynamic IP# and I use a Dynamic nameserver to get my gypsy.sytes.net address. I use Roaring Penguin's PPPOE software to connect, which works great, but my problem lies when my IP# changes and I lose my name on the machine. It's difficult to get it back again, I've written scripts to try to bring the name back to the current IP# but it always wants to hang on to the old IP. I'm hoping with this new modem, and a new server, I might be able to get this to work right. If I'm still having no luck, I'll call the TELCO and get a Static IP ($5/mo extra) and use that instead. Here is one script I use

#!/bin/sh

RMM="/sbin/rmmod"
MDP="/sbin/modprobe"
START="/usr/sbin/adsl-start"
STOP="/usr/sbin/adsl-stop"

EXTIF="ppp0"
EXTIP="`/sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"
HOSTIP="`/usr/bin/host gypsy.sytes.net | awk '{print $4}'`"
#TIME="`/bin/date '+%m-%d-%Y %w %T'`"


if [ "$EXTIP" != "$HOSTIP" ]; then

/usr/sbin/adsl-stop
NPID="`ps aux | grep noip2 | grep nobody | awk '{ print $2 }'`"
/usr/local/bin/noip2 -K "$NPID"

/usr/sbin/adsl-start
/etc/rc.d/rc.firewall
/usr/local/bin/noip2
/usr/local/bin/dynubasic.sh
fi
exit 0


Now this bash script gets the IP#s of my ACTUAL IP and the one that's attached to gypsy.sytes.net and compares them, if they're different, it tries to get it attached to the new one. This script isn't working right. If I get this to work, I'll post what I did.

DSL Modem trouble

I fix computers as a side job (UTT). I thought it would be good to blog about this, maybe I can remember in the future how I fixed something! =]

I went over to a friends house to fix his computer. He said he had no internet connection. He has DSL with our local TELCO and the old Westell modem that doesn't have the PPPOE in the modem. He had contacted tech support twice already. I fiddled around with it and figured out that he was getting a connection. I could ping in DOS, do a correct nslookup even ftp into my machine at home. But, the problem was that he had no web browsing capabilities.

I did an ipconfig /all in DOS and noticed that his netmask was 255.255.255.255 which is incorrect. It should have a 0 as the last one. I contacted tech support yet again, got to the 2nd tier and they said he had a good connection, they even went so far as to suggest I reload his entire computer to it's original format. Ugh, no way...That takes hours. I had a feeling that the modem was at fault. It just so happened that I had a newer modem in my car. Another friend had given it to me ( I also have the old Westell modem at home), so I hooked it up, logged into the built in webserver and plugged in his login info, and BEHOLD!!!! It works great now. I managed to scam another free modem for myself from work, so I can try it at home.

I dunno if anyone will benefit from this, but it was interesting, because AT&T said that is WASN'T the modem. But that netmask was really suspicious, and the settings weren't hard coded in the networking settings. It was all supposed to be DHCP. So the address wasn't set by us...It was getting the wrong one from the TELCO. Probably going to be one of the last times I call for tech support. I don't for my personal (they don't support Linux), I just go with my gut feeling =]

Cheers!