SpinnNet-Dialup-HOWTO SpinnNet-Dialup-HOWTO Matt Grommes, sysadmin@spinn.net version 0.75, August 23 1999 This document describes the procedure for configuring Linux (specific instructions for Redhat Linux 6) to access the internet. The addresses and numbers included are specific to SpinnNet as this document was written with our customers in mind. This document assumes you have a working Linux system and a working knowledge of the Internet and Internet terminology. 1. Introduction Copyright Disclaimer New versions of this document Feedback Thanks 2. How do I configure my system? Configuring your modem WinModems Plug & Play Modems External Modems Internal Non Plug & Play Modems DNS info PPP 3. How do I connect to SpinnNet? Graphical tools At the command line 4. How do I ... Surf the web? Read my email? Access other computers? Other 5. END SpinnNet-Dialup-HOWTO Page 1 1. Introduction 1.1 Copyright Copyright (c) 1999 by Matt Grommes. This document may be distributed under the terms set forth in the LDP license at http://sunsite.unc.edu/LDP/COPYRIGHT.html 1.2 Disclaimer No liability for the contents of this documents can be accepted. Use the concepts, examples and other content at your own risk. One of many possible setups will be described. In the Linux world, there is usually a number of ways in which to accomplish things. As far as I know, only programs that under certain terms may be used or evaluated for personal purposes will be described. Most of the programs will be available complete with source under GNU-like terms. SpinnNet does not endorse or warranty any of the programs linked to in this document and as always, use them at your own discretion and risk. 1.3 New Versions of this document The most current version of this document will also be available at http://www.spinn.net/linux.html 1.4 Feedback Feedback on this document is welcome. Please send all feedback to sysadmin@spinn.net 1.5 Thanks Thanks go out to: Mike Spinn Brant Spinn Macromedia Dreamweaver Nicolette Bundy Everyone who proof-read this for me The makers of Skittles Slashdot Freshmeat.net Bill Watterson SpinnNet Dialup HOWTO Page 2 2. How do I configure my system? Redhat 6 comes pre-configured with a great deal of stuff setup for you. These instructions will touch on some things that may already be setup for you if you are using Redhat 6. Just because it's setup for you doesn't mean it's unimportant and you don't have to at least remember where you saw that file. Remembering some of the file locations and info will only help you in the long run, believe me. There are a few HOWTOs that you might want to check out for further information. This HOWTO will only go over the basics of the things involved in getting you Linux machine connected to the net. These HOWTOs will go into much more depth on the various topics that I combined into this document. These documents are pretty general and some are old so they might not apply to exactly your situation but you're smart, you'll figure it out. ISP Hookup HOWTO Modem HOWTO Plug and Play HOWTO Serial HOWTO Modems are serial devices and if yours isn't Plug&Play, this applies to you DNS HOWTO A little advanced so you won't need it unless you know you need it. UNIX and Internet Fundementals HOWTO Non-technical overview of Unix like OSs and the net. Tips HOWTO Always a good HOWTO to check out, although not directly related to this topic Linux Advocacy miniHOWTO Suggestions on how to effectivly advocate the use of Linux, a must read for Linux fans Linux HOWTO Index Repository of all Linux HOWTOs. In beautiful HTML for your viewing pleasure. 2.1 Configuring your modem The best source of information on this topic is, of course, the Modem HOWTO. Configuring a modem is traditionally one of the hardest things to install under linux, next to a strange sound card. Luckily, Redhat 6 comes with all the tools you'll need and you shouldn't need to download anything. The different types of modems available are described below. If you want to count yourself as a knowledgeable member of the Linux community, at least skim each section. If you just want to get things working and forget about it, find the section that applies to your modem and go for it. WinModems The first thing to remember is that WinModems will not work under Linux. No matter how much you spent on it or how much you whine. A WinModem is a sort of half-modem. Most of the functions that a real modem does are done by software which only works under Windows. If you a PCI modem you probably have a WinModem. If you have a modem that says it was made for use under Windows, you probably have a WinModem. Unless it is an ISA card or says DOS or Linux on the box, it's probably a WinModem. Sorry. Check the Winmodems Are Not Modems page for more info and a list of real modems that will work with Linux. Plug and Play Modems Contrary to what you'll hear from some computer store employees, you can get Plug & Play devices to work under non-Windows systems, in our case, under Linux. To get a Plug & Pray, er, Play, modem to work, you'll need to use the isapnptools package, which comes with Redhat 6 or you can get the newest versions from The ISAPNPTOOLS Homepage. The isapnptools package is so nice in fact, it's easier to set up your modem this way than if it weren't a P&P modem, which is the point of P&P in the first place. The easiest way to get P&P stuff to work is to look in Windows and see what Windows sets the device settings as. You'll need to know the IRQ(s), the Input/Output Ranges, and the DMAs for the device. You can find all of this info in the Device Manager under Win9X. Write down this info. Log into your computer as root and run the command pnpdump > /etc/isapnp.conf You'll need to edit the /etc/isapnp.conf file for your particular hardware. Find the lines that correspond to your modem and the info you wrote down before and un-comment them (remove the # from the beginning of the line). Running man isapnp.conf to see the man page (help file) for the isapnp.conf file. Also, man isapnp will give the main isapnp help file. To make sure it works, run ispnp /etc/isapnp.conf Some startup info should appear. It may look a little strange but there shouldn't be any obvious errors. If there are errors, make sure that you have the correct lines un-commented in the /etc/isapnp.conf file. Make sure you have the line that says (ACT Y))) uncommented for the modem or it won't work. Check the PNP HOWTO for more info. The isapnp command should be run on startup under Redhat 6 so it detects your modem when you boot Linux. If yours isn't started for some reason, check out the Redhat documentation on how to run commands at startup. External Modems External modems are really easy to setup since the serial port you connect them to should already be setup by the BIOS of the computer. This means Linux just gets the info from the BIOS and that's pretty much it. You need to know what COM port your modem is on and that's it. COM1 is /dev/ttyS0, COM2 is /dev/ttyS1, up to /dev/ttyS3. There are also devices called cua devices but they are becoming obsolete. To make things easier in the future, I recommend executing the following command: ln -s /dev/ttySX /dev/modem Where ttySX is the port. This creates a link from /dev/modem to the device of your modem so all you have to remember in the future is /dev/modem. Internal Non Plug & Play Modems Non Plug & Play modems are seen as serial devices. The difference between these and external modems is that you have to setup the IRQ (interupt request) and Port of the serial device. If you skipped the External modem section above, check it out to get the device name before you continue. One thing to make sure of is that the IRQ for your modem isn't conflicting with anything else in your computer. cat /proc/interrupts will tell you what each device is using. If you have the jumpers set on your modem to one of the ports that is being used, you'll have to change it to something else. The standard IRQ and Port chart is below: /dev/ttys0 (COM1), port 0x3f8, irq 4 /dev/ttys1 (COM2), port 0x2f8, irq 3 /dev/ttys2 (COM3), port 0x3e8, irq 4 /dev/ttys3 (COM4), port 0x2e8, irq 3 You will use the program setserial to set this information once you determine what Port and IRQ your modem will use. Do a man setserial for more information. The setserial man page is pretty technical though. The Modem HOWTO has a good section about setserial if you need more info. The serserial command for the first line in the chart above would be: setserial /dev/ttyS0 port 0x3f8 irq 4 This command must be run each time you boot your machine in order for the modem to be accessable. This is done by adding an rc file under Redhat 6. Your Redhat 6 should have a sample rc.serial file available that does all of this automagically. Run locate rc.serial to find out where this file is located. If you don't seem to have this file, click here for the sample and save it to a file called rc.serial. Copy the sample rc.serial file into the correct place by running cp /location/of/sample/rc.serial /etc/rc.d/init.d/serial Then run chkconfig -add serial to add the appropriate links for running the file on boot. You'll also have to create a file /etc/serial.conf with the line: /dev/ttyS0 port 0x3f8 irq 4 to continue using the example above. Now, when you reboot, the modem device should be setup. At this point you can use Minicom to test your modem by dialing out to our computers at 938-7746. Minicom isn't for the faint of heart though so you might just want to wait until everything is configured and just go for it then. This section will be expanded (and probably corrected) in the future. Check back if your questions haven't been answered or something doesn't seem to work. If you have input on this section, please send it to sysadmin@spinn.net. 2.2 DNS Info This section is probably misnamed since not everything in here deals directly with DNS but that's okay. Also, most of the stuff I'm about to describe can be done using the program linuxconf but I'm going to describe the non-linuxconf procedure because it's not that hard. The first thing you need to do is deny everyone access to your computer by adding the following line to /etc/hosts.deny ALL: ALL You need to allow yourself access by adding the following to /etc/hosts.all ALL: LOCAL Then you need to name your machine by putting a name in the /etc/HOSTNAME file: mymachine or something more creative. Your last name for example, or a cartoon character you like: dangermouse Next you need to setup the nameservers in /etc/resolv.conf search . nameserver 209.234.137.6 nameserver 207.170.196.61 You'll also need to edit you /etc/hosts file so it resembles the following: 127.0.0.1 localhost 0.0.0.0 dangermouse /etc/mailname should be set to: spinn.net 2.3 PPP At this point, you're almost ready to get online. You just need to setup what is called a chat script, a script that automates logging on to the net. The easiest way to do this is to use the program netconf which should be included with Redhat 6. If you don't have netconf, try linuxconf, you can do the same things in there. First, start netconf by typing it in at the command line or if you have the GNOME Control Panel open, it's near the bottom. The following instructions are going to be for the command line version but if you change 'hit enter' to 'double-click with your mouse' it should work the same. Netconf / Linuxconf sections and commands will be bold for the rest of this section. Select the PPP/SLIP/PLIP section and hit enter. Choose ADD and then choose PPP. Type in the phone number 338-2150 If you are using a non-Plug&Play modem or an external modem, put the device of your modem in the box marked Modem Port. This is the /dev/modem from above if you followed my directions. Put in your username and password in the blanks provided. You will not be using PAP so leave that unchecked. The next thing to do is TAB over to Customize and hit enter. Arrow down to the line Allow any user to (de)activate the interface and hit the spacebar to check the box. This allows you to use the modem even when you're not logged in as root (which you shouldn't be except when you're doing maintenance). If you have other users on your machine, you need to choose whether or not you want to let them activate the modem. If you choose not to let other users activate the modem, you'll need to figure out how you want to run things from there. That setup is beyond the scope of this document. You can now TAB over to Accept and you're on your way. You don't have any more configurations to do so choose Quit until you come to the box with Preview what has to be done andActivate the changes. At that point it's best to choose to preview the changes just to see what is happening, then go ahead and activate. If there's a bunch of stuff to be done, try to figure out what each one of them is. Think of it as one those great Linux learning experiences you're heard about. That was the hardest section of the HOWTO for new Linux users so if you got through it alright, you're pretty good. Don't worry, you're almost ready to go. SpinnNet Dialup HOWTO Page 3 3. How do I connect to SpinnNet? There are two different ways to initialize your modem under Linux. 3.1 Graphical Tools Since you are probably using the graphical interface that came with your distribution of Linux, the first tools I'll be explaining at the ones that you'll use with your mouse. There are various tools available but this HOWTO will be explaining the two most popular ones that come with GNOME and Redhat 6. modem-lights-applet The modem lights applet is a really easy way to get online once you have everything setup correctly. You'll have to add it to your GNOME Panel by right-clicking on the Panel, going up to Add Applet and choosing the Modem Lights applet under the Networking menu. A small box with two dark green circles, a box and a red button at the bottom should appear on your Panel. The bottom red button is the button you'll click to log onto SpinnNet. When you push it, a box will open that asks if you want to connect and when you push 'Yes' it should start dialing. The square is the transfer graph, it shows the data you are sending out to the net in green and the data that is coming into your computer as red. The two buttons on top are input/output indicators that tell you when data is coming in or going out of your modem. They are used to make sure your connection is working. If the lights aren't flashing, no data is moving through your modem. gnome-ppp GnomePPP is the default PPP program for GNOME. It takes care of a few things the modem applet doesn't but it is also a little more buggy and a tad harder to use. more to come... 3.2 At the command line Dialing it at the command line is easy but you don't get any lights or anything to help you make sure you're connected. To dial SpinnNet with the chat script you created earlier, type the following command: /sbin/ifup ppp0 To see what's going on with your connection, you have to view the system log: tail -f /var/log/messages This is will show you the messages that pppd (the ppp daemon for Linux) is sending your computer. You should see various dialing messages and eventually, if all goes right, you should see your IP address come up. When this happens, you're online. If you get errors and your modem hangs up, try to see what's wrong and check the HOWTOs listed in the Introduction. If your modem doesn't even start dialing, it's probably either an incorrect device setting or a Plug&Play error. If you hear dialing, then it's probably a chat script issue. There is also a program called pppstats which will help you determine if you're online in case of problems. To use it just type: pppstats Read man pppstats for more info. To end your connection, type: /sbin/ifdown ppp0 You should hear the modem hanging up. SpinnNet Dialup HOWTO Page 4 4. How do I ... This section will help you find software for Linux to do all the net.stuff you are familar with under Windows or another operating system. This is not meant to be the end-all-be-all list of net software for Linux, nor is it meant to be a tutorial on how to surf the web or read email.. For more software listings, check freshmeat.net or LinuxApps. 4.1 Surf the web? There are two web browsers that most people use under Linux. Both of them come with Redhat 6 but you had to install them, if not, get out your Redhat book and learn how to install things off the CD. One important browser is Netscape Navigator, the old favorite from Windows and Mac. Navigator is fully graphical and is usually the same version as the Windows version, with the same features. Netscape has been really good about supporting Linux since the beginning and will hopefully continue to support our favorite platform. Navigator requires that you use XWindows, which isn't much of a problem for most people but you should know that little piece of info for future reference. The other popular web browser is called Lynx. Lynx is an oldie but goodie in the *NIX (*nix is slang for all the versions of UNIX, including Linux) world. Lynx is text-based, which means you get an [IMAGE] tag instead of the image, but it's really fast and contrary to popular belief, does support most important webpage components. Because Lynx is text-based it does not require XWindows and also works over telnet or ssh connections if you know what that means. If you want to test someone's web design talents, check out their webpage under Lynx. If it looks alright, they are good designers. Some people might disagree with me on that but they are wrong. There are lots of people who use Emacs to surf the web, as well as others who use the many other web browsers out there but those are the most widely used under Linux. And no, thank Linus there is no version of Internet Explorer for Linux, nor do I expect there ever will be. :) 4.2 Read my email? This topic is a little more complicated. There are many, many, many email programs out there are every single one of them seems to have a group of people who would rather die than give it up. Also complicating the matter is that some clients will read HTML formatted email (which is basically a webpage instead of plain text), some won't read it, and others make you run another program to read it. I personally think HTML email is somewhat evil and only semi-useful for certain things (the New York Times daily email comes to mind) but it is important to a lot of people. I'm sure I'll miss some important program but here are the ones I found to be the most widely used. For a good poll about the most popular email client, check out this Slashdot poll. Pine is basically the email client version of Lynx. It is fast, pretty easy to use, and text based so you can use it to check your email anywhere as long as you can connect via telnet or ssh. Pine will allow you to run Lynx if someone sends you HTML formatted email.. Netscape Communicator, the parent product of Navigator, includes an email client which is the second most widely used client. Netscape Mail reads HTML mail natively and is also pretty easy to use. Mutt is another text-based email client which is popular. I'm not a big fan of it's interface but I haven't used it that much to be honest. A lot of people swear by it though and they tell me it supports PGP encryption of your mail without outside help. Elm is a text based email client that by default uses vi for editing your email. This one fact alone is enough to scare me away from recommending it to new Linux users (and all other sane people) but people like it so maybe I'm judging it too harshly. Balsa is the official GNOME email client. It is fullly graphical and has many features but it is fairly new software and has lots of bugs that need to be worked out before I would use it for important work. If you just need an email client that works well with GNOME and you don't do life or death emailing, you'll probably like Balsa. Like I said, there are probably others that i skipped but this list should be plenty for you. Most people use Pine and Netscape Mail without ever even learning about the others and they live happy lives. 4.3 Access other computers? Being able to connect to other computers is one of the best things about using Linux (and other *nix clones). From your home machine you can connect to another computer and do work on it like it was your own. The most common method of connecting to another computer is called telnet. Typing telnet www.spinn.net on the command line lets you connect to SpinnNet's webserver to work on your webpage for example. The problem with telnet is that it isn't secure. While the possibility of someone "sniffing" your password from a telnet connection is very remote, it is possible. The solution to that problem is called ssh. ssh www.spinn.net lets you connect our webserver but it does so securely, that is, all your data is encrypted across the connection. You will need to install ssh on your home machine but after you do that, always use ssh to connect to other machines if possible. Let me repeat that, always use ssh to connect to other machines if possible. You can download ssh here. One thing about ssh, ssh2 is available but it's license is more restrictive than that of ssh1. ssh2 is only available as a trial or educational version unless you pay for it. ssh1 is free and more widely distributed as a result. You will be perfectly happy with ssh1. 4.4 Other There a million other things you can do on the net and pretty much all of them are supported by programs for Linux. Reading Usenet newsgroups, chatting on IRC, finding friends on ICQ, playing games, etc, etc, etc. The best place to find programs to help you do these things is freshmeat.net, a software announcement site. freshmeat is the place to find software to do just about anything you want on Linux and other *nix platoforms such as the BSD systems. END Well, there you go. If you've followed directions and are lucky, you should be online and connected to the rest of the world. Linux is a powerful tool and isn't for most people. Right now Linux is for people who are willing to learn something about their computer. In the future it will as easy to setup and use as other, older operating systems but in exchange for having to learn something, you've gotten power and stability. A good trade I think. Now that you've learned something about your computer and how to do things, the best thing you can do now is to help somebody else out. If you see somebody in a bookstore looking at Linux books, point out one that helped you. If you read a question on a website or on a Usenet newsgroup, answer it. The Linux community is just that, a community. If everyone who setup Linux helped one other person out, we would achieve Linus Torvalds' hope for Total World Domination by Linux in no time flat. Isn't that something you'd like to be a part of?