Making Network Services Available


All network services described in this Chapter require a local network, an Internet connection, or both. The local network can be an Ethernet network or an AirPort wireless network. If you’re not sure how to set up a local network or an Internet connection, look back at Chapter 15.

When a network service is enabled on your computer, it is available as soon as your computer is powered up. While a service is available, other computers on the Internet or your local network can access it, depending on firewall rules. The service remains available until someone deliberately turns off the service or shuts down your computer. If you enable a network service while you are logged into the machine and then log out, the service remains available. Network services are even available while no one is logged in; that is, while the login window is displayed. Logging in as another user does not affect availability, because network service settings are not in any way tied to user account settings or privileges.

Shutting down your computer ends its network services, but only temporarily. The next time the computer is started up, Mac OS X automatically turns on network services that are configured to be available.

If your computer goes into sleep mode, it’s the same as shutting down the computer with regards to network services. For this reason, if you are configuring your Mac OS X computer to offer any network services, you will want to use the Energy Saver preference pane to disable sleep functionality as described in Chapter 13. If another computer is connected to your computer for Web sharing, FTP access, or remote login and your computer goes to sleep, the other computer is unable to access that service until your computer wakes from sleep. When your computer wakes up, computers with existing connections to your computer’s network services may resume access.

Your computer’s IP addresses

Other computers need to know your computer’s network identity to access the network services that it provides. For Web sharing, FTP access, and remote login, your computer can always be identified by a numeric IP address. You can think of your computer’s IP address as its telephone number.

Actually, your computer can have more than one IP address. It has different IP addresses for each network port that it’s connected to. Your computer could be connected to an Internet provider via modem, an Ethernet network via its built-in Ethernet port, and an AirPort wireless network. Each connection has its own IP address.

Displaying your computer’s IP address

To see the IP address of the port currently used to provide Web sharing, FTP access, and remote login, open System Preferences and then click the Network button or (choose Location Network Preferences from the Apple Menu). Click the Show pop-up menu near the top of Network preferences and choose the network port whose IP address you want to see. Then click the TCP/IP tab. The IP address is displayed below the Configure pop-up menu, as shown in Figure 16-1.

click to expand
Figure 16-1: See the IP address of any network port in the Network pane of System Preferences.

Punching holes in your firewall

If your computer is at home and is connected via broadband (DSL, Cable) you likely have an Internet gateway or router that shares a single public IP address among the computers on the network using special reserved private IP addresses. If your IP address is 192.168.x.x, 10.x.x.x, 169.254.x.x, or 172.16.x.x, it is likely a private IP address. You’ll have to check your gateway or router to be completely sure. Computers on the Internet see only the shared public IP address. They can’t see the private IP addresses of computers on the local network. Therefore, they have no way of contacting computers on the local network for Web, FTP, or remote login services. Because the gateway keeps Internet computers out, it provides a kind of firewall for your local network. If you want to let Internet computers through your firewall, you need to punch holes in the firewall. Each type of service — Web sharing, FTP access, and remote login — needs a separate hole in the firewall.

You may be able to configure your Internet gateway so that it directs all incoming requests for a particular service, such as FTP access, from the shared public IP address to one computer’s private IP address. This scheme is usually called inbound port mapping. This scheme is like an office with a main phone number and a receptionist who routes incoming calls to a different private extension for each department. Within the company, departments call each other by using the private extension numbers. With inbound port mapping, your local network has one public IP address and a gateway that routes incoming service requests to private IP addresses according to the type of service request. Computers on your local network use your private IP address to access your computer’s network services.

The details of configuring inbound port mapping are different for each gateway product. Consult your Internet gateway’s manual for specific instructions.

Dynamic and static IP address

Your computer’s IP address may be dynamic or static. A dynamic IP address may change each time you begin an Internet session or each time your computer starts up. A static IP address doesn’t change. Your computer probably has a dynamic IP address if it connects to the Internet via modem or DSL with PPPoE. Some cable modem connections also provide a dynamic IP address.

A computer on a local network, Ethernet or AirPort, may get an IP address from a DHCP server on the local network each time the computer starts up. The IP address could be different each time, so it is a dynamic IP address. (The D in DHCP stands for Dynamic.) The AirPort base station includes a DHCP server, as do many Internet gateway and router products.

Having a dynamic IP address makes your computer hard for other computers to find, which means that your network services are hard to find. It’s like a business whose phone number changes every day.

Getting your computer a name

Although your Mac has an IP address for the Web sharing, FTP access, and remote login services that it provides, an IP address is not as convenient as the names that people normally use to access Web sites and FTP servers on the Internet. In addition to its IP address, your computer can have a name for the services that it provides on the Internet and on your local network. The name is actually just another way of referring to your computer’s IP address. When another computer tries to contact your computer by name, a name server on your local network or on the Internet looks up the name in a directory and finds your IP address. These name servers are known as DNS servers (Dynamic Name Server).

Mac OS X does not include a DNS server, nor can Mac OS X help get a name assigned to your computer and listed with DNS servers on the Internet or your local network. How you get your computer a name address for its Web sharing, FTP access, and remote login services depends on how it connects to the Internet and whether it is on a local network. The details are beyond the scope of this book, but here are some general guidelines:

  • You will need to register a domain name, if you do not already have access to one. Traditionally Network Solutions (www.networksolutions.com) provides this service in the United States for the major domains (.com, .net, .org, etc.), however now many other companies provide this service. If you are looking for a domain name you would be well served to spend some time comparison shopping as there are many lower-cost alternatives, which offer different feature packages from Web hosting to email services, that may appeal to you. A good place to start would be to feed the following term to your favorite search engine: domain name registrars.

  • Most Internet service providers provide name based hosting, such as www.mydomain. com for a fee.

  • If you have a static IP address and have your own domain name, you can get free DNS service from Granite Canyon Group, LLC (www.granitecanyon.com).

  • If you don’t need your own domain name, you can get a free name like myname.dnsalias.com from an organization that provides dynamic DNS service, such as Dynamic DNS Network Services (www.dyndns.org). If you have a dynamic IP address, you also need to install software on your computer that notices each time you get a different IP address and automatically sends your new IP address to your dynamic DNS service provider. An example of this software is the free Dynamic DNS Client by James Sentman (www.sentman.com/dyndns/).

  • If you want to use names instead of private IP addresses on your local network, set up a DNS server on the network. Some Internet gateway products include DNS, and DNS software is available for Mac OS 9. Your Mac OS X installation actually includes BIND, the Internet standard DNS server for Unix, however it is not recommended to run DNS on your personal workstation. Configuring the included DNS server is out of the scope of this book, however if you are curious enter man bind at a shell prompt in the Terminal application. Also a trip to your favorite search engine with the query Mac OS X bind will provide a plethora of results.

Note

A computer name is displayed above the IP address in the Sharing preference pane. This name is used for file sharing and other AppleTalk services, not for such TCP/IP services as Web sharing, FTP access, and remote login.




Mac OS X Bible, Panther Edition
Mac OS X Bible, Panther Edition
ISBN: 0764543997
EAN: 2147483647
Year: 2003
Pages: 290

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net