yet more adminmanual changes
[spider.git] / html / adminmanual-3.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4  <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
5  <TITLE>The DXSpider Installation and Administration Manual : Configuration</TITLE>
6  <LINK HREF="adminmanual-4.html" REL=next>
7  <LINK HREF="adminmanual-2.html" REL=previous>
8  <LINK HREF="adminmanual.html#toc3" REL=contents>
9 <link rel=stylesheet href="style.css" type="text/css" title="default stylesheet">
10 </HEAD>
11 <BODY>
12 <A HREF="adminmanual-4.html">Next</A>
13 <A HREF="adminmanual-2.html">Previous</A>
14 <A HREF="adminmanual.html#toc3">Contents</A>
15 <HR>
16 <H2><A NAME="s3">3. Configuration</A></H2>
17
18 <H2><A NAME="ss3.1">3.1 Allowing ax25 connects from users</A>
19 </H2>
20
21 <P>As stated previously, the aim of this document is not to tell you how to 
22 configure Linux or the ax25 utilities.  However, you do need to add a line 
23 in your ax25d.conf to allow connections to DXSpider for your users.  For
24 each interface that you wish to allow connections on, use the following format ...
25 <P>
26 <BLOCKQUOTE><CODE>
27 <PRE>
28 default  * * * * * *  - sysop /spider/src/client client %u ax25
29 </PRE>
30 </CODE></BLOCKQUOTE>
31 <P>or, if you wish your users to be able to use SSID's on their callsigns ..
32 <P>
33 <BLOCKQUOTE><CODE>
34 <PRE>
35 default  * * * * * *  - sysop /spider/src/client client %s ax25
36 </PRE>
37 </CODE></BLOCKQUOTE>
38 <P>
39 <H2><A NAME="ss3.2">3.2 Allowing telnet connects from users</A>
40 </H2>
41
42 <P>Allowing telnet connections is quite simple.  Firstly you need to add a line 
43 in /etc/services to allow connections to a port number, like this ....
44 <P>
45 <BLOCKQUOTE><CODE>
46 <PRE>
47 spdlogin   8000/tcp     # spider anonymous login port
48 </PRE>
49 </CODE></BLOCKQUOTE>
50 <P>Then add a line in /etc/inetd.conf like this ....
51 <P>
52 <BLOCKQUOTE><CODE>
53 <PRE>
54 spdlogin stream tcp nowait root /usr/sbin/tcpd /spider/src/client login telnet
55 </PRE>
56 </CODE></BLOCKQUOTE>
57 <P>
58 <P>This needs to be added above the standard services such as ftp, telnet etc.  
59 Once this is done, you need to restart inetd like this ....
60 <P>
61 <BLOCKQUOTE><CODE>
62 <PRE>
63 killall -HUP inetd
64 </PRE>
65 </CODE></BLOCKQUOTE>
66 <P>
67 <P>
68 <P>Now login as <EM>sysop</EM> and cd spider/perl. You can test that spider 
69 is accepting telnet logins by issuing the following command ....
70 <P>
71 <BLOCKQUOTE><CODE>
72 <PRE>
73 ./client.pl login telnet
74 </PRE>
75 </CODE></BLOCKQUOTE>
76 <P>You should get a login prompt and on issuing a callsign, you will be given 
77 access to the cluster.  Note, you will not get a password login.  There seems 
78 no good reason for a password prompt to be given so it is not asked for.
79 <P>
80 <P>Assuming all is well, then try a telnet from your linux console ....
81 <P>
82 <BLOCKQUOTE><CODE>
83 <PRE>
84 telnet localhost 8000
85 </PRE>
86 </CODE></BLOCKQUOTE>
87 <P>
88 <P>You should now get the login prompt and be able to login as before.
89 <P>
90 <H2><A NAME="ss3.3">3.3 Setting up node connects</A>
91 </H2>
92
93 <P>In order to allow cluster node connections, spider needs to know that the 
94 connecting callsign is a cluster node.  This is the case whether the connect 
95 is incoming or outgoing.  In spider this is a simple task and can be done in 
96 runtime.
97 <P>
98 <P>Later versions of Spider can distinguish different software and treat them
99 differently.  For example, the WCY beacon cannot be handles by AK1A type
100 nodes as AK1A does not know what to do with PC73.  There are 4 different
101 types of node at present and although they may not have any major
102 differences at the moment, it allows for compatibility.  The 4 types are ...
103 <P>
104 <BLOCKQUOTE><CODE>
105 <PRE>
106 set/node        (AK1A type)
107 set/spider
108 set/dxnet
109 set/clx
110 </PRE>
111 </CODE></BLOCKQUOTE>
112 <P>
113 <P>For now, we will assume that the cluster we are going to connect to is an
114 AK1A type node.
115 <P>
116 <P>Start up the cluster as you did before and login as the sysop with client.pl.
117 The cluster node I am wanting to make a connection to is GB7BAA but you would
118 obviously use whatever callsign you required.  At the prompt type ...
119 <P>
120 <BLOCKQUOTE><CODE>
121 <PRE>
122 set/node gb7baa
123 </PRE>
124 </CODE></BLOCKQUOTE>
125 <P>
126 <P>The case does not matter as long as you have a version of DXSpider later than 
127 1.33.  Earlier versions required the callsign to be in upper case.
128 <P>
129 <P>That is now set, it is as simple as that.  To prove it, login on yet another 
130 console as sysop, cd to spider/perl and issue the command ...
131 <P>
132 <BLOCKQUOTE><CODE>
133 <PRE>
134 ./client.pl gb7baa (using the callsign you set as a node)
135 </PRE>
136 </CODE></BLOCKQUOTE>
137 <P>
138 <P>You should get an initialisation string from DXSpider like this ...
139 <P>
140 <BLOCKQUOTE><CODE>
141 <PRE>
142 ./client.pl gb7baa
143 PC38^GB7MBC^~
144 </PRE>
145 </CODE></BLOCKQUOTE>
146 <P>If the callsign you just set up as a cluster node is for an incoming connect, 
147 this is all that needs to be done.  If the connection is to be outgoing then 
148 a connection script needs to be written.
149 <P>
150 <H2><A NAME="ss3.4">3.4 Connection scripts</A>
151 </H2>
152
153 <P>Because DXSpider operates under Linux, connections can be made using just about 
154 any protocol;  AX25, NETRom, tcp/ip, ROSE etc are all possible examples.  
155 Connect scripts live in the /spider/connect directory and are simple ascii files.  
156 Writing a script for connections is therefore relatively simple.  
157 <P>
158 <P>The connect scripts consist of lines which start with the following keywords 
159 or symbols:-
160 <P>
161 <PRE>
162         
163 #               All lines starting with a # are ignored, as are completely 
164                 blank lines.
165
166 timeout         timeout followed by a number is the number of seconds to wait for a 
167                 command to complete. If there is no timeout specified in the script 
168                 then the default is 60 seconds.
169
170 abort           abort is a regular expression containing one or more strings to look 
171                 for to abort a connection. This is a perl regular expression and is 
172                 executed ignoring case.
173
174 connect         connect followed by ax25 or telnet and some type dependent 
175                 information. In the case of a telnet connection, there can be up to 
176                 two parameters.
177                 The first is the ip address or hostname of the computer you wish to 
178                 connect to and the second is the port number you want to use (this 
179                 can be left out if it is a normal telnet session).
180                 In the case of an ax25 session then this would normally be a call to
181                 ax25_call or netrom_call as in the example above. It is your
182                 responsibility to get your node and other ax25 parameters to work 
183                 before going down this route!
184
185 '               ' is the delimiting character for a word or phrase of an expect/send 
186                 line in a chat type script. The words/phrases normally come in pairs,
187                 either can be empty. Each line reads input from the connection until 
188                 it sees the string (or perl regular expression) contained in the
189                 left hand string. If the left hand string is empty then it doesn't 
190                 read or wait for anything. The comparison is done ignoring case.
191                 When the left hand string has found what it is looking for (if it is)
192                 then the right hand string is sent to the connection.
193                 This process is repeated for every line of chat script. 
194
195 client          client starts the connection, put the arguments you would want here 
196                 if you were starting the client program manually. You only need this 
197                 if the script has a different name to the callsign you are trying to 
198                 connect to (i.e. you have a script called other which actually 
199                 connects to GB7DJK-1 [instead of a script called gb7djk-1]).
200 </PRE>
201 <P>
202 <P>There are many possible ways to configure the script but here are two examples, 
203 one for a NETRom/AX25 connect and one for tcp/ip.  
204 <P>
205 <BLOCKQUOTE><CODE>
206 <PRE>
207 timeout 60
208 abort (Busy|Sorry|Fail)
209 # don't forget to chmod 4775 netrom_call!
210 connect ax25 /usr/sbin/netrom_call bbs gb7djk g1tlh
211 'Connect' '' 
212 'Connect' 'c np7'
213 'Connect' 'c gb7dxm'
214 # you can leave this out if you call the script 'gb7dxm'
215 client gb7dxm ax25
216 </PRE>
217 </CODE></BLOCKQUOTE>
218 <P>
219 <P>
220 <P>
221 <BLOCKQUOTE><CODE>
222 <PRE>
223 timeout 15
224 connect telnet dirkl.tobit.co.uk
225 'login' 'gb7djk'
226 'word' 'gb7djk'
227 # tell GB7DJK-1 that it is connected to GB7DJK
228 # you can leave this out if you call this script 'gb7djk'
229 client gb7djk telnet
230 </PRE>
231 </CODE></BLOCKQUOTE>
232 <P>
233 <P>Both these examples assume that everything is set up properly at the other end.  
234 You will find other examples in the /spider/examples directory.
235 <P>
236 <H2><A NAME="ss3.5">3.5 Starting the connection</A>
237 </H2>
238
239 <P>You start the connection, from within a sysop enabled cluster login, by typing 
240 in the word <EM>connect</EM> followed by a script name like this ....
241 <P>
242 <BLOCKQUOTE><CODE>
243 <PRE>
244 G0VGS de GB7MBC 13-Dec-1998 2041Z >connect gb7djk-1
245 connection to GB7DJK-1 started
246 G0VGS de GB7MBC 13-Dec-1998 2043Z >
247 </PRE>
248 </CODE></BLOCKQUOTE>
249 <P>This will start a connection using the script called <EM>gb7djk-1</EM>.  You can
250 follow the connection by watching the term or console from where you started
251 <EM>cluster.pl</EM>.  You should see something like this ...
252 <P>
253 <BLOCKQUOTE><CODE>
254 <PRE>
255 &lt;- D G1TLH connect gb7djk-1
256 -> D G1TLH connection to GB7DJK-1 started
257 -> D G1TLH G1TLH de GB7DJK 13-Dec-1998 2046Z >
258 timeout set to 15
259 CONNECT sort: telnet command: dirkl.tobit.co.uk
260 CHAT "login" -> "gb7djk"
261 received "
262 Red Hat Linux release 5.1 (Manhattan)
263 Kernel 2.0.35 on an i586
264 "
265 received "login: "
266 sent "gb7djk"
267 CHAT "word" -> "gb7djk"
268 received "gb7djk"
269 received "Password: "
270 sent "gb7djk"
271 Connected to GB7DJK-1, starting normal protocol
272 &lt;- O GB7DJK-1 telnet
273 -> B GB7DJK-1 0
274 GB7DJK-1 channel func  state 0 -> init
275 &lt;- D GB7DJK-1 
276 &lt;- D GB7DJK-1 Last login: Sun Dec 13 17:59:56 from dirk1
277 &lt;- D GB7DJK-1 PC38^GB7DJK-1^~
278 &lt;- D GB7DJK-1 PC18^ 1 nodes, 0 local / 1 total users  Max users 0  Uptime 
279 0 00:00^5447^~
280     etc
281 </PRE>
282 </CODE></BLOCKQUOTE>
283 <P>
284 <P>With later versions of Spider there is a set/login command for users.  This 
285 tells them when a user or node logs in or out.  If you do not add a line to 
286 your scripts after the final line (or before the client line which should always 
287 be last if needed) then the login/logout information will be sent to users
288 <I>before</I> the login actually completes.  This means if a node is 
289 unreachable, it will continue sending logins and logouts to users even though it 
290 is not actually connecting.  To avoid this use the following line ...
291 <P>
292 <BLOCKQUOTE><CODE>
293 <PRE>
294 'connect' ''
295 </PRE>
296 </CODE></BLOCKQUOTE>
297 <P>
298 <P>In a script, this might look like ...
299 <P>
300 <BLOCKQUOTE><CODE>
301 <PRE>
302 timeout 35 
303 abort (Busy|Sorry|Fail)
304 connect telnet mary 3000
305 'ogin:' 'gb7mbc'
306 '>' 'telnet 44.131.93.96 7305'
307 'connect' ''
308 </PRE>
309 </CODE></BLOCKQUOTE>
310 <P>
311 <H2><A NAME="ss3.6">3.6 Telnet echo</A>
312 </H2>
313
314 <P>Cluster links in particular suffer greatly from the presence of telnet echo.  
315 This is caused by the telnet negotiation itself and can create at worst severe 
316 loops.  At best it creates unnecessary bandwidth and large logfiles!  There are
317 things that can be done to limit this problem but will not always work dependent 
318 on the route taken to connect.
319 <P>
320 <P>Telnet echo itself should only be a problem if the connection is being made to 
321 the telnet port (23).  This port uses special rules that include echo negotiation.
322 If the connection is to a different port, such as 8000, this negotiation does 
323 not happen and therefore no echo should be present.
324 <P>
325 <P>Sometimes it is not possible to make a direct connection to another node and this 
326 can cause problems.  There is a way of trying to suppress the telnet echo but 
327 this will not always work, unfortunately it is difficult to be more specific.  
328 Here is an example of what I mean ...
329 <P>
330 <BLOCKQUOTE><CODE>
331 <PRE>
332 timeout 35
333 abort (Busy|Sorry|Fail)
334 connect telnet mary.lancs.ac.uk
335 'ogin:' 'gb7mbc'
336 'word:' 'mypasswd'
337 '\$' 'stty -echo raw'
338 '\$' 'telnet 44.131.93.96'
339 'connect' ''
340 </PRE>
341 </CODE></BLOCKQUOTE>
342 <P>So, the first connection is made by Spider.  This is fine as Spider uses the
343 Net_Telnet script from within perl.  This actually uses TCP rather than TELNET 
344 so no negotiation will be done on the first connection.  Once connected to
345 mary.lancs.ac.uk, the command is sent to suppress echo.  Now a telnet is made 
346 to a cluster node that is accepting connections on port 23.  The problem with 
347 this link is that the negotiation is made by the remote machine, therefore you 
348 have no control over it.  The chances are that this link will create echo and 
349 there will be no way you can stop it.
350 <P>
351 <P>
352 <HR>
353 <A HREF="adminmanual-4.html">Next</A>
354 <A HREF="adminmanual-2.html">Previous</A>
355 <A HREF="adminmanual.html#toc3">Contents</A>
356 </BODY>
357 </HTML>