Dial-up Networking IV
Summary:- Connecting A LAN Via Dial-up
- Getting the Software
- Dialer Setup
- DNS Cache Setup
Connecting A LAN Via Dial-up
Mandrake Linux 8.0 and later offer an easy way to configure connection sharing via the Mandrake Control Center. Mandrake Linux user Kevin ~McCormick however wasn't content with this basic setup. In this article he describes how to connect a small home network via a Mandrake Linux machine using a dialer and a DNS cache. The network consists of three machines, two of them running Mandrake Linux and one MS Windows 95. They are connected via a hub, the uplink is established via an ISDN Terminal Adapter (TA). The machine to which this adapter is connected to is referred to as the server. It has the IP 192.168.1.1. This IP is configured as the DNS server address on the clients. Make sure thatFORWARD_IPV4
trueGetting the Software
The "feature" of this configuration is the dialer and DNS cache. The dialer program is called dwun ('Dialer Without Useful Name'), and the DNS cache is called pdnsd (Proxy DNS Daemon). These programs allow any computer on the network to dial the ISP for web surfing or e-mail, as long as the server is running. Both projects offer source archives or precompiled RPM archives which should work fine on every Mandrake Linux 8.x system. section indexDialer Setup
For 'dwun', the preliminary details that must be resolved are the serial port and modem device file. In my case, the ISDN TA is attached to the first serial port '/dev/ttyS1', but that device will often be identified by a symlink, '/dev/modem'. Once that is verified, the proper modem initialization commands must be determined. This can be discovered by reading the modem user manual, and perhaps with minicom, a terminal communications program that comes with Mandrake and many other distributions. For my setup, 'dwun' uses 'pppd' (Point to Point Protocol daemon) and 'chat', which establishes the connection between the local pppd and that of your provider.The directions are found in the README file in the 'examples/chatscripts' directory.
The basic sequence of events in activating dwun is 1) read the '/etc/dwunrc' file at startup, 2) when requested, execute 'pppd' using a 'chat' script, and 3) when no computer in the network is asking for the Internet connection, disconnect and shut down 'pppd'. The options for pppd are typically found in a file called '/etc/ppp/options'. For 'dwun', however, you should back up that file and delete all lines from the original file.
According to man pppd, if 'pppd' is called with the argument call name, then 'pppd' will read the options from '/etc/ppp/peers/name'. This is the method used by 'dwun' in my setup. Thus, the '/etc/dwunrc' file contains the line:
commandon /usr/sbin/pppd call dwun
connect "/etc/dwun.chatscript /etc/ppp/phonelist"CONNECT
dial()
T "CONNECT 115200" dc Note the
ATD\\T
T is actually a placeholder for the ISP telephone number, placed in the '/etc/ppp/phonelist' file (so the phonelist file should not have blank or comment lines). This does allow one to have several ISP telephone numbers for 'dwun' to try in sequence until one actually works. The
CONNECT 115200
The client programs for dwun are really quite simple. Install 'gcdial' either from source or RPM. ~WinDWUN is for MS Windows 9x and 2000 machines and comes as an .exe which unpacks and installs itself.
Both have a very simple setup and work reliably. To use the clients, simply click on the client icon, click the connect button, and start your webbrowser.
For MS Windows, Netscape should be set to "direct connection to internet" and not to a proxy. section index
DNS Cache Setup
Now on to the setup of 'pdnsd'. There is one relevant point regarding the '/etc/ppp/peers/dwun' file. Do not include the option 'usepeerdns' if you intend to use 'pdnsd' or your own caching nameserver. The 'pdnsd' program has the benefits of providing name resolution without the overhead of BIND DNS. Also, it uses a cache file, so the name/address lookup results are not totally lost every time the server is restarted. My experience has shown an improvement is apparent server performance. After installation, the '/etc' directory will contain a file called 'pdnsd.conf.sample'. Copy that file and rename it to 'pdnsd.conf'.'pdnsd.conf' consists of two section which are of interest, 'global' and 'server'. Each option=value line ends with a semi-colon. In the 'global' section, I set
perm-cache=2048
paranoid=on
daemon=on
server_ip="192.168.1.1"nameserver 127.0.0.1
Conclusion
Both dwun and pdnsd should show up in ~DrakConf | System | Services Well, that does it for the How-To. I have no idea how secure these programs are, but I have not detected any problems. I have found this setup to be reliable and trouble free, and it seems that web surfing is faster. Everyone can learn to click on the dwun client icon and then the browser icon, so I do not have to assist with web-surfing very much. I hope this commentary has been helpful. section indexRelated Resources:
Speeding Up Your Net Browsing with PDNSD Domain Name CachingLightweight Caching Nameserver
Revision / Modified: June 07, 2002
Author: Kevin ~McCormick, edited by Tom Berger Legal: This page is covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft.
Dial-up Networking IV
Version 1.3 last modified by AdminWiki on 22/03/2004 at 09:44
Version 1.3 last modified by AdminWiki on 22/03/2004 at 09:44
Document data
- Lost account?
- Join the community, be part of the Club: it's free!
- Get the PWP Download Subscription!
Mandriva.com
Store
Club

