Tue, Apr 28, 2009 8:01 pm
Double Underline in HTML
I wanted to put a double underline under "Windows XP Professional Setup"
on a webpage. I needed the text in that section of the page to be white
on a blue background. To achieve that effect, I used
<u style="border-bottom: solid 1px;">Windows XP Professional
Setup<u>
. The HTML code is shown below.
<div style="background-color: blue; color: white; width: 640px; padding: 2px;">
<pre>
<u style="border-bottom: solid 1px;">Windows XP Professional Setup</u>
</pre></div>
The code would produce the following:
Windows XP Professional Setup
References:
-
How do you make a double underline???
Date: December 11, 2006
Forums - CreateBlog
[/network/web/html]
permanent link
Sun, Apr 26, 2009 4:19 pm
NFS on Solaris
Solaris 9 and later comes with an NFS server. To use it, edit the
/etc/dfs/dfstab
file. Place a share command in it using the
syntax
share [-F FSType] [-o specific_options] [-d description]
[pathname]
.
The following shows an entry made
to that file. Folders are shared via NFS using the share
command. The options used are explained below:
-F nfs | Specify the filesystem type for sharing to be NFS. |
-o rw=PC1 | Allow read and write access from one one client system
named PC1 |
-d "share" | Use share as the description for the share
|
# Place share(1M) commands here for automatic execution
# on entering init state 3.
#
# Issue the command 'svcadm enable network/nfs/server' to
# run the NFS daemon processes and the share commands, after adding
# the very first entry to this file.
#
# share [-F fstype] [ -o options] [-d "<text>"] <pathname> [resource]
# .e.g,
# share -F nfs -o rw=engineering -d "home dirs" /export/home2
share -F nfs -o rw=PC1 -d "share" /export/home/jsmith/Documents/share
The options that can be specified with -o
are as follows:
-o specific_options
The specific_options are used to control access of the
shared resource. (See share_nfs(1M) for the NFS specific
options.) They may be any of the following:
rw
pathname is shared read/write to all clients. This
is also the default behavior.
rw=client[:client]...
pathname is shared read/write only to the listed
clients. No other systems can access pathname.
ro
pathname is shared read-only to all clients.
Note: in the example above I used /export/home/jsmith/Documents/share
as the directory to be shared. I had to use
/export/home/jsmith/Documents/share
rather than /home/Documents/jsmith/shared
, because
under Solaris the /home
directory is a special directory.
For sharing something under it with NFS, you need to use
/export/home
.
When I tried sharing the directory with the shareall
command when I used /home/jsmith/Documents/share
, I received
an error message.
# shareall -F nfs
share_nfs: /home/jim/Documents/share: Operation not applicable
Once I used /export/home/jsmith/Documents/share
in
/etc/dfs/dfstab
, I did not receive any error
messages when running shareall
.
Once the dfstab
file has been edited, start the
NFS server with svcadm enable network/nfs/server
.
You can check the state of the NFS server with the svc
command:
$ svcs network/nfs/server
STATE STIME FMRI
disabled 14:19:50 svc:/network/nfs/server:default
You can use the -v
option with the svcadm
to
get more verbose information. You can use the -r
option to
enable other services on which it depends. Svcadm then enables each service
instance and recursively enables its dependencies.
If the -s
option is specified, svcadm enables each service
instance and then waits for each service instance to enter the online or
degraded state. svcadm will return early if it determines that
the service cannot reach these states without administrator intervention.
# svcadm -v enable -r network/nfs/server
svc:/network/nfs/server:default enabled.
svc:/milestone/network enabled.
svc:/network/loopback enabled.
svc:/network/physical enabled.
svc:/network/nfs/nlockmgr enabled.
svc:/network/rpc/bind enabled.
svc:/system/filesystem/minimal enabled.
svc:/system/filesystem/usr enabled.
svc:/system/boot-archive enabled.
svc:/system/filesystem/root enabled.
svc:/system/device/local enabled.
svc:/system/identity:node enabled.
svc:/system/sysidtool:net enabled.
svc:/milestone/single-user:default enabled.
svc:/milestone/devices enabled.
svc:/system/device/fc-fabric enabled.
svc:/system/sysevent enabled.
svc:/system/manifest-import enabled.
svc:/system/filesystem/local:default enabled.
svc:/milestone/single-user enabled.
svc:/system/filesystem/minimal:default enabled.
svc:/system/identity:domain enabled.
svc:/network/nfs/status enabled.
svc:/system/filesystem/local enabled.
# svcadm enable -s /network/nfs/server
If the service is still marked as disabled, you can use the
-d
option, which lists the services or service
instances upon which the given service instances depend.
# svcs /network/nfs/server
STATE STIME FMRI
disabled 14:55:55 svc:/network/nfs/server:default
# svcs -d /network/nfs/server
STATE STIME FMRI
disabled Jul_28 svc:/network/rpc/keyserv:default
disabled Jul_28 svc:/network/nfs/mapid:default
online Jul_28 svc:/milestone/network:default
online Jul_28 svc:/system/filesystem/local:default
online Jul_28 svc:/network/rpc/bind:default
online Jul_28 svc:/network/nfs/nlockmgr:default
online Jul_28 svc:/network/rpc/gss:default
When I tried starting the NFS server software on a Solaris 10
system, I didn't see error messages when I ran svdadm enable -s
/network/nfs/server
, but when I would check it afterwards with
svcs /network/nfs/server
, the service was listed as disabled.
So I tried enabling the keyserv
and mapid
services, which were listed as disabled.
# svcs keyserv
STATE STIME FMRI
disabled Jul_28 svc:/network/rpc/keyserv:default
# svcadm enable keyserv
# svcs keyserv
STATE STIME FMRI
maintenance 15:43:56 svc:/network/rpc/keyserv:default
# svcadm enable mapid
# svcs mapid
STATE STIME FMRI
online 15:44:58 svc:/network/nfs/mapid:default
# svcs /network/nfs/server
STATE STIME FMRI
disabled 14:55:55 svc:/network/nfs/server:default
# svcadm enable -s /network/nfs/server
svcadm: Instance "svc:/network/nfs/server:default" has been disabled by another
entity.
# svcs -x svc:/network/nfs/server
svc:/network/nfs/server:default (NFS server)
State: disabled since Sun Apr 26 15:45:46 2009
Reason: Disabled by an administrator.
See: http://sun.com/msg/SMF-8000-05
See: nfsd(1M)
See: /var/svc/log/network-nfs-server:default.log
Impact: This service is not running.
I finally realized that the NFS service won't start if there is no
valid directory share. I had used /home/jsmith/Documents/share
in /etc/dfs/dfstab
instead of
/export/home/jsmith/Documents/share
. Once I corrected that
problem, I was able to enable the /network/nfs/server
service.
# svcs /network/nfs/server
STATE STIME FMRI
online 16:15:32 svc:/network/nfs/server:default
# svcadm enable -s /network/nfs/server
# svcs /network/nfs/server
STATE STIME FMRI
online 16:15:32 svc:/network/nfs/server:default
I had previously run svcadm enable -r /network/nfs/server
to
recursively enable any other services that the NFS service depended upon.
Since the keyserv
and mapid
services had been listed
as disabled after I ran that command, but I had subsequenty enabled them when I
incorrectly concluded that the fact that they were disabled was keeping
the NFS server service from running, I disabled them again.
# svcadm disable keyserv
# svcadm disable mapid
# svcadm restart /network/nfs/server
# svcs /network/nfs/server
STATE STIME FMRI
online 16:41:38 svc:/network/nfs/server:default
I then checked to verify the system was listening on the default port
for NFS, port 2049.
# netstat -an | grep 2049
*.2049 Idle
*.2049 Idle
*.2049 Idle
*.2049 *.* 0 0 49152 0 LISTEN
*.2049 *.* 0 0 49152 0 LISTEN
*.2049 *.* 0 0 49152 0 LISTEN
# netstat -a | grep nfs
*.nfsd Idle
*.nfsd Idle
*.nfsd Idle
References:
-
Sharing directories with NFS in Solaris 10
Solaris Administration Secrets
and Security
-
Setting up an NFS Server on Solaris
Date: December 21, 2003
Network Administrator Tools
-
Solaris 10: enable NFS server
By: qmchenry
Date: May 20, 2005
Tech-Recipes - Your cookbook of
tech tutorials
-
[osol-help] unable to bring up nfs server on solaris 10
Date: May 15, 2007
The opensolaris-help Archives
-
NFS: Operation not applicable
Date: August 12, 2006
Sun Forums
-
svcadm fails to enable nfs/server
Date: August 12, 2008
SUN Solaris - The UNIX and Linux
Forums
[/os/unix/solaris]
permanent link
Fri, Apr 17, 2009 8:42 pm
Default Virtualhost in Apache
The first virtualhost section in Apache's
httpd.conf
file will be used as the default for any domain that doesn't have
its own virtualhost section in the configuration file, if you
use
*:80
in the virtualhost section. E.g., suppose
the very first virtualhost listed in
httpd.conf
is
dummy-host.example.com
as shown below.
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /www/docs/dummy-host.example.com
ServerName dummy-host.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
If the IP address for another.example.com
, points to
the same webserver, but there is no virtualhost section for
another.example.com
, then anyone who uses
http://another.example.com will see whatever homepage was set up
for dummy-host.example.com
.
References:
-
VirtualHost Examples
Apache HTTP Server Version 2.0
The Apache HTTP Server Project
[/network/web/server/apache]
permanent link
Thu, Apr 16, 2009 4:41 pm
Inserting Author and Last Edit Date in a Visio Drawing
In Visio 2003, to insert a field, such as the date a Visio drawing was
last edited or the name of the document's creator, click on the
text tool icon, i.e. the "A" in the toolbar at the top of the Visio
window, which selects the
Text Tool.
Hold the mouse button down and drag the mouse while holding the button
down to create a text box. To insert a field into the text box, rather than
typing text, click on Insert, then select Field. You can click on
Date/Time to see options for inserting dates and times into the
document. If you selected the Last Edit Date/Time, you could insert the
date and/or time the document was last edited. If you later edited the drawing
again, that value would be updated automatically in the area where you inserted
it in the drawing.
If you placed author and company information in the drawings "properties" by
clicking on File then Properties, you could insert that
information in the document as well.
Instead of selecting Date/Time when choosing which information to
insert in the document, you would then select Document Info for the
field.
References:
-
Creating text fields to display information in Visio
Microsoft Office Online
[/os/windows/office/visio]
permanent link
Tue, Apr 14, 2009 9:39 pm
Inserting a Newline Character Using Vi
To insert a newline character, i.e. to create a new line in a file
using Vi on a Unix system, you can use
^M
(you have
to actually type
Ctrl-V (i.e. the
Ctrl and
V
keys hit simultaneously) followed by
Enter to get the
^M
to appear. For example, suppose that instead of commas separating elements
in a list you wish to put each element on a new line.
Original lines
Gold, Silver, Bronze
Desired lines
Gold
Silver
Bronze
You can use the following command in Vi to replace all commas
with the newline character starting from the first line in the file
to the last (represented by $
):
1,$ s/,/^M/g
As noted above, you need to hit Ctrl-V Enter to put the
^M
in the command.
References:
-
How to represent a new line character in a regex in VI?
By: mbrooks
Date: December 30, 2006
Tek-Tips
[/software/editors/vi]
permanent link
Tue, Apr 14, 2009 7:57 am
Character Encoding of Webpages
I've been validating the HTML code on the webpages I create for a few
weeks using the
W3C Markup Validation
Service. For all of my webpages, I've been getting the warning below
when I validate them:
No Character encoding declared at document level
No character encoding information was found within the document, either in
an HTML meta element or an XML declaration. It is often recommended to declare
the character encoding in the document itself, especially if there is a chance
that the document will be read from or saved to disk, CD, etc.
The W3C site provides information on character sets and encoding of webpages
at
Tutorial: Character sets & encodings in XHTML, HTML and CSS.
There are, of course, many other useful references on the matter on the web.
The Wikipedia article,
Character encodings in HTML explains how browsers
determine the character encoding of a webpage. Wikipedia provides
information on issues related to the internationalization and
localization, often abbreviated as
i18n (where 18 stands for the number of letters between the i and the n
in internationalization, a usage coined at DEC in the 1970s or 80s) and L10n
respectively. The capital L in L10n helps to distinguish it from the lowercase
i in i18n.
UTF-8:
The Securet of Character Encoding has a good explanation of why
it is advisable to specify the character encoding for your HTML
documents and why using UTF-8 is recommended.
The webserver is providing information on the encoding of the webpages, i.e.
it is sending Content-Type: text/html; charset=UTF-8
in the
HTTP headers it sends to browsers, but I haven't been including a meta tag in
the pages specifying the encoding, i.e. I haven't been using
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
. I decided to add that immediately after the
<head>
tag in the template I use for my webpages.
[/network/web/html]
permanent link
Sun, Apr 12, 2009 11:06 pm
hMailServer - Free Email Server for Microsoft Windows
If you want to set up a Microsoft Windows system as an email server,
there is a free, full-featured email server program available called
hMailServer. It supports
IMAP,
POP3, and
SMTP.
[ More Info ]
[/network/email]
permanent link
Sun, Apr 12, 2009 7:22 pm
How to Stop Vim from AutoIndenting in Files
I use
Vim for editing files on
Windows systems. I edit HTML files with it, but find its habit
of automatically indenting lines in those files based on the tags used
annoying rather than helpful. Fortunately, that behavior can be turned
off. To so so, edit the
_vimrc
file, which is in the
directory where you installed Vim, e.g.
C:\Program Files\Vim
.
For HTML files, i.e. any file with an extension of
.htm
or
.html
, you can add the following two lines to stop the
autoindentation. Close Vim, add the lines, then reopen Vim and you should
no longer have the autoindenation in those files.
autocmd BufEnter *.html setlocal indentexpr=
autocmd BufEnter *.htm setlocal indentexpr=
You can enter similar lines to stop autoindentation in other files.
References:
-
How
to stop auto indenting
Vim Tips Wiki
[/software/editors/vi]
permanent link
Sun, Apr 12, 2009 6:29 pm
Configuring a NetScreen Firewall for an Internal SMTP Server
The steps
here
can be taken to configure a NetScreen firewall, such as the NetScreen-5GT
or NetScreen-5XP firewalls, to allow email to be sent from or to an
email server sitting behind the firewall, i.e. on the trusted side of the
firewall, when the firewall is performing
NAT.
[/security/firewalls/netscreen]
permanent link
Sat, Apr 11, 2009 12:28 pm
Toshiba M35X Laptop Discharges on AC Power
I've been experiencing more power problems with my Toshiba M35X-S109
laptop. Even when it is powered by A/C, i.e. I have the power cabled
attached to it, the battery will sometimes discharge and the system
will power itself off. If I check the power status (click on
Start,
Control Panel,
Performance and Maintenance,
Toshiba Power Management), I see that the system is on A/C power,
yet the battery is still discharging.
Eventually, the Toshiba Power Management Utility will show that the
battery has fully discharged. Then within a minute or two, the system
will power itself off.
I had configured the Toshiba Power Management
Utility to put the system in hibernate mode when the power got down
to a a very low percentage, but it has never done so; the system just powers
off. And, even though I had it configured to warn me when the battery power got
down to 10%, I'm never warned either. The system just abrubtly powers itself
off.
I had found other people reporting similar problems with this laptop
when I searched for information on the problem previously - see
Toshiba M35X Laptop
Powers Off Randomly. The system had been showing 100% power
yesterday evening and I hadn't noticed the charge state decreasing - I use
Laptop Battery
Power Monitor to constantly monitor the charge state of the battery -
and I hadn't saved a lot of notes I had made regarding a problem I was working
on. I know better than to use Windows Notepad, since it doesn't do any
automatic file saving, but I had pasted output from a remote system and
URLs related to the problem I was working on at the time into Notes. So
I utterred a few curses when the laptop powered itself off, since all those
notes were lost.
When the system is not charging, I see the two left-most LED's lit green on the
front of the laptop. The left-most one indicates the laptop has A/C power.
The middle one is lit green indicating the system is powered on. When the
system is charging, the right-most one is lit amber when the battery is
charging. And the
Laptop Battery Power Monitor will have an orange arrow pointing out
of it to notify me that the laptop battery is charging.
When the system powers itself off, I've found that if I power it
back on immediately, it will show a zero percent charge and power itself
back off within a couple of minutes. If I do nothing, but leave the system
off for awhile, when I turn it back on, it may show the battery as fully
charged or show it is in a charging state, depending on how long I've left
it powered off. Sometimes, though, it shows the battery in a partially charged
state and immediately starts discharging again.
Today, I found that if I tipped the laptop backwords, I could get the
state to go from discharging to charging. If I put it back down, sometimes
it would show that it was charging, other times it would be discharging the
battery. I also found that if I pulled the A/C power plug from the back
of the laptop and plugged it back in, sometimes I could get it to go to the
charging state. Sometimes the Laptop Battery Monitor utility would show
briefly that the battery was being charged, but would almost immediately
switch to showing it was discharging. If I removed the power plug and
put it back in multiple times, I could sometimes get it to stay in the
charging state. At the moment it's charging again.
I did some more online searching with
Google again today to see what others were saying about such problems
with Toshiba laptops. I found others reporting similar problems with
other Toshiba laptops. Many, like myself, stated they are unlikely to
consider a Toshiba laptop for future laptop purchases. I found a lot of
very informative postings on the problem by various people at
Toshiba
Satellite P25-s520 AC Power Problem. Some people had reported
resolving the problem by simply opening the laptop and blowing out dust.
Others fixed their problem by replacing the nib on the power adapter.
Others replaced or adjusted the placement of components inside the laptop.
For anyone experiencing similar problems, I would recommend reading the postings
there. If those webpages ever disappear or the site is unavailable,
the Internet Archive, aka the Wayback
Machine, has them archived at
Toshiba Satellite Ps5-s520 AC Power Problem. One of the posters
even posted a link on how to disassemble a Toshiba Satellite P25 notebook, which
you might want to try to get rid of dust inside the laptop or if you want
to check the power connection to the motherboard. The link is
Disassembling Toshiba Satellite P25 notebook. It may be helpful
for those who need to disassemble other models of Toshiba Satellite
laptops as well.
One poster even said he was able to rectify the problem by wrapping
aluminum foil around the nib of the power plug that goes into the back
of the laptop. I tried that; it didn't help and, when the foil comes off
and remains inside the connector on the back of the laptop, it may be
difficult to get all of it back out, so, personally, I can't recommend
that solution, though, if you are desparate, you can try it.
[/pc/hardware/toshiba]
permanent link
Wed, Apr 08, 2009 10:48 pm
Swinog DNSRBL
I added the
Swinog DNSRBL to the
list of
DNS Blacklists (DNSBLs)
that I have
sendmail check on my
email server. To do so, I added
FEATURE(`dnsbl',`dnsrbl.swinog.ch',`550 Spam Block: mail from
$&{client_addr} refused - see
http://antispam.imp.ch/spamikaze/remove.php')dnl
to
/etc/mail/sendmail.mc
. I now have the following DNSBLs listed in
that file:
FEATURE(`blacklist_recipients')dnl
FEATURE(`dnsbl', `bl.csma.biz', `550 Spam Block: mail from $&{client_addr} refused - See http://bl.csma.biz/')dnl
FEATURE(`dnsbl', `sbl.spamhaus.org', `550 Spam Block: mail from $&{client_addr} refused - See http://www.spamhaus.org/sbl/')dnl
FEATURE(`dnsbl', `psbl.surriel.com', `550 Spam Block: mail from $&{client_addr} refused - see http://psbl.surriel.com/')dnl
FEATURE(`dnsbl',`dnsbl.sorbs.net',`550 Spam Block: mail from $&{client_addr} refused - see http://dnsbl.sorbs.net/')dnl
FEATURE(`dnsbl',`dnsrbl.swinog.ch',`550 Spam Block: mail from $&{client_addr} refused - see http://antispam.imp.ch/spamikaze/remove.php')dnl
After adding the entry for the Swinog RBL, I generated a
sendmail.cf
file from sendmail.mc
and restarted
sendmail.
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
# /etc/init.d/sendmail restart
I checked /var/log/maillog
just moments after adding that
blacklist and found it had blocked spam:
# grep 'antispam.imp.ch' /var/log/maillog
Apr 8 21:16:57 frostdragon sendmail[15676]: n391GuGi015676: ruleset=check_rcpt,
arg1=<broderbundxxxxxx@moonpoint.com>, relay=65-75-229-245.dsl.ctcn.net [65.75.
229.245] (may be forged), reject=550 5.7.1 <broderbundxxxxxx@moonpoint.com>... S
pam Block:mail from 65.75.229.245 refused - see http://antispam.imp.ch/spamikaze
/remove.php
The Swinog DNSBL blocked email to an email address that I used on
December 8, 2004 when I registered software with Brøderbund Software.
I never used the email for any other purpose. Usually, when I'm providing an
email address to any company, I don't use my primary email address, but instead
create an alias for that address that points to my primary email address.
So, if I start getting a lot of spam addressed to the alias, I can just
invalidate the alias. And, since the aliases I create are not ones a spammer
would use if the spammer was employing a name dictionary attack, i.e. guessing
likekly names, I know that the company has provided the email address I
gave them to a spammer. So I know the spammer got the address above, which
I've changed for any
spam spiders that may crawl across this page, from Brøderbund
Software or one of the companies that subsequently owned Brøderbund
Software.
The Wikipedia article on the
company at Brøderbund
lists the following history of corporate ownership for Brøderbund.
Brøderbund was purchased by
The Learning
Company in 1998 for about USD$420
million in stock. Ironically, Brøderbund had initially attempted to
purchase the original The Learning Company in 1995, but was outbid by Softkey,
who purchased The Learning Company for $606 million in cash and then adopted
its name. In a move to rationalize costs, The Learning Company promptly
terminated 500 employees at Brøderbund the same year, representing 42% of
the company's workforce. Then in 1999 the combined company was bought by
Mattel
for $3.6 billion. Mattel reeled from the financial impact of this
transaction, and Jill Barad, the CEO, ended up being forced out in a climate of
investor outrage. Mattel then gave away The Learning Company in September 2000
to Gores Technology Group, a private acquisitions firm, for a share of
whatever Gores could obtain by selling the company. In 2001, Gores sold The
Learning Company's entertainment holdings to
Ubisoft, and most of the
other holdings, including the Brøderbund name, to Irish company
Riverdeep.
Currently, all of Brøderbund's games, such as the Myst series, are
published by Ubisoft.
I suspect that it wasn't just my email address that was sold to spammers.
Probably Brøderbund's entire mailing list was sold by either
Brøderbund or one of the companies that acquired it, though,
of course there is a possibility it could just have been an employee
of one of the companies trying to make some easy cash or one who was
losing a job as his or her company was acquired by another company,
who could have been looking to compensate for lost wages.
The address is still being used by spammers over four years later,
even though the address has probably not been valid for over a year.
Unfortunately, I don't remember when I first started getting spam addressed
to that email address.
After having a hernia operation recently, I noticed I've been getting spam
on a fairly regular basis suggesting I might want to use the legal
services mentioned in the spam if I wanted to sue for any problems related to
the patch used in the surgery. I don't remember seeing any of this type
of message previously, though it's possible that I might have received such
messages, but they never registered in my consciousness then as I deleted
spam. But I'm wondering now if someone at the office of the
doctor who performed the surgery sold my email address. I believe I did
put my primary email address on a form I filled out at the doctor's office.
If I had used an alias, I would know for certain, if that was the case.
[/network/email/spam/blocklists]
permanent link
Tue, Apr 07, 2009 10:31 pm
NetScreen Snoop Command
Juniper NetScreen firewalls have a
snoop command that
functions similarly to the command of the same name on a Solaris
system or the
tcpdump
utility for Unix/Linux systems or the Windows equivalent,
WinDump. I.e., it provides some
packet sniffing
capabilities.
The snoop commands provide functionality one might expect from a sniffer,
but you can also use
debug commands to see how the firewall is applying
policies to the traffic it sees.
[ More Info ]
[/security/firewalls/netscreen]
permanent link
Tue, Apr 07, 2009 8:54 pm
Configuring a Linksys BEFSR41 Router for Animal Crossing
The
Wii game
Animal
Crossing: City Folk, which was released on November 16, 2008 in the
U.S. allows one to visit friends who also have Wii's on which they
are running the game. But in order for someone to visit you, you must
have your router/firewall configured so that the appropriate firewall
ports are open.
[ More Info ]
[/gaming/wii]
permanent link
Sun, Apr 05, 2009 9:00 pm
Sun, Apr 05, 2009 8:18 pm
Free File Upload Sites for Virus Scanning
There are a number of sites where one can upload a file to have it
scanned by multiple antivirus programs, e.g.
VirusTotal,
VirSCAN, and
Jotti's Malware Scan
site.
[ More Info ]
[/security/antivirus]
permanent link
Sat, Apr 04, 2009 3:32 pm
Socat and Ncat
I needed to determine whether
User
Datagram Protocol (UDP) datagrams were being transmitted through a firewall
on specific ports. I had a Windows system behind the firewall and a
Linux system on the outside of the firewall. I intended to use
Ncat on both systems. I installed
Nmap on the Windows system, since it provides
the Ncat utility. But when I tried to install Ncat on the Linux system,
I
encountered problems, so I installed
socat, instead, since it
provides similar capabilities.
Since I needed to test whether UDP datagrams would reach the Windows
system on port 27900, I issued the command ncat -u 27900 -l
to have ncat listen (the "-l" argument) on UDP port 27900 (the -u 27900
argument). I then issued the command socat - udp-sendto:192.168.0.3:27900
on the Linux system. The - udp-sendto:192.168.0.3
allowed me to send data from the system socat was running on to
the the destination address 192.168.0.3. I was then able to type text,
e.g. the words "a test" on the Linux system. I saw them appear on the Windows
system indicating the firewall rule was functioning as needed.
Linux Sending System
$ socat - udp-sendto:192.168.2.3:27900
a test
Windows Listening System
C:\Program Files\Network\Nmap>ncat -u 27900 -l
a test
I then terminated the socat program on the Linux system with
Ctrl-D and the ncat program on the Windows system with
Ctrl-C.
References:
-
Nmap
-
socat
dest-unreach.org
-
socat - Multipurpose relay (SOcket CAT)
Linux Man Pages Manual
Documentation for Linux / Solaris / UNIX / BSD
[/network/tools/scanning/socat]
permanent link
Sat, Apr 04, 2009 3:01 pm
Ncat and Glibc
I wanted to install
Ncat on a CentOS
Linux system to test firewall rules. I intended to run Ncat on a Windows
system behind the firewall to listen for UDP connections while using
Ncat on the Linux system outside the firewall to send data to the Windows
system through the firewall. I downloaded the Windows version of
Nmap, which also provides the command line
Ncat tool. I had no problems installing and running it on the Windows system.
However, when I downloaded the Linux RPM for Ncat from the Nmap site and
tried to install it, I encountered problems.
# rpm --install ncat-4.85BETA7-1.x86_64.rpm
error: Failed dependencies:
libc.so.6(GLIBC_2.7)(64bit) is needed by ncat-4.85BETA7-1.x86_64
Yet, when I checked the system for the presence of libc.so.6
,
I found it was present.
# locate libc.so
/lib/libc.so.6
/lib/i686/nosegneg/libc.so.6
/lib64/libc.so.6
/usr/lib/libc.so
/usr/lib/i386-redhat-linux4E/lib/libc.so
/usr/lib/x86_64-redhat-linux4E/lib64/libc.so
/usr/lib64/libc.so
I checked to see what package provided the file.
# rpm -qf /lib/libc.so.6
glibc-2.5-24
# rpm -qf /lib64/libc.so.6
glibc-2.5-24
When I checked the package, there appeared to be two glibc-2.5-24 packages
present, since when I ran the command rpm -qi glibc-2.5-24
,
I saw the package listed twice, but with different sizes
# rpm -qi glibc-2.5-24
Name : glibc Relocations: (not relocatable)
Version : 2.5 Vendor: CentOS
Release : 24 Build Date: Fri 23 May 2008 10:40:42 PM EDT
Install Date: Tue 29 Jul 2008 10:03:15 AM EDT Build Host: builder15.centos.org
Group : System Environment/Libraries Source RPM: glibc-2.5-24.src.rpm
Size : 11590290 License: LGPL
Signature : DSA/SHA1, Sun 15 Jun 2008 09:51:20 AM EDT, Key ID a8a447dce8562897
Summary : The GNU libc libraries.
Description :
The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.
Name : glibc Relocations: (not relocatable)
Version : 2.5 Vendor: CentOS
Release : 24 Build Date: Fri 23 May 2008 11:12:28 PM EDT
Install Date: Tue 29 Jul 2008 10:03:26 AM EDT Build Host: builder15.centos.org
Group : System Environment/Libraries Source RPM: glibc-2.5-24.src.rpm
Size : 12579066 License: LGPL
Signature : DSA/SHA1, Sun 15 Jun 2008 09:51:20 AM EDT, Key ID a8a447dce8562897
Summary : The GNU libc libraries.
Description :
The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.
I tried updating the package.
# yum upgrade glibc
Loading "priorities" plugin
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* rpmforge: fr2.rpmfind.net
* base: mirror.anl.gov
* updates: ftp.lug.udel.edu
* addons: centos.aol.com
* extras: ftp.lug.udel.edu
338 packages excluded due to repository priority protections
Setting up Upgrade Process
Resolving Dependencies
--> Running transaction check
---> Package glibc.i686 0:2.5-34 set to be updated
--> Processing Dependency: glibc-common = 2.5-34 for package: glibc
--> Processing Dependency: glibc = 2.5-24 for package: glibc-devel
--> Processing Dependency: glibc = 2.5-24 for package: glibc-devel
--> Processing Dependency: glibc = 2.5-24 for package: glibc-headers
---> Package glibc.x86_64 0:2.5-34 set to be updated
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.5-34 set to be updated
---> Package glibc-common.x86_64 0:2.5-34 set to be updated
---> Package glibc-devel.x86_64 0:2.5-34 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
glibc x86_64 2.5-34 base 4.7 M
glibc i686 2.5-34 base 5.2 M
glibc-common x86_64 2.5-34 base 16 M
Updating for dependencies:
glibc-devel x86_64 2.5-34 base 2.4 M
glibc-headers x86_64 2.5-34 base 589 k
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 5 Package(s)
Remove 0 Package(s)
Total download size: 29 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): glibc-devel-2.5-34 100% |=========================| 2.4 MB 00:04
(2/5): glibc-common-2.5-3 100% |=========================| 16 MB 00:32
(3/5): glibc-headers-2.5- 100% |=========================| 589 kB 00:01
(4/5): glibc-2.5-34.i686. 100% |=========================| 5.2 MB 00:09
(5/5): glibc-2.5-34.x86_6 100% |=========================| 4.7 MB 00:08
Running rpm_check_debug
ERROR with rpm_check_debug vs depsolve:
Package glibc-devel needs glibc = 2.5-24, this is not available.
Package glibc-devel needs glibc = 2.5-24, this is not available.
Package glibc-devel needs glibc-headers = 2.5-24, this is not available.
Package glibc-devel needs glibc-headers = 2.5-24, this is not available.
Complete!
When I ran rpm -qi glib
afterwards, I saw version 2.5-24 still
listed. I tried yum update glibc
as well, though I didn't
expect the results to be different; they weren't. I then checked for
glibc files in the yum cache. There appeared to be both 32-bit and 64-bit
versions present.
# ls /var/cache/yum/base/packages/glibc*
/var/cache/yum/base/packages/glibc-2.5-24.i686.rpm
/var/cache/yum/base/packages/glibc-2.5-24.x86_64.rpm
/var/cache/yum/base/packages/glibc-2.5-34.i686.rpm
/var/cache/yum/base/packages/glibc-2.5-34.x86_64.rpm
/var/cache/yum/base/packages/glibc-common-2.5-24.x86_64.rpm
/var/cache/yum/base/packages/glibc-common-2.5-34.x86_64.rpm
/var/cache/yum/base/packages/glibc-devel-2.5-24.i386.rpm
/var/cache/yum/base/packages/glibc-devel-2.5-24.x86_64.rpm
/var/cache/yum/base/packages/glibc-devel-2.5-34.x86_64.rpm
/var/cache/yum/base/packages/glibc-headers-2.5-24.x86_64.rpm
/var/cache/yum/base/packages/glibc-headers-2.5-34.x86_64.rpm
I removed all of them from the yum cache with rm -f
/var/cache/yum/base/packages/glibc*
. When I tried
yum update glibc
again, however, the results
were the same.
I checked the arch of the installed glibc packages.
# rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n'|grep glibc
glibc-devel-2.5-24.x86_64
compat-glibc-headers-2.3.4-2.26.x86_64
compat-glibc-2.3.4-2.26.i386
glibc-devel-2.5-24.i386
compat-glibc-2.3.4-2.26.x86_64
glibc-2.5-24.x86_64
glibc-2.5-24.i686
glibc-common-2.5-24.x86_64
glibc-headers-2.5-24.x86_64
I did have 32-bit and 64-bit versions installed. I decided to try
listing all of the glibc packages for the yum update
command.
That worked much better.
# yum update glibc glibc-common glibc-devel glibc-headers
Loading "priorities" plugin
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* rpmforge: fr2.rpmfind.net
* base: mirrors.rit.edu
* updates: ftp.lug.udel.edu
* addons: ftp.lug.udel.edu
* extras: ftp.lug.udel.edu
338 packages excluded due to repository priority protections
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package glibc.x86_64 0:2.5-34 set to be updated
---> Package glibc-headers.x86_64 0:2.5-34 set to be updated
---> Package glibc-devel.i386 0:2.5-34 set to be updated
---> Package glibc-common.x86_64 0:2.5-34 set to be updated
---> Package glibc-devel.x86_64 0:2.5-34 set to be updated
---> Package glibc.i686 0:2.5-34 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
glibc x86_64 2.5-34 base 4.7 M
glibc i686 2.5-34 base 5.2 M
glibc-common x86_64 2.5-34 base 16 M
glibc-devel i386 2.5-34 base 2.0 M
glibc-devel x86_64 2.5-34 base 2.4 M
glibc-headers x86_64 2.5-34 base 589 k
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 6 Package(s)
Remove 0 Package(s)
Total download size: 31 M
Is this ok [y/N]: y
Downloading Packages:
(1/1): glibc-devel-2.5-34 100% |=========================| 2.0 MB 00:03
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : glibc-common ####################### [ 1/12]
Updating : glibc ####################### [ 2/12]
Updating : glibc ####################### [ 3/12]
warning: /etc/ld.so.conf created as /etc/ld.so.conf.rpmnew
warning: /etc/localtime created as /etc/localtime.rpmnew
warning: /etc/nsswitch.conf created as /etc/nsswitch.conf.rpmnew
Updating : glibc-headers ####################### [ 4/12]
Updating : glibc-devel ####################### [ 5/12]
Updating : glibc-devel ####################### [ 6/12]
Cleanup : glibc ####################### [ 7/12]
Cleanup : glibc-headers ####################### [ 8/12]
Cleanup : glibc-devel ####################### [ 9/12]
Cleanup : glibc-common ####################### [10/12]
Cleanup : glibc-devel ####################### [11/12]
Cleanup : glibc ####################### [12/12]
Updated: glibc.x86_64 0:2.5-34 glibc.i686 0:2.5-34 glibc-common.x86_64 0:2.5-34 glibc-devel.i386 0:2.5-34 glibc-devel.x86_64 0:2.5-34 glibc-headers.x86_64 0:2.5-34
Complete!
I then checked the architecture for the installed packages again:
# rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n'|grep glibc
glibc-devel-2.5-34.i386
glibc-2.5-34.x86_64
compat-glibc-headers-2.3.4-2.26.x86_64
compat-glibc-2.3.4-2.26.i386
glibc-headers-2.5-34.x86_64
glibc-common-2.5-34.x86_64
compat-glibc-2.3.4-2.26.x86_64
glibc-devel-2.5-34.x86_64
glibc-2.5-34.i686
But when I tried to install ncat again, I got the same error as before.
# rpm --install ncat-4.85BETA7-1.x86_64.rpm
error: Failed dependencies:
libc.so.6(GLIBC_2.7)(64bit) is needed by ncat-4.85BETA7-1.x86_64
When I checked on what was required for the ncat
package,
I saw the following:
# rpm --requires -qp ncat-4.85BETA7-1.x86_64.rpm
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.7)(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)
I then tried installing the 32-bit version of ncat
, but that
attempt failed as well.
# rpm --install ncat-4.85BETA7-1.i386.rpm
error: Failed dependencies:
libc.so.6(GLIBC_2.7) is needed by ncat-4.85BETA7-1.i386
Since I had already expended far more time than I anticipated in trying
to install netcat
, I decided to try an alternative program with
similar capabilities,
socat, instead. I didn't have any problems installing it.
# yum install socat
Loading "priorities" plugin
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* rpmforge: fr2.rpmfind.net
* base: mirrors.rit.edu
* updates: ftp.lug.udel.edu
* addons: centos.aol.com
* extras: ftp.lug.udel.edu
338 packages excluded due to repository priority protections
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package socat.x86_64 0:1.7.1.0-1.el5.rf set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
socat x86_64 1.7.1.0-1.el5.rf rpmforge 398 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 398 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): socat-1.7.1.0-1.el 100% |=========================| 398 kB 00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: socat ######################### [1/1]
Installed: socat.x86_64 0:1.7.1.0-1.el5.rf
Complete!
References:
-
Nmap
-
Ncat
MP: Weblog
-
Re: [rhelv5-list] Updating RHEL5.2 causes yum to loop infinitely...
The Mail Archive
-
Socat
Top 100 Nework Security Tools
-
socat - Multipurpose relay
dest-unreach.org
[/network/tools/scanning/nmap]
permanent link
Wed, Apr 01, 2009 11:37 am
Cherry Blossoms in Animal Crossing
When a family member started playing Animal Crossing™: City Folk on her
WII today, which is April 1,
i.e. April Fools Day in the U.S., she found a lot
of trees she had recently planted were now red. She thought the trees had died.
But the red leaves on some trees that appear in the game from April 1 through
April 7 represent cherry blossoms.
Each year in Japan and the U.S., as well as some other countries, there
are Cherry Blossom Festivals held when the cherry blossoms appear.
Japan gave the U.S. 3,020 sakura trees, aka cherry trees, to the U.S.
in 1912 as a gesture of friendship. Those trees were planted in
Sakura Park in
Manhattan and along the
Tidal Basin in Washington, D.C. Japan sent another 3,800 trees to the U.S.
in 1965. The annual
National Cherry Blossom Festival in D.C. has been a popular tourist
attraction in the early spring for many years.
Also on April 1, you can get a special gift, if you speak to Tortimer,
the tortoise-like character. If you talk to him on other special days,
you can get other items from him.
To get the following of Tortimer's goods, speak to him on the corresponding
day noted below.
- Cool Globe - Nature Day
- Leaf - April Fool's Day
- Picnic Basket - Labor Day
- Resetti Model - Groundhog Day
- Sailboat Model - Explorer's Day
- Wheat Bundle - Harvest Moon
References:
-
What does it mean if you have red trees ...
Date: April 5, 2008
GameSpot
-
Cherry blossom
Wikipedia, the free encyclopedia
-
National Cherry Blossom Festival
Wikipedia, the free encyclopedia
[/gaming/wii]
permanent link
Privacy Policy
Contact