LPI 101 - Configure Modem and Sound Cards (2) : (Linux Professional Institute Certification)
LPI 101 - Configure Modem and Sound Cards (2) : (Linux Professional Institute Certification)
c 2002 Andrew Eager, Geoffrey Robertson. Permission is granted to make and distribute verbatim copies or modied 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 Foundationeither version 2 of the License or (at your option) any later version.
a Copyright
Setting Up a Shell Dialup Service . . . . . . . . . . Inbound Shell Login - Server . . . . . . . . . . . . Outbound Shell login - Client . . . . . . . . . . . . Setting Up a PPP Dialup Service . . . . . . . . . . . Inbound Dialup ppp - Server . . . . . . . . . . . . Outbound Dialup ppp - Client . . . . . . . . . . . . Adding Automatic DNS setup . . . . . . . . . . . .
5 6 7 8 9 12 17
Modem
Server
Client
Modem
Internet
5-a
5-b
5-c
5-d
4. Check that the modems DTR indicator is on. 5. Check mgetty is there: $ ps aux |grep mgetty root ...... /sbin/mgetty -x0 -s 57600 ttyS0
5-e
6-a
6-b
and dial your server: OK ATDT12345678 4. When the modem answers and trains, you should be presented with a login prompt. Login as you normally would.
Modem
Server
Client
Modem
Internet
6. Edit the le /etc/ppp/options and uncomment or add the lines: asyncmap 0 #auth crtscts lock modem -detach proxyarp 7. Edit the le /etc/ppp/options.ttyS0 and uncomment or add the line: 192.168.0.253:192.168.0.10 The format of this line is 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.
9
allowed-ip-addre *
This line says: Let user <username> with password <password> use any ppp interface with any IP address. The username and password can be anything you like and do not have to be in /etc/passwd. You will need the username and password pair when you come to set up the client.
10
Common to both methods: Edit /etc/modules.conf and add the following line: alias ppp0 ppp generic
11
From within X:
1. 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: The telephone number of the server The userid you selected in the server pap-secrets le The password you selected in the server pap-secrets le
12
13
14
Note that wvdial will add an entry into /etc/ppp/pap-secrets containing the username and password pair automatically.
16
Server Side:
Add the following line to /etc/ppp/options ms-dns <DNS-IPADDR1> ms-dns <DNS-IPADDR2> The DNS ip addresses should be whatever your server is using ($ cat to see). If your server is using the local /etc/resolv.conf interface (127.0.0.1) then you should set the address to that of eth0 and make sure that bind is congured to listen on that interface. The following line should be in /etc/named.conf listen-on <ip-address>
17
Client Side:
Add the following line to /etc/ppp/options usepeerdns Now create a le called /etc/ppp/ip-up.local which contains: cp /etc/resolv.conf /etc/ppp/resolv.conf.orig echo "nameserver $DNS1" > /etc/resolv.conf echo "nameserver $DNS2" >> /etc/resolv.conf Create another le called /etc/ppp/ip-down.local which contains: cp /etc/ppp/resolv.conf.orig /etc/resolv.conf Congratulations. You now have a server which behaves just like an ISP!
18
The End Setting Up a Shell Dialup Service . . . . . . . . . . Inbound Shell Login - Server . . . . . . . . . . . . Outbound Shell login - Client . . . . . . . . . . . . Setting Up a PPP Dialup Service . . . . . . . . . . . Inbound Dialup ppp - Server . . . . . . . . . . . . Outbound Dialup ppp - Client . . . . . . . . . . . . Adding Automatic DNS setup . . . . . . . . . . . . 5 6 7 8 9 12 17
19