Archive for September, 2007

It s All Fun and Games until Something Doesn t (Web file server)

Monday, September 17th, 2007

It s All Fun and Games until Something Doesn t WorkIn a perfect world, the dial-up configuration steps in the preceding sectionwould work 100 percent of the time. The Linux vendors have truly hidden allthe mystery that has traditionally surrounded networking. Unfortunately, inmany situations (mostly related to modems and hardware), a simplified con- figuration doesn t work. If you can t connect to the Internet after followingthese steps, an excellent site to find help is LinuxQuestions.org (www.linuxquestions.org). It s simply impossible for me to anticipate the wide rangeof problems people can run into, and this site is well known for its helpfulcommunity members. Also, go to your favorite Web search site and search on the error messageyou re getting from the system, or some keywords involved with the error, such as the network hardware s make and model, and the name of your distribution. You can use two cool tools when you re trying to figure outwhat s wrong with your network connection or trying to gather informationthat can help someone else figure out what s wrong: the handy command lineprograms pingand traceroute. Together, you can use these commands tofigure out where the problem might be when you can t reach something overa network. These commands are discussed in the next two sections. Some firewalls block the kind of traffic sent with pingsand traceroutes, sothese commands don t always work as expected, even with a good connection. Checking whether you can talk to a specific address with pingThe pingcommand is akin to a submarine using sonar to detect otherobjects in the ocean. Sonar sends out a pingsignal, which reflects off a hardsurface. By measuring the amount of time between sending the pingand theping s return, the submarine s engineer can determine whether an object isout there and how far from the submarine the object is. The pingcommand in Linux provides information similar to what sonar pro- vides. If you consider the Internet to be your ocean, you can determine, bypinging, what other network computers exist and also how long it takes foryour pingto return. You use this command in the format ping hostnameorping ipaddress, such as ping bob.example.comor ping 192.168.1.5. Ifyou can t ping another computer in your house or office (assuming that youhave them all connected with Ethernet and not on separate dial-up connec- tions), then something is wrong with the machine you re pinging from. On the161Chapter 8: Connecting to the Internet13_

19.If you selected static, fill in (How to cite a web site) the Address,

Monday, September 17th, 2007

19.If you selected static, fill in the Address, Subnet Mask, and DefaultGateway Address as given to you by your ISP. 20. Click Forward to proceed to the summary dialog box and then clickApply to add the modem you have just set up to your main NetworkConfiguration dialog box. You now have a modem entry (look in the Type column) in yourNetwork Configuration tool. Connecting to (and Disconnecting from) the InternetTo connect to the Internet, highlight the modem entry you just created (see preceding section) and click the Activate button. With any luck, yourmodem springs to life with some beeps and then buzzes along with a dialogbox indicating that a connection is being made. After a successful connec- tion, the Network Configuration dialog box appears again; this time, theStatus column of the modem device reads Active. Congratulations; you renow connected to the Internet! To disconnect, click the Deactivate button in the Network Configurationdialog box. Your settings remain; the next time you want to connect, justopen this dialog box and click Activate. If all is not well, skip to the section It s All Fun and Games until Something Doesn t Work to find out how to get help. Figure 8-5: The IPSettingsdialog box in FedoraCore 3 sNetworkconfigu- ration tool. 160Part II:Internet Now!

9.Enter your ISP information and then click Forward. (Business web hosting)

Sunday, September 16th, 2007

9.Enter your ISP information and then click Forward. The default list of countries that your ISP may be from is pretty limited. If you live in one of these regions, select your country, then the ISP atwhich point the dialing entries are completed for you and then skip toStep 16. Otherwise, proceed to the next step. 10.In the Prefix text box, enter any dialing prefix you have to dial beforethe actual phone number. This prefix may be a long distance item, such as 1 for North Americanlong distance calls, or a 9 to dial out of your building or even 91 if youneed to dial 9 to get out and you re dialing long distance. If you don tneed a prefix, leave this box blank. 11.In the Area Code text box, enter the area code your modem needs todial if it needs to dial one. In some places, you have to dial the area code even if you re dialing alocal number. If you don t have to use an area code, leave this box blank. 12.In the Phone Number text box, enter the phone number (minus prefixand area code) your modem needs to dial. Dashes aren t necessary. 13.In the Provider Name text box, type the name of your ISP. You just use this name as a description for this dial-up entry. 14.In the Login Name text box, enter your dial-in account login name. 15.In the Password text box, enter your dial-in account login password. 16.Click Forward. The IP Settings dialog box appears, as shown in Figure 8-5.17.In the IP Settings dialog box, select the appropriate radio button forwhether your modem needs to obtain its IP addressing informationfrom the ISP (DHCP,as discussed in the section Getting InformationYou Need from Your ISP, earlier in this chapter) or whether you needto tell it what its IP data is (static). Your ISP should have given you which of these you require. DHCP is thedefault. If you choose Static, the lower portion of the dialog boxbecomes available. 18.If you selected DHCP, and your ISP told you to automatically get yournameserver settings from its equipment, leave the AutomaticallyObtain DNS Information From Provider box checked. Otherwise, uncheck it. 159Chapter 8: Connecting to the Internet13_

5.Select the (Web hosting script) proper device from the Modem Device

Saturday, September 15th, 2007

5.Select the proper device from the Modem Device drop-down list. If you know your modem is on COM1 or COM2 in Windows, translatingthis techno-talk to Linux isn t hard: You just need to subtract 1. So, it sttyS0 for COM1 and ttyS1 for COM2. If you re not using a USB mouse (it has a flat, rectangular connector), then your modem is probably onCOM2. If you re using a USB mouse, your modem is probably on COM1.6.Select your modem s speed from the Baud Rate drop-down list. If you were told to use a specific speed, choose that speed here. Otherwise, choose the highest number available. The key is to try thehighest setting and, if that doesn t work, start choosing slower andslower ones until you re able to properly make the connection. Leave the Flow Control setting alone. Only change this setting if you rehaving a hard time getting your modem connection to work, or you retold by your ISP that you specifically need to select either Software FlowControl or No (None) Flow Control. 7.Turn on your modem volume so that you can hear what it s doingwhile testing it. You ll want to come back later and shut off the volume. (Well, mostpeople do; some like to leave it on. I think the 56.6kbps modems soundlike an alien game of Pong, personally, while they re connecting). It s upto you how loud you want to set the sound, as long as you can hear it. Leave Touch Tone Dialing activated unless you live in an area that onlysupports rotary phones. 8.Click Forward to proceed. The Select Provider dialog box appears, as shown in Figure 8-4. Figure 8-4: The SelectProviderdialog box inFedora Core3 s NetworkConfigu- ration tool. 158Part II:Internet Now!

Affordable web design - The Select Device Type dialog box appears, as

Saturday, September 15th, 2007

The Select Device Type dialog box appears, as shown in Figure 8-2. Because I can t cover all network connection types at once, and the dial-up modem is the most complicated, I follow the dial-up option from here. Choose the right hardware type for yourself and proceed. 4.To set up a dial-up modem, select Modem Connection from the DeviceType list box and then click the Forward button. After you click Forward, the tool probes for your modem. If your modemcan t be found (again, I follow through the most difficult option), theSelect Modem dialog box appears, as shown in Figure 8-3. I assume thatyou re staring this dialog box in the face. If it doesn t appear, proceedthrough your configuration until it matches these steps again. Figure 8-3: The SelectModemdialog box inthe NetworkConfigu- ration tool. Figure 8-2: The SelectDevice Typedialog box inFedora Core3 s NetworkConfigur- ation tool. 157Chapter 8: Connecting to the Internet13_

Com web hosting - Sometimes the choice isn t as obvious as you

Friday, September 14th, 2007

Sometimes the choice isn t as obvious as you think. For example, maybe youhave DSL, but because the DSL connection is going through your Ethernetcard, your system sees it as a LAN/Ethernet connection. So if you can t getyour connection to work, play with these factors. Again, because I have only so much space, I walk you through setup usingFedora. Many of the decisions and required pieces of information are thesame from distribution to distribution, so again, if you re not using Fedora, read through this section and use what you find out here to work on yourown computer. Configuring Your ConnectionWith your ISP s information in hand and a glowing monitor in front of you, follow these steps to configure your dial-up connection to the Internet inFedora: 1.From the GUI desktop, choose Applications.System Settings.Network. 2.Enter your root password in the dialog box, if necessary. If you re logged in as a regular user (not root), you re prompted to enterthe root password. The Network Configuration dialog box opens (see Figure 8-1). 3.In the Network Configuration dialog box, click the New button. Figure 8-1: TheNetworkConfigu- ration dialog box in Fedora Core 3.156Part II:Internet Now!

your ISP (Business web hosting) needs to give you your nameserver

Thursday, September 13th, 2007

your ISP needs to give you your nameserver IP addresses, yourgateway address, the network address, and the netmask. Thisinformation should all be on the customer information sheet. Dynamic:Your IP address changes each time you connect, or atregular intervals. On most desktops, you just don t always need tohave the same address, and it makes life easier on ISPs. It alsomakes life easier for computer like laptops, which get movedaround often from network to network. If you re using dynamicaddressing, you re told that you need to connect using DHCP. With this information, you can establish an Internet connection by using yourLinux system. Hooking UpFortunately, the Linux vendors provide tools that reduce the complexity ofhooking up with Linux. It s not that networking has changed, but rather thatmany of its details have been hidden so that you just have to click here andpress a key there. Not long ago, configuring dial-up networking (in particular) on a Linux machine was nothing short of debugging a defective Rube Goldbergcontraption. The Internet connection configuration tools available in the distributions covered within this book are: Linspire:Double-click the Internet Connection Tools icon on your desk- top to open the Connection Tools folder. Then double-click the appropri- ate icon from there. Fedora:Choose Applications.System Settings.Network to open theNetwork Configuration dialog box. Click New to start the Configurationwizard. Mandrake:From the main menu, choose System.Configuration. Configure Your Computer to open the Mandrake Control Center. ChooseNetwork & Internet.New Connection to access the Connection Creationwizard. SuSE:From the main menu, choose System.YaST to open the YaST con- figuration tool. On the left, select Network Devices. On the right, choosethe type of hardware you have in order to start configuring your setup. Xandros:From the main menu, choose Control Center to open theXandros Control Center. Click the plus next to Network to expand thatmenu and then choose Internet Connection to open your connection listing you might need to click the Administrator button to enter your root password. Click New to launch the Connection Wizard. 155Chapter 8: Connecting to the Internet13_

Web domain - Some ISPs provide their own proprietary software that

Wednesday, September 12th, 2007

Some ISPs provide their own proprietary software that you must install onyour PC to connect to the Internet. The software they provide is likely to runonly on Windows. Several free dial-up services don t work with Linux becauseof this fact. The proprietary software meddles with the operating system toensure that banner advertising isn t hidden or that you stay dialed in for onlya specified duration. If you re shopping around for an ISP, consider these questions: Can you get local dial-up numbers across the country and around theworld?If you travel often and need Internet access from different cities, this service is a handy money (and headache) saver. Does it provide technical support for Linux?If you re planning on run- ning Linux, this consideration is an important one. However, it doesn thave to be a deal breaker. Can you get a recommendation?Ask a friend. An ISP s best friend is anendorsement from a satisfied customer. Will you have trouble dialing in?Although a subscriber-to-line ratio of7-to-1 (an average of seven or fewer subscribers per line) or better isn tan entirely accurate measure of how often you ll get busy signals, it sprobably the easiest measure for consumers. Getting Information You Need from Your ISPMost reputable ISPs provide you with a customer information sheet after yousign up for its services. This sheet should include the following information atthe minimum: Local telephone dial-in numbers User login name User login password E-mail address E-mail outbound host or Simple Mail Transport Protocol (SMTP) server E-mail inbound host or Post Office Protocol (POP) server News host Whether your computer address will be Static:You always have the same IP address. Static addresses aremore common for servers than for desktops. If you re using static, 154Part II:Internet Now!

Web server type - The fancy modem thing is powered on. (These

Wednesday, September 12th, 2007

The fancy modem thing is powered on. (These contraptions oftenhave their own power supplies.) External modem:If you have an external modem (one that s indepen- dent of your computer case), you need to verify that: A cable is securely connected from the modem to the proper porton the computer. The modem is powered on. (External modems have their ownpower supply.) One end of a telephone cable is plugged into the wall jack, and theopposite end is plugged into the modem. Internal modem:If you have an internal modem, you need to verify that: The modem is nota software modem. See the sidebar Beware ofdevices posing as modems if you re not sure what a softwaremodem is or whether you have one. One end of a telephone cable is plugged into the wall jack, and theopposite end is plugged into the phone plug on the back of yourcomputer. Wireless cards:If you have a wireless card, you also have to have a wireless routerto collect and direct your wireless traffic between com- puters and/or bridgeto let your wireless card talk to your Ethernet net- work. How far and through what (walls, floors, and so on) a wirelessrouter or bridge can be from the card depends on the technology you reusing. Some handy primers on wireless hardware and setup include How WiFi Works: http://computer.howstuffworks.com/ wireless-network.htm Creating a Wireless Network: www.wi-fi.org/OpenSection/ design.asp?TID=2Okay, now you can climb back into your chair. Selecting an Internet Service Provider (ISP) Because of the meteoric rise in the popularity of Linux, many ISPs are trainingtheir support staff in the ways of Linux. If you already have a dial-up service, give one of them a call to let them know of your Linux pursuits. Chances are, that person already has information pertinent to Linux subscribers and canprovide you with that information. If you re shopping for a new ISP, this sec- tion offers some practical selection advice. 153Chapter 8: Connecting to the Internet13_

152Part II:Internet Now! Setting Up the HardwareBefore you (Web server logs)

Tuesday, September 11th, 2007

152Part II:Internet Now! Setting Up the HardwareBefore you get too comfortable in your chair, you must physically checksome items that may require you to do some low-level maneuvers (such ascrawling under your desk): Cable modem, DSL modem, or any other fancy contraption:If you haveone of these babies, you need to make sure that: An Ethernet cable (like a phone cable but the connector is wider) is plugged into your computer s Ethernet card and into the specialcable, DSL, satellite, or ISDN modem your ISP installed. Beware of devices posing as modemsI try to save you from some frustration andyour computer from your ball-peen hammer. Many Linux newbies have become irritated bynot being able to communicate with their inter- nal modems. After all, the newbie reasons, the same hardware works when I was runningMicrosoft Windows. Well, here s the story: Years ago, hardwaremanufacturers developed a device, called asoftware modem,in an effort to reduce hard- ware costs. The idea was to trim some respon- sibility from the modem and relegate thesetasks to the operating system. The result was aninexpensive modem that routed signals to pro- prietary software that operated only underMicrosoft Windows. In short, these so-calledmodems, also known as WinModems,aren treally modems at all, but, rather, are telephonecable interfaces to Windows. The following list shows methods you can useto determine whether you have a softwaremodem: The model number has a HCF-, HSP-, orHSF-in front of it. The packaging refers to the device as aWinModem or designates that it workswith only Windows (though sometimesthese labels can be misleading becausesome manufacturers just don t bother to listother operating systems even though theirhardware will work with those operatingsystems). Windows recognizes your modem, butLinux doesn t. In short, if you determine that you have a soft- ware modem, Linux simply doesn t work with it. For the adventurous out there, the LinModemproject (linmodems.org) has successfullywritten Linux drivers to work with a few of thesesoftware modems. I encourage you to becomeinvolved in this type of project, if you re somoved. These explorers drive the wonderfulworld of freedomsoftware, which Linux is aprominent part of. The bummer in all this is that, although youprobably saved a few bucks by buying amachine with a software modem, you mostlikely need a real modem to use with Linux(unless you are lucky enough to have aLinModem). Your best bet is to purchase anexternal modem so that you can leave the soft- ware modem in place and have the external onejust for Linux (or any other computer you maywant to move it to later).