File: lg_tips46.html

package info (click to toggle)
lg-issue46 1-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,324 kB
  • ctags: 108
  • sloc: sh: 266; perl: 86; makefile: 40
file content (485 lines) | stat: -rw-r--r-- 15,443 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> 
<html>
<head>
<title>More 2 Cent Tips & Tricks LG #46</title>
</head>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
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&#162; 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><font color="#CC0000">New Tips:</font></H3>
<!-- BEGIN xref tips -->
<ul>
<li><a HREF="#laptop">Laptop in different places, setting up different DNS
</a>
</ul>
<!-- END xref tips -->


<H3><font color="#CC0000">Answers to Mail Bag Questions:</font></H3> 

<!-- BEGIN xref tips.answers -->
<ul>
<li><a HREF="#laptop2">reply to Linux on a laptop
<li><a HREF="#signature">Funny signature
<li><a HREF="#dns_fly">DNS on the fly
<li><a HREF="#ati">ATI rage LT PRO AGP2X
<li><a HREF="#formatting"><I>LG</I> Formatting problems
<li><a HREF="#SiS">SiS6326
<li><a HREF="#metrolink">AGP2X
<li><a HREF="#speed">Poor Internet Speed
<li><a HREF="#mbr">Clearing Lilo from MBR
<li><a HREF="#telnet">Why are they trying to telnet into my Linux box?
</a>
</ul>
<!-- END xref tips.answers -->

<!-- BEGIN tips -->

<P> <hr> <P> 
<!--================================================================-->
<a name="laptop"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Laptop in different places, setting up different DNS
</FONT> </H3>
Tue, 21 Sep 1999 23:13:08 -0400
<BR>From: Pierre Abbat &lt;<A HREF="mailto:phma@oltronics.net">phma@oltronics.net&gt;</A>

<P> I use a laptop at home, at the office, and elsewhere. I set up a script so that
it recognizes where it is when it boots. It is /etc/rc.d/whereami and has mode
744:

<PRE>
#!/bin/sh
# Figure out where I am by pinging known hosts.
if [ -z "`/sbin/ifconfig|grep Ethernet`" ] ; then sleep 2 ; fi
echo -n elsewhere &gt;/etc/where
ping -c 1 192.168.97.1 &amp;&amp; echo -n home &gt;/etc/where
ping -c 1 192.168.96.1 &amp;&amp; echo -n office &gt;/etc/where
chmod 0644 /etc/where
</PRE>

<P> (Names and numbers have been changed to protect the innocent.) I call this from
/etc/rc.d/init.d/inet, which is run after pcmcia, so the card is up by then.
(The sleep 2 is in case it isn't.) Then I do the following:

<PRE>
cp /etc/resolv.conf.`cat /etc/where` /etc/resolv.conf
</PRE>

<P> This installs the appropriate nameserver list.

<P> The two networks I'm on are next door to each other, which means I can
supernet the card and ping both without ifconfigging it. But if one were
10.*.*.* and the other on 192.168.*.*, I'd have to ifconfig eth0 in whereami to
ping them both.

<P> phma





<!-- END tips -->

<P> <hr> <P> 
<!--================================================================-->
<H4><font color="maroon">
Tips in the following section are answers to questions printed in the Mail
Bag column of previous issues.
</font></H4> 

<!-- BEGIN tips.answers -->

<P> <hr> <P> 
<!--================================================================-->
<a name="laptop2"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
ANSWER: <FONT COLOR="navy">reply to Linux on a laptop
</FONT> </H3>
Thu, 2 Sep 1999 14:09:36 -0700
<BR>From: Russ Johnson &lt;<A HREF="mailto:rjohnson@tripwiresecurity.com">rjohnson@tripwiresecurity.com&gt;</A>

<P> You said: 

<BLOCKQUOTE>
	I'm a linux newbie. I installed linux (redhat 5.2) on a laptop with an
	ATI rage LT PRO AGP2X, and there's no driver for this graphic card to
	run Xwindow, I tried to find one on the web, but without success, I
	also tried other ATI drivers (like ATI rage pro and other MACH64
	drivers) without better results. Is there any solution ? Please help
	me... 
</BLOCKQUOTE>

<P> You bet there's a solution. It's not perfect (yet) but it works well until
XFree86 gets a new server out there.
The solution is to use the Frame Buffer server. Details are here:
<A HREF=http://www.0wned.org/~cain/ragefury.htm>
www.0wned.org/~cain/ragefury.htm</A>
Other than that, the only solution available is to purchase a commercial X
server.

<P> Russ




<P> <hr> <P> 
<!--================================================================-->
<a name="signature"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
ANSWER: <FONT COLOR="navy">Funny signature
</FONT> </H3>
Fri, 3 Sep 1999 03:03:41 +0300 (IDT)
<BR>From: Mikhael Goikhman &lt;<A HREF="mailto:migo@cortext.co.il">migo@cortext.co.il&gt;</A>

<P> Hi, Csaba Feher.

<P> I am refering to your tip in LG #45.
Please don't get me wrong, I don't want to bash you, why should I? :)

<P> 1) sigchange script itself has redudant IMHO lines (rm, cat, echo?).
Here is a smaller version:

<PRE>
#!/bin/sh
cp $HOME/.signature.basic $HOME/.signature &gt;&amp; /dev/null
/usr/games/fortune -s linuxcookie computers &gt;&gt; $HOME/.signature
</PRE>

<P> 2) It is not very good to put home grown scripts to /bin or /usr/bin.
This is what /usr/local/bin and $HOME/bin is for.

<P> 3) It is not very good to put something to /etc/rc.d/rc.sysinit.
This is what /etc/rc.d/rc.local is for.

<P> Have a nice day,
Mikhael.




<P> <hr> <P> 
<!--================================================================-->
<a name="dns_fly"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
ANSWER: <FONT COLOR="navy">DNS on the fly
</FONT> </H3>
Fri, 3 Sep 1999 12:40:53 +0900

<BR>From:  Dmytro Koval'ov &lt;<A HREF="mailto:kov@tokyo.email.ne.jp">kov@tokyo.email.ne.jp&gt;</A>


<P> Ernst-Udo Wallenborn &lt;wall@phys.chem.ethz.ch&gt; suggests:

<BLOCKQUOTE>
	i use the SCHEMES facility of the PCMCIA package to solve a related
	problem: how to use a laptop in two LANs with different IP addresses,
	different domains, and (naturally) different DNS servers.
</BLOCKQUOTE>
	
Basically you set up a file /etc/pcmcia/network.opts which contains all network
options, esp. something like:
	
<PRE>
case "$ADDRESS" in
home,*,*,*)
[snip]
SEARCH="domain.com"
DNS_1="1.2.3.4"
DNS_2=""
DNS_3=""
[snip]
;;
work,*,*,*)
[snip]
SEARCH="work.com"
DNS_1="5.6.7.8"
DNS_2=""
DNS_3=""
[snip]
</PRE>

<P> Then, when booting with lilo you can append SCHEME=home or SCHEME=work, or
better write this into /etc/lilo.conf directly. and type 'home' or 'work' at
the lilo prompt.

<P> Well, may be I was lucky enough - I didn't understand what SCHEMES
mean when I was doing my setup ;)

<P> The problem with approach of Ernst-Udo is that you need to reboot
system when you come home from work. But this is a Linux world and nobody
needs a reboot just to change the IP address and/or DNS.

<P> Another approach I'm using with the same /etc/pcmcia/network.opts file
is to have different setup for different PCMCIA slots. In this file you can find
comment:

<PRE>
#
# The address format is "scheme,socket,instance,hwaddr".
#
</PRE>

<P> This comment explains setup below:

<PRE>
case "$ADDRESS" in
*,0,*,*)
[snip]
    IPADDR="1.2.3.40"
    SEARCH="domain.com"
    DNS_1="1.2.3.4"
    DNS_2=""
    DNS_3=""
case "$ADDRESS" in
*,1,*,*)
[snip]
    IPADDR="5.6.7.80"
    SEARCH="work.com"
    DNS_1="5.6.7.8"
    DNS_2=""
    DNS_3=""
</PRE>


<P> Having this you'll have only to plug you NIC into 1st PCMCIA slot at
home and into 2nd slot at work. You IP addresses and DNS are set
correctly upon card insertion! No reboots.




<P> <hr> <P> 
<!--================================================================-->
<a name="ati"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
ANSWER: <FONT COLOR="navy">ATI rage LT PRO AGP2X
</FONT> </H3>
Sat, 04 Sep 1999 10:53:59 +0200
<BR>From: August =?iso-8859-1?Q?H=F6randl?= &lt;<A HREF="mailto:hoerandl@elina.htlw1.ac.at">hoerandl@elina.htlw1.ac.at&gt;</A>


<P> hi,
there are some cards which can be used with a new framebuffer X server

<P> there is a description at
<A HREF=http://home.t-online.de/home/mueller.elmar/linux.htm>
home.t-online.de/home/mueller.elmar/linux.htm</A>
(german only)

<P> regards<BR>
Gustl



<P> <hr> <P> 
<!--================================================================-->
<a name="formatting"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
ANSWER: <FONT COLOR="navy"><I>LG</I> Formatting problems
</FONT> </H3>
Wed, 8 Sep 1999 16:52:41 +0100
<BR>From: James Tappin &lt;<A HREF="mailto:sjt@star.sr.bham.ac.uk">sjt@star.sr.bham.ac.uk&gt;</A>

<P> A clue as to the source of the Opera formatting problem (Mailbag Sep '99 -
message from Bjorn Eriksson 27/Aug) comes from the fact that KFM (1.1.2 pre 3
release of KDE) also has the same problem which strongly suggests a QT problem
as (IIRC) Opera for Linux is also QT based.

<P> Not sure of any way around it though.

<P> James Tappin




<P> <hr> <P> 
<!--================================================================-->
<a name="SiS"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
ANSWER: <FONT COLOR="navy">SiS6326
</FONT> </H3>
Thu, 9 Sep 1999 14:11:23 -0500
<BR>From: McKown, John &lt;<A HREF="mailto:JMckown@Insurdata.com">JMckown@Insurdata.com&gt;</A>

<P> There is a commercial driver from Xig which is supposed to support this
card. You can look at 
<A HREF=http://www.xig.com/Pages/CardMfgrSiS.html>
www.xig.com/Pages/CardMfgrSiS.html</A>

<P> It is EXPENSIVE! US $99.95! <ouch>. I've not used the Xig X server, so I
don't know how good it is. I have seen some good reviews.



<P> <hr> <P> 
<!--================================================================-->
<a name="metrolink"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
ANSWER: <FONT COLOR="navy">AGP2X
</FONT> </H3>
Thu, 9 Sep 1999 14:11:48 -0500
<BR>From: McKown, John &lt;<A HREF="mailto:JMckown@Insurdata.com">JMckown@Insurdata.com&gt;</A>

<P> Have you looked at Metro Link? Go to 
<A HREF=http://www.metrolink.com>http://www.metrolink.com</A>. They
indicate that they have a driver for this card. Actually it says "Rage LT
Pro AGP" not "AGP2X". I don't know if it is any different. However, it is
not free. It costs US$39. If you have a credit card that they can accept,
you can download the driver from their FTP server. I have had their driver
for 2 days now for my STB Riva 128/ZX which did not work well with the
XFree86 supplied driver. It works very well with their driver. Just a
thought. 

<P> I hope it is of some help to you. 

<P> By the way - your English is quite good.




<P> <hr> <P> 
<!--================================================================-->
<a name="speed"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
ANSWER: <FONT COLOR="navy">Poor Internet Speed
</FONT> </H3>
Thu, 9 Sep 1999 14:12:03 -0500
<BR>From: McKown, John &lt;<A HREF="mailto:JMckown@Insurdata.com">JMckown@Insurdata.com&gt;</A>

<P> If your system got good speed at your friend's house but not yours, then I
can only think of one of two possibilities. One - you friend has a better
modem or Two - your friend has a better telephone connection. I would bet on
the telephone connection. I regularly connect at around 44,000. I have a
friend who says that he can only get around 24,000. But he is in the
"boonies" and I'm using a commercial grade line to my house. 




<P> <hr> <P> 
<!--================================================================-->
<a name="mbr"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
ANSWER: <FONT COLOR="navy">Clearing Lilo from MBR
</FONT> </H3>
Thu, 23 Sep 1999 02:34:20 -0700
<BR>From: Jim Dennis &lt;<A HREF="mailto:jimd@starshine.org">jimd@starshine.org&gt;</A>

 
<BLOCKQUOTE>
<P> Just read the item on clearing lilo.

<P> All I do is boot from a Dos ( 5 or greater ) boot disc and issue the
command:

<P> fdisk /mbr

<P> that seems to fix anything including boot sector viruses.
Maybe Linux fdisk would take the same parameter.
I enjoy your column, keep up the good work,
best wishes,

<P> norm
</BLOCKQUOTE>

<P> The /MBR option was undocumented and only introduced in
MS-DOS 5.0.  I don't remember the question to which you
were referring.  If I didn't mention FDISK /MBR it was
probably because I was not assuming that the user was
trying to restore an MS-DOS 5.0 or later boot loader
to their system.

<P> Linux fdisk is a different program and doesn't
touch the boot code in the MBR.  It only works on the
partition tables (which comprise the last 66 bytes of the
MBR and possibly a set of others for extended partitions).

<P> There are several Linux programs which do write boot
records.  /sbin/lilo is the most commonly used.  'dd' 
will do in a pinch (if you have a .bin image to put into
place).

<P> BTW: don't count on /MBR to fix a virus.  Some viruses
encrypt portions of your filesystem, thus causing major
problems if they aren't removed corectly.  To prevent
infection by boot sector viruses, disable the "floppy
boot" options in your BIOS.  You should only enable those
long enough to perform an OS installation or system recovery
and disable it immediately thereafter.  To prevent viral
infect by "multi-partite" and "file infector" viruses,
stop running MS-DOS.  To avoid MS Windows macro viruses,
avoid MS Office, MS Exchange and related software (with 
virus^H^H^H^H macroing hooks built into them).


<P> <hr> <P> 
<!--================================================================-->
<a name="telnet"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
ANSWER: <FONT COLOR="navy">Why are they trying to telnet into my Linux box?
</FONT> </H3>
Fri, 24 Sep 1999 14:32:22 -0400
<BR>From: Rick Smith &lt;<A HREF="mailto:rsmith13@tampabay.rr.com">rsmith13@tampabay.rr.com&gt;</A>

<P> Since my previous letter about Dalnet providers trying to connect to my
Linux box via telnet port 23, I have found out that they are also trying
port 1080.  I have instigated a policy of dropping all incoming
connections via a command run by host.deny:

<PRE>
/sbin/ipfwadm -I -i deny -S %a
</PRE>

<P> I hate to do this to my niece, but I don't know of any alternative until
these dalnet jerks stop this intrusive practice.

<P> Anyway, my niece has moved to other irc providers that don't
do this kind of thing. 





<!-- END tips.answers -->

<!-- BEGIN copyright ==================================================-->
<P> <hr> <P> 
<H5 ALIGN=center>
This page written and maintained by the Editor of the <I>Linux Gazette</I>,
<A HREF=mailto:gazette@ssc.com>gazette@ssc.com</A><BR>

Copyright &copy; 1999, Specialized Systems Consultants, Inc.<BR> 
Published in Issue 46 of <i>Linux Gazette</i>, October 1999</H5>
<!-- END copyright ===================================================-->

<!--startcut footer ===================================================-->
<P> <hr> <P> 
<A HREF="lg_toc46.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../lg_frontpage.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="lg_answer46.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="../lg_faq.html"
	><IMG SRC="./../gx/dennis/faq.gif"
              ALT="[ Linux Gazette FAQ ]"></A>
<A HREF="al-mohssen.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 
</BODY></HTML>
<!--endcut ============================================================-->