%% $Header: /cvsroot/lcdp/lpic/general-linux-1/slides/gl1.101.3.slides.tex,v 1.3 2003/05/30 04:57:25 waratah Exp $ \input{gl1.slide-header.tex} \usepackage{epsfig} %\overlaysfalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80-> \begin{slide} %================================================================ \begin{center} \LARGE \textsf{-- General Linux 1 -- \\ Configure Modem and Sound cards [2]} \\[2mm] \large \textsf{(Linux Professional Institute Certification)}\\[1mm] \normalsize\end{center} \footnote{Copyright \copyright\ 2002 Geoffrey Robertson. Permission is granted to make and distribute verbatim copies or modified versions of this document provided that this copyright notice and this permission notice are preserved on all copies under the terms of the GNU General Public License as published by the Free Software Foundation---either version 2 of the License or (at your option) any later version.} \scriptsize \begin{verbatim} .~. Prepared by: Andrew Eager /V\ Geoffrey Robertson // \\ geoffrey robertson @._.@ geoffrey@zip.com.au \end{verbatim} \tiny \begin{verbatim} $Id: gl1.101.3.slides.tex,v 1.3 2003/05/30 04:57:25 waratah Exp $ \end{verbatim} \normalsize \vfill \end{slide} %----------------------------------------------------------- %----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80-> %============================================================================== \begin{slide}{} %ghr \Slidecontents \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide} %ghr \slideheading{Configure Modem and Sound cards [2]} \slidesubheading{(1.1) 101 Hardware \& Architecture [11]} \begin{description} \item[1.101.1] Configure BIOS Fundamental Settings [3] \item[1.101.3] {\bf \underline{Configure Modem and Sound cards [2]}} \item[1.101.4] Setup SCSI devices [2] \item[1.101.5] Setup different PC expansion cards [2] \item[1.101.6] Configure Communication Devices [2] \item[1.101.7] Set Up USB Devices [2] \end{description} \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide} %ghr \Slideheading{Configure Modem and Sound card [] } \slidesubheading{Objective} Ensure devices meet compatibility requirements (particularly that the modem is NOT a win-modem), verify that both the modem and sound card are using unique and correct IRQ's, I/O, and DMA addresses, if the sound card is PnP install and run sndconfig and isapnp, configure modem for outbound dial-up, configure modem for outbound PPP | SLIP | CSLIP connection, set serial port for 115.2 Kbps \vfill \end{slide} %----------------------------------------------------------- %============================================================================== \begin{slide} %ghr \Slideheading{Configure Modem and Sound card []} \slidesubheading{Key files, terms, and utilities} \begin{alltt} \end{alltt} \vfill \end{slide} %----------------------------------------------------------- %============================================================================== \begin{slide} %ghr \Slideheading{Configure Modem and Sound card []} \slidesubheading{Resources of interest} \begin{description} \item[]: \begin{alltt} \end{alltt} \item[]: \end{description} \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide}{} %ghr \slideheading{Setting Up a Shell Dialup Service} \fbox{\epsfig{file=../images/shell_dialup.eps,width=\textwidth}} \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide}{} \slideheading{Inbound Shell Login - Server} \begin{enumerate} \overlay{1} \item Edit \texttt{/etc/inittab} to automatically spawn \texttt{mgetty}. \begin{alltt} \cmd{tail -1 /etc/inittab} T0:2345:respawn:/sbin/mgetty -x0 -s 57600 -D ttyS0 \end{alltt} (Change ttyS0 to whatever device your modem is connected to) \overlay{2} \item Connect the modem and phone line. \overlay{3} \item Run \rootcmd{telinit q} to reread \texttt{/etc/inittab} \overlay{4} \item Check that the modem's \textsf{DTR} indicator is on. \overlay{5} \item Check \texttt{mgetty} is there: \begin{alltt} \cmd{ps aux |grep mgetty} root ...... /sbin/mgetty -x0 -s 57600 ttyS0 \end{alltt} \end{enumerate} \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide}{} \slideheading{Outbound Shell login - Client} \begin{enumerate} \overlay{1} \item Run \rootcmd{minicom -s} (as root) and setup the serial port to the desired \texttt{tty} and linespeed. \overlay{2} \item Give normal users access to the modem device. \overlay{3} \item Run minicom as a normal user. Once the modem has initialised typing \texttt{AT} at the minicom terminal will prompt the modem to return \texttt{OK}: \begin{alltt} AT \(\hookleftarrow\) OK \end{alltt} and dial your server: \begin{alltt} OK ATDT12345678 \end{alltt} \overlay{4} \item When the modem answers and trains, you should be presented with a login prompt. Login as you normally would. \end{enumerate} \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide}{} \slideheading{Setting Up a PPP Dialup Service} \fbox{\epsfig{file=../images/shell_dialup.eps,width=\textwidth}} \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide}{} \slideheading{Inbound Dialup \texttt{ppp} - Server} \begin{enumerate} \item Edit \texttt{/etc/inittab} to run \texttt{mgetty}. \begin{alltt} \cmd{tail -1 /etc/inittab} T0:2345:respawn:/sbin/mgetty -x0 -s 57600 -D ttyS0 \end{alltt} Change \texttt{ttyS0} to whatever device your modem is connected to. \item Add the following line (if not already there) to \texttt{/etc/modules.conf} \begin{alltt} alias ppp0 ppp\_generic \end{alltt} \item Connect modem and phone line. \item Run \rootcmd{telinit q} to reread \texttt{/etc/inittab} \item Edit \texttt{/etc/mgetty/login.config} and uncomment the line \begin{alltt} /AutoPPP/ - a_ppp /usr/sbin/pppd auth -chap +pap login debug \end{alltt} \item Edit the file \texttt{/etc/ppp/options} and uncomment or add the lines: \begin{alltt} asyncmap 0 #auth crtscts lock modem -detach proxyarp \end{alltt} \item Edit the file \texttt{/etc/ppp/options.ttyS0} and uncomment or add the line: \begin{alltt} 192.168.0.253:192.168.0.10 \end{alltt} The format of this line is \texttt{Server IP:Client IP}. Note that these addresses should be on the same network as your server unless you are prepared to setup routing for a new network. However, they should not clash with previously allocated IP addresses. \item Edit \texttt{/etc/ppp/pap-secrets} and add: \begin{alltt} #user interface password allowed-ip-addresses * * \end{alltt} This line says: Let user \verb++ with password \verb++ use any ppp interface with any IP address. The username and password can be anything you like and do not have to be in \texttt{/etc/passwd}. You will need the username and password pair when you come to set up the client. \end{enumerate} \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide}{} \slideheading{Outbound Dialup ppp - Client} NOTE: If your client \& server machines are already connected via a LAN you will probably need to bring down the LAN on your client machine. (Or at least remove any route associated with the LAN from the client). To do this: \texttt{ifconfig eth0 down} Type \cmd{/sbin/route -n} and make sure it looks like the line below before configuring ppp on the client: \begin{alltt} Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 127.0.0.0 * 255.0.0.0 U 0 0 0 lo \end{alltt} Common to both methods: Edit /etc/modules.conf and add the following line: \begin{alltt} alias ppp0 ppp\_generic \end{alltt} \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide}{} \slidesubheading{From within X:} \begin{enumerate} \item Run kppp and create an entry for your server, just as you would do for an ISP. The only items that need to be added are: \begin{itemize} \item The telephone number of the server \item The userid you selected in the server pap-secrets file \item The password you selected in the server pap-secrets file \end{itemize} \item Click the Connect button and you should be away!. \end{enumerate} \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide}{} \slidesubheading{From a terminal using wvdial:} Run \rootcmd{wvdialconf /etc/wvdial.conf}. You should end up with a file called \texttt{/etc/wvdial.conf} that looks something like: \begin{alltt} [Dialer Defaults] Modem = /dev/ttyS0 Baud = 115200 Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 S11=55 +FCLASS=0 ; Phone = ; Username = ; Password = \end{alltt} \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide}{} \slidesubheading{From a terminal using wvdial:} Now edit this file and add the following to the end of the file: \begin{alltt} [Dialer ] Username = username #just as you entered into pap-secrets on the server Password = passwd #just as you entered into pap-secrets on the server Phone = Inherits = Dialer Defaults Stupid mode = 1 New PPPD = 1 \end{alltt} Stupid mode tells wvdial to start pppd as soon as it sees the login prompt and not to log into the server as a normal user first. \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide}{} \slidesubheading{From a terminal using wvdial:} Now you can dial your server by doing the following: \begin{alltt} \cmd{wvdial } \end{alltt} Where \texttt{\textless server-name\textgreater } is the name you gave to the second dialer stanza above. Note that wvdial will add an entry into \texttt{/etc/ppp/pap-secrets} containing the username and password pair automatically. \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide}{} \slideheading{Adding Automatic DNS setup} You can have the server pass a pair of DNS IP addresses to the client which the client can use to resolve dns queries. If you do this, you should be able to use Windows as a client just like any other ISP. \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide}{} \slidesubheading{Server Side:} Add the following line to \texttt{/etc/ppp/options} \begin{alltt} ms-dns ms-dns \end{alltt} The DNS ip addresses should be whatever your server is using (\cmd{cat /etc/resolv.conf} to see). If your server is using the local interface (127.0.0.1) then you should set the address to that of eth0 and make sure that bind is configured to listen on that interface. The following line should be in \texttt{/etc/named.conf} \begin{alltt} listen-on \end{alltt} \vfill \end{slide} %----------------------------------------------------------- %============================================================================== %============================================================================== \begin{slide}{} \slidesubheading{Client Side:} Add the following line to \texttt{/etc/ppp/options} \begin{alltt} usepeerdns \end{alltt} Now create a file called \texttt{/etc/ppp/ip-up.local} which contains: \begin{alltt} cp /etc/resolv.conf /etc/ppp/resolv.conf.orig echo "nameserver \$DNS1" > /etc/resolv.conf echo "nameserver \$DNS2" >> /etc/resolv.conf \end{alltt} Create another file called /etc/ppp/ip-down.local which contains: \begin{alltt} cp /etc/ppp/resolv.conf.orig /etc/resolv.conf \end{alltt} Congratulations. You now have a server which behaves just like an ISP! \vfill \end{slide} %----------------------------------------------------------- %============================================================================== \begin{slide}{} %ghr \heading{The End} \Slidecontents \vfill \end{slide} %----------------------------------------------------------- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %============================================================================== %============================================================================== \begin{slide}{} \slideheading{} \vfill \end{slide} %----------------------------------------------------------- ============================================================================= \begin{slide}{} \end{slide} %------------------------------------------------------------------ \fbox{\epsfig{file=images/links2.fig.eps,height=.6\textwidth}} \begin{itemize} \overlay{1} \item \overlay{2} \item \overlay{3} \item \end{itemize}