Monday, September 21, 2009

Rsync (Deltacopy) not working...

1-oct-09 I changed the time at which deltacopy runs. In scheduled tasks in windows, quicktoblackhawk was running about 2:30 am which was about 30 minutes or an hour after quicktojupiter was running (I think). I changed it to where quicktoblackhawk runs BEFORE quicktojupiter so that if it were to hang somehow while running quicktojupiter, it would not matter because files would already have been copied to blackhawk by quicktoblackhawk. Getting the files offsite to blackhawk is more important than getting them onto jupiter.

I also changed to 2 hours (instead of 72 hours) the time to allow the task to run. I did this on the settings tab of the scheduled job (stop the task if it runs for...)
-------------------------------------------------------------------------------
21-sep-09 The quickbooks files do not appear to be getting updated nightly as they should from quick at Shamrock to blackhawk at Cotton Plant. The files on blackhawk are now about a week old. But the quickbooks files on jupiter are more or less up to date, so rsync must be successfully copying the qbooks files from quick to jupiter but NOT from quick to blackhawk

When you are sitting at quick and you start the Deltacopy client and you right click on the profile "quick_to_blackhawk" and choose "display run command", this is the result:

Executing: rsync.exe -v -rlt -z --delete "/cygdrive/C/qbooks/" "64.16.231.180::BHserver/qbooks/"
Profile 'quick_to_blackhawk' executed in 16 milliseconds. It ran successfully.

According to the quick deltacopy client, the server is the remote computer; so blackhawk is one server and jupiter is another.

When you look at sceduled tasks on quick, the status of the "quicktoblackhawk" task is "running". There's something wrong with that because it is not supposed to run until 9:30 PM each night. It is now 10:24 AM, so something is wrong there. The status of the "quicktojupiter" task is blank, which I assume means that it is not running which is correct because it's not supposed to run until 2:28 AM every night.

So perhaps the "quicktoblackhawk" task is hung on quick. I will delete the task in scheduled tasks and then re-enter it and see if that causes the qbooks files to be copied to blackhawk tonight.

Monday, June 8, 2009

TurboCAD fixed

I finally got TurboCAD to work again on Blackhawk at Cotton Plant be deleting 2 files that Rip Fowler at TurboCAD tech support told me to delete. Before I deleted the files, I updated the video driver on Blackhawk and that fixed the slow scroll problem but did not fix TurboCAD.

Rip's email is below:

Most likely there is some sort of incompatibility with your video card.
I would recommend updating the drivers. If updating the drivers to your
video card does not help you will need to delete two files.
Imagmanager.dll and tcimage.dll

Imagemanager.dll is located C:\Program Files\IMSIDesign\TCW16\Program

And tcimage.dll is here C:\Program Files\IMSIDesign\TCW16\Program\Regens

Rip Fowler
IMSIDesign
Associate Project Manager
800-833-8082 x8007

Monday, June 1, 2009

Encryption at 3 levels

level 3 - IPSEC
level 4 - SSL
application level - SSH

Wednesday, May 27, 2009

NFS

The Network File System is a way to connect a folder or drive on one computer to a remote computer so that it looks like the folder or drive is a local folder or drive on the remote computer. I "exported" /home/tayloe on legacy to varsity by first making sure that nfs was running on legacy by using chkconfig and ps -e.

Then I had to add the following line to /etc/exports on legacy:

/home/tayloe     varsity(rw)

That means "Allow /home/tayloe on legacy to be exported to varsity and give read write permissions".

Then I had to run the following executable file on legacy to make the change take effect:

/usr/sbin/exportfs  -a

Then on varsity, I executed the following command:

mount -t nfs 192.168.1.20:/home/tayloe /mnt/legacy

That means "Mount the folder on legacy called /home/tayloe and call it /mnt/legacy. The "-t" stands for "type".  192.168.1.20 is legacy's IP address.

After all this, I could navigate to /mnt/legacy on varsity and see the /home/tayloe files on legacy as if they were local on varsity.

Friday, May 15, 2009

Linux services notes

/etc/inittab shows the run levels that are available and shows the default run level that will happen when system is started.

Actual startup scripts are in /etc/rc.d/init.d. In the various folders /etc/rc.d/rc0.d /etc/rc.d/rc1.d /etc/rc.d/rc2.d and so on are links to the actual scripts in init.d.

To run your own script at startup, put the script in /etc/rc.d/rc.local

use chkconfig --list to see what programs are started at the various run levels. Some distros use update-rc.d instead of chkconfig

To see what services will be started by xinetd when needed, look in /etc/inetd.d.

Monday, May 11, 2009

Router at Cotton Plant

The DSL Router we have at CP is a Comtrend ADSL2+ router. CT-5621T. Internet light on extreme right end of router goes red about every third morning and I have to unplug it and plug it back in to get it to go back green.

To change settings on router go to the IP address of the router in firefox and use root and 12345 as username and PW.

To change port settings, go to Advanced setup --> NAT --> virtual servers.

I opened port 873 to allow deltacopy (rsync) server on Blackhawk to be able to receive packets.
-------------------------------------------------------------------------------
To makle sure rsync was running, I typed:

netstat -ano | find "LIST"

That shows the ports that are being listened to and the -o shows the process ID of the program that is doing the listening. Then I went to the Windows task manager to see which process had the ID that was listening on port 873. PIDs are not shown by default in the task manager. Go to the view tab in Task Manager and choose PID as one of the columns to display.

Wednesday, April 29, 2009

Remote Desktop

Remote Desktop is a single-session version of Terminal Services. By that I take it to mean that the real TS will allow more than one connection at a time, whereas Remote Desktop won't. I got that from Paul Thurrott's SuperSite for Windows.

To use RD, you have to open port 3389 on your firewall. I learned the hard way that Windows XP Home will NOT act as a RD server. It can, however, be a client that remotely connects to another computer that is acting as a RD server.

Friday, April 24, 2009

Deltacopy and Rsync

Delta copy is a cool program that allows you to copy data from one computer to another for backup. It works great! The documentation says that it's just a wrapper program that really runs rsync.

It uses port 873, so I had to open that port on the firewall on Jupiter which is the computer that I'm using as the server right now.
-------------------------------------------------------------------------------------------------
1. See if rsync.exe is running through the Task Manager. DeltaCopy server spawns this process in the back-ground
2. If it is running and still you cannot connect using the telnet command, it could mean that the OS is not letting the server listen on a priviledged port (873). Ensure you are running the server under "Administrators" account.

3. Suggestion: By pass DeltaCopy server and try starting rsync daemon on its own. This is by by using the following command.

rsync.exe -v --daemon --config=deltacd.conf --no-detach

See if this runs on its own.
----------------------------------------------------------------------------------
8-may-09 You can screw things up by not having the proper permissions on the target folder on the deltacopy server. I am currently using jupiter as the deltacopy server.

I discovered after much experimentation that (duh!) you have to have the correct permissions to view files on jupiter that were copied there from Blackhawk by deltacopy. When I tried to view files on jupiter that were copied there by deltacopy, it would always say "permission denied". So I would change the owner of the folder to tayloe and then give tayloe full control. But what I did not realize that this made the folder inaccessable from blackhawk because user tayloe on blackhawk had no rights to the folder. So the solution was to give use everyone full control of the folder.

The reason deltacopy worked at first was that when I made a new folder on blackhawk to copy files to jupiter using deltacopy, deltacopy itself would create the folder on jupiter, and so deltacopy (the system user??) had access to that folder on jupiter. But then it would stop working when I changed the owner to JUPITER\tayloe because deltacopy no longer had rights to the folder.
----------------------------------------------------------------------------------------
9-may-09
rsync on linux

The command that successfully copied the folder (and contents) called "varsity_to_legacy" on varsity to legacy is:

rsync -vrt /home/tayloe/varsity_to_legacy 192.168.1.20:/home/tayloe

If you put a trailing slash at the end of the source, it will not create the folder on legacy,it will just dump the files into /home/tayloe on legacy.
----------------------------------------------------------------------------------------
13-may-09
At first I could not get the Deltacopy server to run on Blackhawk after the wipe out of Windows XP Home and the installation of Windows XP Pro. It said there was a login failure. It was set to log in under the name tayloe which should certainly work. I fixed it by going into Control Panel --> system --> services and scrolling to Deltacopy and wiping out the name tayloe and choosing tayloe again from the name picker and retyping in the password. Then the deltacopy server started fine. I don't know why that fixed it.
----------------------------------------------------------------------------------------
15-may-09
I was able to successfully copy files from jupiter to legacy by typing the following command at a command prompt on jupiter:

rsync -vrt /cygdrive/e/aaa 192.168.1.20:/home/tayloe

This is the first time I've copied files from Windows to Linux. The command copies all the files on the e:\aaa folder on jupiter to the /home/tayloe folder on legacy.
----------------------------------------------------------------------------------------
According to http://everythinglinux.org/rsync/, a single colon in the remote path specification means "use ssh". A double colon means "use rsh" (rsh means that no encrytion will be used). So apparently the above command I used to copy from jupiter to legacy uses ssh.

In the next to last line of script below (from http://finmath.uchicago.edu/~wilder/Security/rsync/), the term "mach3::rsync" means backup files FROM a remote computer called mach3 and use the specifications found in the section entitled "rsync" in the file on mach3 called /etc/rsyncd.conf. The double colon implies that ssh encryption will NOT be used.

#!/bin/bash

# The argument this script is called with, either 1 or 2
ext=$1
# The full paths of the programs used in this script
rsync=/usr/bin/rsync
mount=/bin/mount
umount=/bin/umount
# Good rsync options for backups.
rsync_opts="-av --delete --delete-excluded"
# The name of the file containing the rsync connection password
password="--password-file=/etc/.rs_pass"
# A list of files and directories that do not need to be backed up
exclude_list="noback/ core .kde/ .gnome/ .netscape/cache/ Cookies/ backup/"
excludes=""
for exclude in $exclude_list; do
excludes="$excludes --exclude=$exclude"
done

# Backup /home on mach1 to /backup/mach1_1/home or
# /backup/mach1_2/home depending on the argument the script
# was called with. Dump any output and error messages to
# /etc/backup/mach1_home_1 or /etc/backup/mach1_home_2
$rsync $rsync_opts $excludes /home /backup/mach1_${ext}/ > \
/etc/backup/mach1_home_${ext} 2>&1

# Backup /profiles on mach1
$rsync $rsync_opts $excludes /profiles /backup/mach1_${ext}/ > \
/etc/backup/mach1_profiles_${ext} 2>&1

# Backup /etc on mach1
$rsync $rsync_opts /etc /backup/mach1_${ext}/ > \
/etc/backup/mach1_etc_${ext} 2>&1

# Backup mach2 and mach3 according to the [rsync] sections
# of the rsyncd.conf files on the two machines. Use the
# password given in /etc/.rs_pass.
$rsync $rsync_opts $excludes $password mach2::rsync \
/backup/mach2_${ext}/home/ > /etc/backup/mach2_${ext} 2>&1
$rsync $rsync_opts $excludes $password mach3::rsync \
/backup/mach3_${ext}/home/ > /etc/backup/mach3_${ext} 2>&1

Thursday, April 9, 2009

BEFSX41 - Linksys firewall

Linksys firewall works pretty well. It is very similar to the WRT54g wireless router that is very popular.

On firewall, to allow me to ssh in from home, I had to go to Applications & Gaming --> Port Range Forwarding and then put port 22 as start and end port and put the ip address of Varsity.

To allow the firewall to respond to pings from outside, I had to go to Security --> Firewall and then disable "Block anonymous Internet requests"

Sunday, April 5, 2009

Firewall notes

A firewall should do the following 3 things:

1. packet filtering
2. NAT
3. application proxy

An application proxy means that there is no IP or TCP level connection to the Internet whatsoever. Any packets received are opened and the data examined and then the data is re-encapsulated in a new packet and then sent on to a computer on the inside of your network.

anti spyware stuff

malwarebytes.org
superantispyware.com
pctools.com
fixit Avanquest

Monday, March 30, 2009

Nagios notes

nagios-3.0.6.tarGeneral Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagios
Embedded Perl: no
Event Broker: yes
Install ${prefix}: /usr/local/nagios
Lock file: ${prefix}/var/nagios.lock
Check result directory: ${prefix}/var/spool/checkresults
Init directory: /etc/rc.d/init.d
Apache conf.d directory: /etc/httpd/conf.d
Mail program: /bin/mail
Host OS: linux-gnu

Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP): /usr/sbin/traceroute


Review the options above for accuracy. If they look okay,
type 'make all' to compile the main program and CGIs.

30-mar-09
I edited the /etc/httpd/conf.d/nagios.conf file so that no password would be needed to access the nagios web interface page at http://localhost/nagios/.

I commented out the lines that pertained to authorization:

AuthName
AuthType
AuthUserFile
Require valid-user

ALSO: To use without authorization you must edit the following line in /usr/local/nagios/etc/cgi.cfg:

use_authentication=1

Change it to:
use_authentication=0

Then you must restart nagios so it will read the cgi.cfg file.

7-apr-09 Got Nagios to actually start seeing Jupiter on network. I had to "Allow incoming echo request" (ICMP) on the Windows firewall on Jupiter. That made the nagios "host status" of Jupiter change from down to up. But the service tests (amount of disk space, uptime, etc) were still showing red instead of green. To fix it, I had to open port 12489 tcp on the Jupiter Windows firewall. I figured out which port by turning logging on on the Jupiter Windows firewall and watching which packets were being dropped.

19-apr-09 Figured out how to view the main nagios status webpage from a location remote from Shamrock. When I tried to view the nagios webpage from my apartment, all I got was the Apache default index.html page that says "It works". I had typed "208.115.xx.xx" into my brower address bar. That default page is in the /var/www/html directory on legacy.

But all you have to do to see nagios is change the url from 208.115.xx.xx to 208.115.xx.xx/nagios and you will be able to see the page. I'm not sure why this works, but there is a line in /etc/httpd/conf.d/nagios.conf that says:

Alias /nagios "usr/local/nagios/share"

So that must do it. But when I comment that line out and restart httpd, it still finds the nagios webpage by typing localhost/nagios/ into browser. ???????? You must include the trailing "/".

Also there are the following 2 lines in /usr/local/nagios/etc/cgi.cfg:

physical_html_path=/usr/local/nagios/share
url_html_path=/nagios

Maybe they help.
---------------------------------------------------------------------
24-apr-09 If you add a computer to the host definitions in /usr/local/nagios/etc/objects/windows.cfg, AND you use the windows server template, then that computer automatically gets a ping test because there is a ping test (check-host-alive) included in the windows template. So for most of my computers, all I have to do is add the computer to the list of computers to be monitored by creating a host entry for it in windows.cfg and it will be pinged. You don't have to add a service definition unless you are going to do something fancier than a ping.

Wednesday, March 25, 2009

opening and closing ports

An open port simply means that some program is running and listening for input on that port. The program may or may not respond.

A closed port means that no program is listening on that port.

So to "open" a port, you have to start a program that will listen on that port. To close it again, stop that program.

A "stealth" port is a port that does not respond to "knocks" from the Internet (pings, I guess), whereas a closed port might respond to a knock saying "I'm here but closed" even though there is no program actively using the port. That would let a hacker know that there was a computer at that port.

ip addresses

7144vw#203 75.66.44.180 (26-apr-09)
7144vw#203 75.66.58.99 (31-may-09)

7880 Grove Ct E #204   75.66.42.204  (26-may-10)
Cotton Plant 64.16.231.180 (old)
Cotton Plant 216.212.76.40 (26-may-10)

Shamrock 208.115.11.214

2350kwc (margie) 74.226.120.216

grc.com 4.79.142.200

25-mar-09 Was able to ping CP from 2350kwc
25-mar-09 was NOT able to ping 2350kwc from CP or Shamrock

25-mar-09 Was able to ping CP from Shamrock
25-mar-09 was NOT able to ping Shamrock from 7144 Vineyard Way

9-apr-09 Was NOT able to ping CP from Shamrock - I don't know why

Tuesday, March 17, 2009

notes about sockets and icmp

An easy, clear definition of what sockets are:

from www.angryziber.com:
While only IP protocol is fine for sending of packets between hosts, there is a need to differentiate multiple senders and receivers on each host (sockets). This possibilities are provided by transport protocols UDP (User Datagram Protocol), TCP (Transmission Control Protocol), and their companion, ICMP (Internet Control Message Protocol). All these protocols are independent of whether IPv4 or IPv6 is used underneath.

from wikipedia:
Internet sockets constitute a mechanism for delivering incoming data packets to the appropriate application process or thread, based on a combination of local and remote IP addresses and port numbers. Each socket is mapped by the operational system to a communicating application process or thread.

Now on to ICMP......

I normally think of ICMP as being at the network level, but it's really at the transport level.

from systemdisc.com:
ICMP works, from a technical point of view, at the transport layer of the OSI model. However, it differs from other transport protocols such as TCP or UDP in the following way; as a control protocol, ICMP does not carry any application data but information on the status of the network.