841 lines
30 KiB
HTML
841 lines
30 KiB
HTML
<!--startcut ==========================================================-->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<html>
|
|
<head>
|
|
<title>More 2 Cent Tips & Tricks Issue 25</title>
|
|
</head>
|
|
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
|
|
ALINK="#FF0000">
|
|
<!--endcut ============================================================-->
|
|
<H4>"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
<P> <hr> <P>
|
|
|
|
<!-- QUICK TIPS SECTION ================================================== -->
|
|
<center>
|
|
<H1><A NAME="tips"><IMG ALIGN=MIDDLE ALT="" SRC="../gx/twocent.gif">
|
|
More 2¢ Tips!</A></H1> <BR>
|
|
Send Linux Tips and Tricks to <A HREF="mailto:gazette@ssc.com">
|
|
gazette@ssc.com
|
|
</A></center>
|
|
|
|
<p><hr><p>
|
|
<H3>Contents:</H3>
|
|
<ul>
|
|
<li><a HREF="./lg_tips25.html#vim">Linux - 2 Cents about vim for pico
|
|
users</a>
|
|
<li><a HREF="./lg_tips25.html#blink">My 1/50th of a Dollar</a>
|
|
<li><a HREF="./lg_tips25.html#sound">sound problems</a>
|
|
<li><a HREF="./lg_tips25.html#filter">Filtering output of binary files</a>
|
|
<li><a HREF="./lg_tips25.html#eggs">Easter Eggs in Netscape</a>
|
|
<li><a HREF="./lg_tips25.html#gabby">RE: Perl and HTML</a>
|
|
<li><a HREF="./lg_tips25.html#update">Update locate</a>
|
|
<li><a HREF="./lg_tips25.html#spaces">Doing spaces in file names</a>
|
|
<li><a HREF="./lg_tips25.html#mail">Mailing binary files to Microsoft
|
|
clients</a>
|
|
<li><a HREF="./lg_tips25.html#route">Linux and Routing</a>
|
|
<li><a HREF="./lg_tips25.html#rout2">Linux and Routing 2</a>
|
|
<li><a HREF="./lg_tips25.html#about">Netscape's Abouts</a>
|
|
<li><a HREF="./lg_tips25.html#netscape">Netscape on the Desktop</a>
|
|
<li><a HREF="./lg_tips25.html#print">Re: Printing Problems</a>
|
|
<li><a HREF="./lg_tips25.html#computer">Re: Using a 386 Computer</a>
|
|
</ul>
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="vim"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Linux - 2 Cents about vim for pico users
|
|
</H3>
|
|
<P>
|
|
Date: Mon, 5 Jan 1998 23:07:20 +0100<br>
|
|
From: Sven Guckes <a
|
|
href="mailto:guckes@math.fu-berlin.de">guckes@math.fu-berlin.de</a><br>
|
|
<p>
|
|
I just read the "2 cent tips" again and I thought you might enjoy this tip:
|
|
<p>
|
|
Several people enjoy the editor "pico" but do not feel comfortable with an
|
|
editor like "vim" for several reasons - one of these being that it is so
|
|
easy to do reformat the current paragraph with ^J (control-j) within pico
|
|
while it is so "difficult" within Vim. Well, all it takes is two mappings
|
|
for Vim:
|
|
<pre>
|
|
nmap <C-J> vipgq
|
|
nmap <C-J> gq
|
|
</pre>
|
|
Put these mappings into your setup file (on Unix and esp Linux this is ~/.vimrc)
|
|
and you can use ^J to reformat the current paragraph or the currently
|
|
highlighted text (use 'V' and some movement commands to do that, for example).
|
|
<p>
|
|
More tips can be obtained from these Pages:
|
|
<pre>
|
|
http://www.vim.org/ Vim Home Page
|
|
http://www.vim.org/faq/ Vim FAQ
|
|
http://www.vim.org/answ.html Vim Answers Page
|
|
(for everything not yet in the VIM FAQ)
|
|
http://www.vim.org/rc Sven's Huge Setup File with comments
|
|
</pre>
|
|
And for those people who use "some vi" but never got the hang of it -
|
|
here is a page about "why" you would want to use a vi clone such as Vim:
|
|
<pre>
|
|
http://www.vim.org/why.html
|
|
</pre>
|
|
Enjoy!
|
|
<p>
|
|
Sven
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="blink"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
My 1/50th of a Dollar
|
|
</H3>
|
|
<P>
|
|
Date: Wed, 07 Jan 1998 01:27:09 +0000<br>
|
|
From: Michael Katz-Hyman <a
|
|
href="mailto:mkatshym@erols.com">mkatshym@erols.com</a><br>
|
|
<p>
|
|
Here is a small shell script I wrote to blink the scroll lock on my
|
|
keyboard when new mail arrived.
|
|
<p>
|
|
--------------------------------------------------------------
|
|
<pre>
|
|
#!/bin/bash
|
|
#
|
|
# Keyboard blinky thingy when you have new mail, sleeps 5 minutes if you
|
|
don't
|
|
#
|
|
# Michael Katz-Hyman (mkatshym@erols.com) running Linux 2.0.33 Red Hat
|
|
4.0
|
|
|
|
Mail_File = "/var/spool/mail/mkatshym"
|
|
|
|
# The static file is used to make the script a daemon (I just test to
|
|
see if /bin/bash is present :- )
|
|
|
|
Static_File="/bin/bash"
|
|
|
|
LED_SET_COMMAND_ON = "/usr/bin/setleds +scroll"
|
|
|
|
LED_SET_COMMAND_OFF = "/usr/bin/setleds -scroll"
|
|
|
|
Sleep_Command = "/bin/sleep 2m"
|
|
|
|
|
|
# O.k. lets get started
|
|
|
|
while [ -e $Static_File ]; do
|
|
while [ -s $Mail_File ]; do
|
|
|
|
$LED_SET_COMMAND_ON
|
|
$LED_SET_COMMAND_OFF
|
|
done
|
|
|
|
if [ ! -sMail_FIle ]; then
|
|
|
|
/bin/sleep 5m
|
|
fi
|
|
done
|
|
</pre>
|
|
------------------------------------------------------------------
|
|
<p>
|
|
Michael Katz-Hyman
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="sound"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
sound problems
|
|
</H3>
|
|
<P>
|
|
|
|
Date: Wed, 7 Jan 1998 09:48:10 -0600 (CST)<br>
|
|
From: Mike Hammel <a
|
|
href="mailto:mhammel@stassw10">mhammel@stassw10</a><br>
|
|
<pre>
|
|
> Have installed RedHat 5.0 and configured the sound card using sndconfig.
|
|
> All went well and I heard the demo sound bite of Linus. However, I
|
|
> have never heard another sound since. When browsing web sites with sound,
|
|
> no audio is played. Anyone have any ideas?
|
|
</pre>
|
|
First, cat an audio file to the audio device: cat file > /dev/audio. If
|
|
you get sound out then the device is fine. The problem is probably that
|
|
you haven't configured your browser to play the audio. With Netscape you
|
|
would use the Preferences->Navigator->Applications option. You'll need to
|
|
configure the various audio types to be played using whatever tool you
|
|
choose (I don't play much audio, so don't have anything configured in
|
|
my browser to do so). The cat command will work with .au files, and maybe
|
|
.wav (I think), but possibly not with others. You might want to look at
|
|
the Linux Application and Utilities Page or the Linux Midi and Sound Page for
|
|
hints on getting applications for playing sound files. Both of these have
|
|
links on the Software Resources page at the Linux Journal:
|
|
<a
|
|
href="http://www.linuxresources.com/apps.html">http://www.linuxresources.com/apps.html</a>.
|
|
<p>
|
|
Hope this helps a little.
|
|
<p>
|
|
Michael J. Hammel
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="filter"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Filtering output of binary files
|
|
</H3>
|
|
<P>
|
|
Date: Wed, 7 Jan 1998 14:56:05 -0500<br>
|
|
From: Sylvain Falardeau <a
|
|
href="mailto:sfalardeau@clic.net">sfalardeau@clic.net</a>
|
|
<p>
|
|
When you do a cat/grep/etc. of binary files on a tty, the terminal may
|
|
become unusable because of some control character.
|
|
<p>
|
|
Guido Socher (eedgus@aken104.eed.ericsson.se) suggests a
|
|
<p>
|
|
sed -e 's/[^ -~][^ -~]*/ /g'
|
|
<p>
|
|
to filter unprintable characters. You can simply use a
|
|
<p>
|
|
cat -v
|
|
<p>
|
|
and all the control characters are escaped to be printable. It's very
|
|
useful when you are "cating" files and don't know if they contains control
|
|
characters.
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="eggs"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Easter Eggs in Netscape
|
|
</H3>
|
|
<P>
|
|
Date: Thu, 8 Jan 1998 11:53:51 +0000 (GMT)<br>
|
|
From: Caolan McNamara <a
|
|
href="mailto:caolan@skynet.csn.ul.ie">caolan@skynet.csn.ul.ie</a>
|
|
<pre>
|
|
* From: Ivan Griffin ivan.griffin@ul.ie
|
|
*
|
|
* These special URLs do interesting things in Netscape Navigator and Communicator.
|
|
*
|
|
* about:cache gives details on your cache
|
|
* about:global gives details about global history
|
|
* about:memory-cache
|
|
* about:image-cache
|
|
* about:document
|
|
* about:hype
|
|
* about:plugins
|
|
* about:editfilenew
|
|
*
|
|
* view-source:URL opens source window of the URL
|
|
*
|
|
* Ctrl-Alt-F take you to an interesting site :-)
|
|
</pre>
|
|
At least some of the netscape developers have an about for themselves,
|
|
e.g about:kahern.
|
|
<p>
|
|
C.
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="gabby"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
RE: Perl and HTML
|
|
</H3>
|
|
<P>
|
|
Date: Thu, 08 Jan 1998 16:58:44 +0000<br>
|
|
From: Carl Mark Windsor <a
|
|
href="mailto:mbdtscw@cerberus.mcc.ac.uk">mbdtscw@cerberus.mcc.ac.uk</a>
|
|
<p>
|
|
In reply to Gabriele Giansante (gvgsoft@madnet.it), whose return
|
|
mail address does not seem to work.
|
|
<p>
|
|
--------------------------------------------------------------<br>
|
|
Gabriele,
|
|
<p>
|
|
The #!/usr/local/bin/perl line is what is used to indicate
|
|
that this is a perl script, but netscape is not clever enough to
|
|
know this, it has to be told.
|
|
<p>
|
|
Go to Options / General Preferences / Helpers and edit (if it
|
|
exists) or create (if it doesn't) the following configuration
|
|
<pre>
|
|
Description: Perl Script
|
|
Type: application/perl
|
|
Suffix: pl
|
|
</pre>
|
|
Tick the Application box and put the path
|
|
<pre>
|
|
Application: /usr/sbin/perl <-----(or the path to your perl)
|
|
</pre>
|
|
Sorry if you have heard this all before!
|
|
<p>
|
|
Carl
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="update"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Update locate
|
|
</H3>
|
|
<p>
|
|
Date: Sat, 10 Jan 1998 19:16:31 +0000<br>
|
|
From: Joaquim Baptista <a
|
|
href="mailto:px@helios.si.fct.unl.pt">px@helios.si.fct.unl.pt</a>
|
|
<p>
|
|
Both Redhat and Slackware (not sure about Debian) install the package
|
|
updatedb. This package has two programs:<pre>
|
|
- "updatedb" scans the filesystem and generates a database of existing files.
|
|
This is run every night as root.
|
|
- "locate" is run by users to quickly locate files on the filesystem,
|
|
using the database generated by updatedb.
|
|
</pre>
|
|
My problem is that "updatedb" runs at 4:40 in the morning, and my machine
|
|
is rarely running at 4:40. Thus the database is never updated and "locate"
|
|
never finds any recent file.
|
|
<p>
|
|
The solution is not very simple: updating the database hits the disk hard
|
|
and takes some time; it is hardly a task to be performed every hour.
|
|
<p>
|
|
My solution is to run a script every hour that updates the database only if
|
|
it is more than 24 hours old. I (ab)used find to do the task.
|
|
<p>
|
|
Here is the script "run-updatedb":
|
|
<pre>
|
|
#!/bin/sh
|
|
/usr/bin/find /var/spool/locate/locatedb -mtime +1 -exec \
|
|
/usr/bin/updatedb \
|
|
--prunepaths='/tmp /usr/tmp /var/tmp /mnt /cdrom /floppy /var/spool' \;
|
|
</pre>
|
|
I also had to change the crontab for root: I commented the old line that
|
|
runs updatedb at 4:40, and added a line that runs my script every hour:
|
|
<pre>
|
|
0 * * * * /usr/local/sbin/run-updatedb 1> /dev/null 2> /dev/null
|
|
</pre>
|
|
One final note: I believe that both Redhat and Debian have
|
|
"super-crontabs." That means that you must fish around in /etc
|
|
(/etc/cron?) for extra crontab files (long live Slackware!).
|
|
<p>
|
|
Best regards,<br>
|
|
Joaquim Baptista, alias pxQuim
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="spaces"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Doing spaces in file names
|
|
</H3>
|
|
<p>
|
|
Date: Tue, 13 Jan 1998 18:16:48 -0800 (PST)<br>
|
|
From: Mark Lundeberg <a href="mailto:ae885@pgfn.bc.ca">ae885@pgfn.bc.ca</a>
|
|
<p>
|
|
If you think Win95/NT filenames are better than Linux ones, think again.
|
|
In bash, (this may work in csh, but I never use it) use quotes to enclose
|
|
the filename in the parameters of a program:
|
|
<p>
|
|
echo "test" > "spaced name"
|
|
<p>
|
|
and do an ls, and you see a space in the middle of the filename!
|
|
This can be used for confusing people, by going:
|
|
<p>
|
|
echo "Hi" > "test "
|
|
<p>
|
|
(notice the space at the end of "test ").
|
|
<p>
|
|
Then, someone tries to open the file "test" as it looks from ls, but all it
|
|
does is open a new file.
|
|
<p>
|
|
PS: The ext2 filesystem allows names of up to 255 chars long, just like
|
|
Loseows 95.
|
|
<p>
|
|
Go Linux!
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="mail"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Mailing binary files to Microsoft clients
|
|
</H3>
|
|
<p>
|
|
Date: Fri, 16 Jan 1998 12:37:22 +0000 (GMT)<br>
|
|
From: Ivan Griffin <a href="mailto:ivan.griffin@ul.ie">ivan.griffin@ul.ie</a>
|
|
|
|
<h2>Mailing binary files to Microsoft clients...</h2>
|
|
<p>
|
|
Quite often I receive a mail with an attachment in that weird Microsoft
|
|
format which is not quite MIME. It's easy for a Unix client to decode such
|
|
attachments -- save the message as a file, and run uudecode or the
|
|
excellent freeware uudeview on it.
|
|
<p>
|
|
However, sending a mail message to such a Microsoft mail user is a little
|
|
different -- you cannot send them a standard MIME message (unless they are
|
|
using Exchange I believe). I have found the following script useful in
|
|
such situations.
|
|
<p>
|
|
Say, for example, I wanted to send a file foo.gif to user mike. I would
|
|
run my script as follows:
|
|
|
|
<pre>
|
|
msmail_encode foo.gif > mail_message
|
|
</pre>
|
|
|
|
<p>
|
|
Then I would read the mail message into the body of the message I wanted
|
|
to send. This script could easily be improved to include automatic
|
|
mailing, and editing of the mail message proper.
|
|
|
|
<pre>
|
|
#!/bin/sh
|
|
echo "[[ $1 : 2628 in $1 ]]"
|
|
echo ""
|
|
echo " Microsoft document attached. "
|
|
echo ""
|
|
echo " Regards, "
|
|
echo " Ivan."
|
|
echo ""
|
|
echo "The following binary file has been uuencoded to ensure successful"
|
|
echo "transmission. Use UUDECODE to extract."
|
|
echo
|
|
cat $1 | uuencode $1
|
|
</pre>
|
|
|
|
<p>
|
|
By the way, I have no idea what the 2628 above refers to. It is
|
|
a number generated somehow by Microsoft mail clients, but they don't seem
|
|
to need it, so the 2628 is a value I received once in a mail message.
|
|
<p>
|
|
Regards,<br>
|
|
Ivan.
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="route"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Linux and Routing
|
|
</H3>
|
|
<p>
|
|
Date: Sat, 17 Jan 1998 11:02:43 -0800<br>
|
|
From: James C. Carr <a href="mailto:jccarr@nwlink.com">jccarr@nwlink.com</a>
|
|
<p>
|
|
I am not sure if you have already received a reply regarding your
|
|
question on routing a LAN to the 'net, so I thought I'd go ahead and
|
|
give it a shot. The CC to <i>Linux Gazette</i> is just in case no one else
|
|
has sent in a more elaborate reply. ;) Also, this is something that was
|
|
mentioned back in <i>Linux Journal</i> number 43 ( November 1997 ), so most of
|
|
this stems from that particular article, "IP Masquerading Code
|
|
Follow-UP". To avoid re-hashing someone else's wonderful article, I'll
|
|
just skim over what I use here at my own home.
|
|
<p>
|
|
======================================================================<br>
|
|
Linux and Routing with ipfwadm<br>
|
|
======================================================================
|
|
<p>
|
|
Getting Linux to route information between a LAN and the 'net will
|
|
require you to re-compile the kernel with IP Masquerading support. Of
|
|
course, one could also use firewalls and disable the routing, but I
|
|
don't have experience with that just yet. If your kernel version is <
|
|
2.0.30, you'll need to enable the "Code Maturity Level" option at
|
|
re-compilation -- this gives you access to the other Network Options in
|
|
the kernel, such as IP Masquerading support.
|
|
<p>
|
|
After installing the new kernel, obtain and install the ipfwadm
|
|
program; this usually comes installed on a base Debian 1.3.1 system, and
|
|
is easily obtainable for Red Hat. Executing ipfwadm from my end
|
|
includes the following commands:
|
|
<pre>
|
|
/sbin/ipfwadm -F -p deny
|
|
</pre>
|
|
This portion breaks down as follows:<p>
|
|
-F -- Notify ipfwadm that
|
|
you're modifying the IP forwarding rules.<br>
|
|
-p -- Tell ipfwadm that
|
|
you want to deny the forwarding of incoming packets.
|
|
<p>
|
|
I've
|
|
experienced certain web pages that will not open with this option
|
|
set; it's probably some Microsoftian plot, you know. ;)
|
|
<pre>
|
|
/sbin/ipfwadm -F -a m -S 192.168.0.0/24 -D 0.0.0.0/0
|
|
</pre>
|
|
-F is the same as above.<br>
|
|
-a -- Append the following rule to the
|
|
list, in this case, we're (m) masquerading the following rule.<br>
|
|
-S
|
|
-- We're going to masquerade the computers in the 192.168.0.*
|
|
address range. Since this is a "local" set of IP numbers, it'll
|
|
work with all computers on the LAN with these IP addresses.<br>
|
|
-D --
|
|
The forwarding destination will be 0.0.0.0, the equivalent of the
|
|
gateway address on a PPP defaultroute.
|
|
<pre>
|
|
/sbin/ipfwadm -F -l -n
|
|
</pre>
|
|
Let's make sure this thing is up and running.
|
|
<p>
|
|
-l -- List all IP #
|
|
forwarding rules;<br>
|
|
-n -- convert the information to numeric format.
|
|
<p>
|
|
Of course, you'll need to have assigned your computers with IP
|
|
addresses within the 192.168.0.* range to use the exact commands above.
|
|
On my own setup, the primary computer gets 192.168.0.1, and the others
|
|
fall in succession. Be sure to have all the computers that are being
|
|
masqueraded set their gateway address to the primary, e.g.
|
|
secondary.my.com (192.168.0.2) uses primary.my.com (192.168.0.1) as
|
|
its gateway to the 'net.
|
|
<p>
|
|
For a far more in-depth article regarding this type of set-up, I do
|
|
suggest reading Chris Kostick's article "IP Masquerading Code Follow-up"
|
|
in the November 1997 issue of <i>Linux Journal</i>. Not only does it cover the
|
|
basics, but the author also explains a few more subtle aspects to
|
|
ipfwadm. Besides, without the help of this article, I wouldn't even
|
|
know the small amount about ipfwadm that I do. :)
|
|
<p>
|
|
======================================================================
|
|
<p>
|
|
I hope this helped at least a little,
|
|
<p>
|
|
-- James
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="rout2"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Linux and Routing 2
|
|
</H3>
|
|
<p>
|
|
Date: Tue, 6 Jan 1998 13:25:57 -0500 (EST)<BR>
|
|
From: Paul Lussier, <A
|
|
HREF="mailto:plussier@LanCity.COM">plussier@LanCity.COM</A>
|
|
<p>
|
|
> I plan on getting a cable modem soon, so the bandwidth would be pretty<BR>
|
|
> high, so that is why I have decided to try to make this connection<BR>
|
|
> provide for my whole house via a LAN connection in my home. What I<BR>
|
|
> have read is that you could use the private IPs, meaning the 10.x.x.x<BR>
|
|
> or so, 192.168.x.x and some others for the IP of the LAN and have<BR>
|
|
> these connect to some box (the LINUX box?) that would provide its<BR>
|
|
> connection to the internet to the inside LAN connected to the box. Is<BR>
|
|
> the problem that you would have to route the assigned address to the<BR>
|
|
> private IPs for the LAN use. I have also read that this would slow<BR>
|
|
> down the connection a bit or something, but that is a price I am<BR>
|
|
> willing to pay. So, the summary of the question is how would I be able<BR>
|
|
> to connect many computers to the internet via just 1 assigned IP<BR>
|
|
> address? I would like to be able to do it using my LINUX box connected<BR>
|
|
> to the internet via cable modem, and to my LAN via an Ethernet<BR>
|
|
> link. Any help is much appreciated, thanks.<BR>
|
|
<p>
|
|
This caught my attention, especially since I'm the Unix admin for
|
|
Baynetworks Broadband Technology Division (formerly LANcity) and we
|
|
pretty much invented this technology, along with being the leader in
|
|
the Cable modem industry :) Now that I've got the plug in for company
|
|
I'll get down to your problem :)
|
|
<p>
|
|
I first must admit that 1.) I don't own a cable modem (I can't get
|
|
cable, long story :( and 2.) I don't do any routing of this nature.
|
|
But I have read a lot about it, and I do work with cable modems, so I
|
|
think I can help a little :)
|
|
<p>
|
|
The first thing to understand is that with Linux, you don't want to be
|
|
routing, and definitely do not want to run routed to do what you want
|
|
to accomplish. Rather, you want to be doing IP forwarding/IP
|
|
masquerading which you would enable in the kernel by
|
|
re-configuring/re-compiling a new kernel. You'll definitely want to
|
|
scour the HOWTOs, I believe there is one on this subject. In
|
|
addition, you may want to check out the Linux Network and/or Systems
|
|
Administrator's guides, as they too, probably have some good
|
|
infomation in them. Other good references may be:
|
|
<ul>
|
|
<li>The NET-2/3 HOWTO
|
|
<li>The Ethernet HOWTO
|
|
<li>The Multiple Ethernet Mini HOWTO
|
|
<li>Networking with Linux
|
|
</ul>
|
|
The Firewalling and Proxy Server HOWTO is probably the best bet, now
|
|
that I look, since what you really want to do is set up firewall to
|
|
prevent people from coming in, and a proxy server to allow your
|
|
internal lan to get out.
|
|
<p>
|
|
Some words of caution. DO NOT HAVE YOUR LAN CONNECTED AT THE TIME OF
|
|
THE CABLE MODEM INSTALLATION!!!! MediaOne, Cablevision, Time Warner,
|
|
and most of the other cable companies (we deal with them all here)
|
|
will refuse to connect a LAN to their broadband network. Simply
|
|
remove your hub or coax cable from view, and let them do what they
|
|
need to do, then connect everything else up after they leave. =20
|
|
<p>
|
|
You will need 2 Ethernet NICs in the system which will be connected to
|
|
the broadband, one for the cable modem and one for the internal LAN..
|
|
Most cable companies will gladly provide and install one for you
|
|
(MediaOne charges $120 for a 3C509 + labor). I recommend telling them
|
|
you have a NIC, and going out and buying one and installing it yourself.
|
|
<p>
|
|
The cable modem, in reality, is NOT a modem. It's an Ethernet Bridge.
|
|
When the modem^H^H^H^H^Hbridge boots/powers up it does a bootp request
|
|
to a server at the cable companies central office to obtain an IP
|
|
address. The NIC is also assigned an IP address, which (at least with
|
|
MediaOne) is registered to the MAC address on the NIC (MediaOne
|
|
doesn't want you to move the modem to another computer after they
|
|
leave. They apparently check the modems from time to time to see what
|
|
MAC they're connected to). Therefore, you want your proxy
|
|
server/firewall configured so that it prevents all incoming
|
|
connections from the cable modem and allows only outgoing connections.
|
|
You want the IP forwarding/masquerading set up to allow other systems
|
|
on your private lan to use the proxy server as a proxy server (I'm not
|
|
sure if using the term gateway here is correct).
|
|
<p>
|
|
Some other interesting tidbits of information about cable modems and
|
|
cable companies:
|
|
<ol>
|
|
<li>Do not expect support for running a LAN over the cable modem
|
|
from the cable company. They don't want you to do it, they
|
|
won't help you do it.
|
|
|
|
<li>Do not expect to put up a web server to be accessed by from
|
|
the internet. You are a client, not a server. This
|
|
technology,though fully capable of performing in this
|
|
manner, is not being deployed for use this way. Cable
|
|
companies WILL shut you down for running a server of anykind
|
|
on your end of the network, and it can be *forever* :(
|
|
|
|
<li>Spammers love cable/broadband networks. There have been
|
|
several cases where a broadband network customer has been
|
|
used by spammers and were subsequently shutdown for life by
|
|
the cable company. What happens is the person decides to
|
|
connect their private LAN to the cable modem but sets the
|
|
firewall up incorrectly. Spammers search cable/broadband
|
|
networks for proxy servers/firewalls (Usually Win95/NT) that
|
|
allow incoming connections and then use that system to spam
|
|
the entire cable/broadband network making the spam appear as
|
|
if you sent it. Usually you will be given 1 warning by the
|
|
cable company, but there have been cases where none was
|
|
given and the customer was completely shut down.
|
|
|
|
<li>The current BayNetworks LANcity modems (the LCp product) being
|
|
deployed in homes is limited to 1 MAC address connection
|
|
(which means you can't plug the modem into a
|
|
repeater/mini-hub in order to connectit to multiple
|
|
systems). It is sotfware upgradable to 16 MACs, but you'll
|
|
pay a fortune for it to the cable company. However, an
|
|
ethernet switch works wonders :)
|
|
|
|
<li>Current modems are capable of transmitting at 10Mbs in both
|
|
directions, but are usually deployed throttled back to a
|
|
trasmit speed of 300Kbs and a recieve speed of 1.5Mbs. You
|
|
want more bandwidth, they'll be happy to charge you more
|
|
money :)
|
|
</ol>
|
|
I hope this helps a little bit. Feel free to e-mail me if you have
|
|
any questions.
|
|
<p>
|
|
Seeya,
|
|
Paul
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="about"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Netscape's Abouts
|
|
</H3>
|
|
<p>
|
|
Date: Tue, 20 Jan 1998 16:00:46 +0100<br>
|
|
From: "Stefan K." <a
|
|
href="mailto:kampi@physik3.gwdg.de">kampi@physik3.gwdg.de</a>
|
|
<p>
|
|
I've read the article about the about's of Netscape...
|
|
Here's some more (some of them may not work or simply do nothing)
|
|
<p>
|
|
about:montulli<br>
|
|
about:nihongo<br>
|
|
about:francais<br>
|
|
about:plugins<br>
|
|
about:document<br>
|
|
about:license<br>
|
|
about:cache<br>
|
|
about:global<br>
|
|
about:image-cache<br>
|
|
about:memory-cache<br>
|
|
about:security<br>
|
|
about:hype<br>
|
|
about:blank<br>
|
|
about:mozilla<br>
|
|
about:security?subject-logo=<br>
|
|
about:security?<br>
|
|
about:security?banner-mixed<br>
|
|
about:security?banner-insecure<br>
|
|
about:security?banner-secure<br>
|
|
about:security?banner-payment<br>
|
|
mocha:<br>
|
|
javascript:<br>
|
|
livescript:<br>
|
|
view-source:<br>
|
|
about:FeCoNtExT=123
|
|
<p>
|
|
PEACE!<br>
|
|
kampi
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="netscape"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Netscape on the Desktop
|
|
</H3>
|
|
<p>
|
|
Date: Sat, 24 Jan 1998 06:46:22 -0500<br>
|
|
From: Tim Hawes <a href="mailto:tim@donet.com">tim@donet.com</a>
|
|
<p>
|
|
I do a lot of my web development work at home on my Linux box. Netscape
|
|
for Linux does not automatically check for an existing Netscape session.
|
|
As a result, if you try to run two different Netscape sessions, you will
|
|
get an error message box with something like the following:
|
|
<pre>
|
|
Netscape has detected a /home/thawes/.netscape/lock
|
|
file.
|
|
|
|
This may indecate that another user is running
|
|
Netscape using your /home/thawes/.netscape files.
|
|
It appears to be running on host localhost under process-ID 316.
|
|
|
|
You may continue to use Netscape, but you will
|
|
be unable to use the disk cache, global history,
|
|
or your personal ceritificates.
|
|
</pre>
|
|
Blah, blah, blah.
|
|
<p>
|
|
If you are like me, and like to have links to URL's using Netscape on
|
|
your menus, FVWM GoodStuff or desktop icons, this can be a real
|
|
nuisance, having to completely start a new Netscape session each time.
|
|
Or you can have them link with this:
|
|
<p>
|
|
netscape -remote 'openURL(your.url)
|
|
<p>
|
|
But then none of your links will work if Netscape is not currently
|
|
running. This shell script will look for the lock file that Netscape
|
|
creates when it is started. If it does not find the lock file, it will
|
|
start a fresh Netscape session. If it does find it, it will send a
|
|
netscape -remote command to your current session with the URL you
|
|
provide in the argument. If you do not provide a URL, netscape will
|
|
simply give you a popup message indicating that you did not specify a
|
|
URL. If you do not want Netscape to start up a new window for the URL,
|
|
just get rid of the
|
|
"new-window"
|
|
in the argument in the shell script.
|
|
<pre>
|
|
#!/bin/sh
|
|
if [ -L $HOME/.netscape/lock ]
|
|
then exec /usr/local/netscape/netscape -remote
|
|
'openURL('$*',new-window)';
|
|
else exec /usr/local/netscape/netscape $*;
|
|
fi
|
|
exit 0
|
|
</pre>
|
|
There are limitations with this script. First of all, if Netscape did
|
|
not exit cleanly after the last session, then the lock file will still
|
|
be present in your ~/.netscape directory. The script will then try to
|
|
execute a netscape -remote command and will error out with the console
|
|
message that Netscape is not running on :0.0. If you are not redirecting
|
|
your console messages anywhere, then you will not see anything except
|
|
Netscape not-starting.
|
|
<p>
|
|
1. Do a ps to see if there are any zombie processes left
|
|
over from your last netscape session.<br>
|
|
2. Kill all zombie processes<br>
|
|
3. $ rm ~/.netscape/lock<br>
|
|
4. retry
|
|
<p>
|
|
I am sure there is a way to automate this through a shell script as
|
|
well, but I have not yet any time nor motivation to write it.
|
|
Some other shortcomings include trying to start Netscape composer with
|
|
the -remote argument for a currently running netscape session. But then
|
|
this is probably why you should never name a shell script after the
|
|
actual binary it attempts to start.
|
|
<p>
|
|
All in all, if you envy the functionality of Netscape on Windows 95,
|
|
automatically checking for an existing netscape session to send the
|
|
browser surfing, and starting a new session if it does not find it,
|
|
well, here is a simple solution for Linux users, using the power of the
|
|
shell.
|
|
<p>
|
|
Tim Hawes
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="print"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Printing Problems
|
|
</H3>
|
|
<p>
|
|
Date: Sat, 31 Jan 1998 20:09:18 +0100 (MET)<BR>
|
|
From: Roland Smith, <A HREF="mailto:rsmith06@ibm.net">rsmith06@ibm.net</A>
|
|
<P>
|
|
>Anyone that can help me. I'd love to hear it. I try running <BR>
|
|
>lpr, but everytime I get no name for local machine.<BR>
|
|
>How do I set this and/or what is the problem. <BR>
|
|
>Manish Oberoi
|
|
<P>
|
|
It sounds like you're using LPRng. This is a new version of lpr that's
|
|
more suitable for networks. It is included in the newer Slackware releases
|
|
and maybe others.
|
|
<P>
|
|
My solution was to grab the bsdlpr.tgz package from ftp.cdrom.com and use
|
|
that (This is meant for Slackware). Otherwise you can search the Net for
|
|
"bsdlpr".
|
|
<P>
|
|
-- Roland
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
|
|
<a name="computer"></a>
|
|
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
|
|
Re: Using a 386 Computer
|
|
</H3>
|
|
<p>
|
|
Date: Sat, 31 Jan 1998 20:13:09 +0100 (MET)<BR>
|
|
From: Roland Smith, <A HREF="mailto:rsmith06@ibm.net">rsmith06@ibm.net</A>
|
|
<P>
|
|
>I used to have a 386 25 MHz computer. Not long time ago I bought a<BR>
|
|
>Pentium 200 MHz computer. Since then I have not played with 386.<BR>
|
|
>Is there any easy and economical way to connect the 386 to the <BR>
|
|
>Pentinum computer where I will install the Release 5.0. If so,<BR>
|
|
>what I can do with it or at lease what I can learn from it.
|
|
<P>
|
|
If you connect both machines with a parallel cable, and configure PLIP
|
|
into the kernel on both machines, you can have your own little network. A
|
|
386 should at least work nice as a terminal, even if it might not run X
|
|
:-)
|
|
<P>
|
|
-- Roland
|
|
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<center>Published in Linux Gazette Issue 25, February 1998</center>
|
|
<P> <hr> <P>
|
|
<!--================================================================-->
|
|
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
|
|
CONTENTS ]"></A> <A HREF="../index.html"><IMG SRC="../gx/homenew.gif"
|
|
ALT="[ FRONT PAGE ]"></A> <A HREF="./lg_mail25.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
|
|
<A HREF="./lg_bytes25.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
|
|
|
|
<P> <hr> <P>
|
|
<h5>This page maintained by the Editor of <I>Linux Gazette</I>,
|
|
<A HREF="mailto: gazette@ssc.com">gazette@ssc.com</A><BR>
|
|
Copyright © 1998 Specialized Systems Consultants, Inc. </H5>
|
|
<P>
|
|
<!--startcut ==========================================================-->
|
|
</body>
|
|
</html>
|
|
<!--endcut ============================================================-->
|