Tuesday, December 15, 2009

Removing Viruses

If you have the means, the best way is to connect the infected hard drive to another computer and scan it from there.
Install Malwarebytes
If it cannot install: download it onto another computer, rename the installer to something else (goawayvirus.exe). Then transfer it over to the infected machine and install it.
Update Malwarebytes
If you cannot use the internet I believe there is a manual way to update, will update once I find out.
Run a full scan
Malwarebytes may ask you to reboot, do so, even if it doesn't ask, reboot anyway.
BOOT INTO SAFE MODE
This is usually done by tapping the F8 key when the system is booting up.
Run full scans and reboot until the machine is clean

A run of CCleaner afterwards to clean up any registry junk left behind never hurts either.
Tips
  • Have patience
  • Be thorough
  • Try to understand how the computer got infected

Windows XP Recommendations

3 points:
  • Accounts
  • Updates
  • Upkeep
Accounts
Avoid running as an administrator as much as possible. The default account after installing XP is an administrator. Create a new account for yourself that is a regular user and use this one for day-to-day actions.
If you need to install a program, download the installer, right click on it and go to "run as". Run it as the administrator account and it will be installed just fine.
Other things may come up saying only administrator's can do those things, and the administrator username and password must be entered. It is annoying but is much, much more secure.
Updates
The only time the administrator account should be logged into is when you are updating the computer. To do that go into Internet Explorer, go to Tools -> Windows Update. These updates can improve computer performance and prevent against viruses, very important.
This also goes for programs you run, updating them regularly is also a good idea.
Upkeep
Organize the files on the computer, create folders with names that describe what is in them. Categorize as seen fit.
Do not install a program unless you are sure what it is. Do a search on the internet of the program's name and see what people have to say about it.
Go through this checklist at least once a month:
  • Update Windows
  • Update the programs used most
  • Run CCleaner
  • Run Auslogics Disk Defrag
  • Run MalwareBytes Anti-Malware

Blocking Websites with a Squid Proxy

Install Squid on your machine.

In /etc/squid3/squid.conf, under the line:
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
Insert these lines above any network rules you have:
# WEB FILTERING
acl bad url_regex –i “/etc/squid3/squid-block.acl”
http_access deny bad
Create the file "squid-block.acl". This file will store the url regular expressions you want to block.
Restart Squid to apply the changes:
# sudo service squid3 restart

Example squid-block.acl contents:
myspace.com
faceboook.com
This will block any url that contains "myspace.com" or "facebook.com".

Basic Squid Installation on Ubuntu Server

Install Squid:
# sudo apt-get install squid3
Back up configuration file:
# sudo cp /etc/squid3.conf /etc/squid3.conf.default

Edit squid.conf, under this line:
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
Add the following lines(where localnet is the machines you want to be able to use the proxy):
# MODIFIED PORTION
# ALLOWED NETWORKS
acl localnet src 130.151.0.0/16
http_access allow localnet
icp_access allow localnet

Restart Squid to apply changes:
# service squid3 restart

Now Squid will be acting as a proxy-cache for machines with IP addresses within 130.151.0.0/16. Just point their browsers to the hostname of your squid box port number 3128 (squid's default port).

Monday, December 14, 2009

Basic Linux Commands: Search for a file

Search for a file anywhere on the machine:
# find / -name [filename]

Get more information about a command:
# man [command]

Basic Linux Commands: Permissions

Change permissions of file:
# chmod [777] [filename]
Change owner of file:
# chown [username] [filename]
Change group ownership of file:
# chgrp [groupname] [filename]

Get more information about a command:
# man [command]

Basic Linux Commands: Users and Groups

Add user:
# adduser [username]
Add group:
# addgroup [groupname]
Add existing user to group:
# usermod -a -G [groupname] [username]
Show groups user belongs to:
# id [username]
# groups
Checking that group exists:
# grep ^[groupname] /etc/group

Get more information about a command:
# man [command]

Recommended Free Software

Audio/Video
musikCube: Play music, practically perfect program. Easy to navigate large music libraries.
VideoLAN: Play any media file worth playing
SharePod: Change what's on your IPod from any computer

Computer Upkeep
Auslogics Disk Defrag: Windows disk defragmenter
CCleaner: Clean up Windows filesystem a little bit
Malwarebytes' Anti-Malware: Get rid of adware, viruses, etc.

Document
Foxit Reader: PDF Reader
OpenOffice: Who needs MS Office?

Misc
GIMP: Similar to Photoshop

Utilities
7zip: Unarchive all kinds of formats
ImgBurn: Burn and read image files
Notepad++: Edit text files, supports many computer languages
Putty: Small SSH client, absolutely necessary
WinSCP: Transfer files to *nix boxes

Browsers
Google Chrome: Blazing fast
Mozilla Firefox: Many, many extensions

Installing Ubuntu Server on Older Machine

Installed Ubuntu Server on older machine using guided partitioning.
The GRUB OS chooser screen came up and I tried to select the new installation and got this error:
Error 18: Selected cylinder exceeds maximum supported by BIOS
Eventually got to this wiki. The kernel GRUB wants to load is outside the range of memory it can reach.
I retried the installation and did manual partitioning this time. Create a 32mb partition at the beginning of the drive and mount /boot to it. This allowed me to boot into the operating system.

ConkyDocs!

Catchy name huh?

I am making this mainly so I can document things computer related that I do. Putting them on blogger allows them to be nicely formatted, shareable, and searchable thanks to the information giant Google.

Hope you find something of use here.