<div id="popup_box_thanks" style="display:none" onClick="close_popup_thanks('popup_box_thanks', 'ts')"><br>Thanks for submitting your tip! All submissions are moderated by an editor before appearing online. We've reset the form so you can enter another tip. Or you can close the tip submission box. <div class="x_close" id="thanks_upper_right"><a href="javascript:void(0)" onmousedown="close_popup_thanks('popup_box_thanks', 'ts'); return true;">Close</a></div></div>
<div class="tbf_row"><div class="tbf_wide_extra_top not_bold">Please submit only technical tips that will help other TidBITS readers better use their Macs, iPhones, and related software and hardware. All product announcements should be sent to <a href="mailto:releases@tidbits.com">releases@tidbits.com</a>.</div></div>
<div class="tbf_left">URL</div><div class="tbf_right"><input type="text" value="" name="tip_link_url" tabindex="3"><span class="tip_description"><br>Enter the URL to a Web page that supports your tip.</span></div>
</div>
<div class="spacer"></div>
<div class="tbf_row">
<div class="tbf_left">Linked text</div><div class="tbf_right"><input type="text" value="" name="tip_link_label" tabindex="4"><span class="tip_description"><br>Enter the name of the page linked above.</span></div>
<div class="tbf_wide"><input type="submit" value="Preview Your Tip" name="preview_tip" onClick="fill_preview('tipbits_enclosure_preview', 'ts', this.form); return false;" tabindex="7"> <input type="submit" value="Send Us Your Tip!" name="submit_this_tip" onClick="handle_tip_submission('ts', '', this.form, 'tip'); return false;" tabindex="8"></div>
</div>
<div class="spacer"></div>
<div class="tbf_row">
<div class="tbf_wide"><span class="fine_print">When you submit a tip, you give us permission to use it. Read <a href="javascript:void(0)" onClick="generic_show_hide('tip_terms')">our terms</a> for more details. All submissions are reviewed before publication.</span></div>
<div class="tbf_wide"><span class="fine_print">Our terms: By submitting a tip, you agree to assign TidBITS Publishing Inc., a non-exclusive, worldwide, perpetual license to reproduce, publish, and distribute your tip in connection with the TidBITS Web site and associated products in any media. You agree that you created the content you submitted, and that you have the right to assign us this license. You give us permission to use your name, but your email address won't be publicly displayed or shared. We review all submissions before publication, and reserve the right to select which submissions we feel are appropriate for our readers and to edit those we publish.</span></div>
<div id="comment_thanks" style="display:none" onClick="close_popup_thanks('comment_thanks', 'comm')"><br>Thanks for submitting a comment! Please check your email for a link that, when clicked, will verify that you're a real person and cause your comment to appear immediately. <div class="x_close" id="comment_upper_right"><a href="javascript:void(0)" onmousedown="close_popup_thanks('comment_thanks', 'comm'); return true;">Close</a></div></div>
<div class="tbf_wide"><span class="fine_print">Our terms: We reserve the right to edit or delete any comment, so please post thoughtfully. We use your email address <i>only</i> to send you a one-time verification message confirming that you posted this comment. We also store your address to allow you to verify using other Web browsers in the future. For more info, see our <a href="http://db.tidbits.com/privacy.html">privacy policy</a>.</span></div>
<li><a href="/feeds/tidbits.rss" title="Subscribe via RSS" class="gettb">RSS <img src="/images/feed-icon-12x12.gif" width="12" height="12" border="0" class="nav_img" alt="Subscribe via RSS"></a></li>
<li><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=276986548" title="Subscribe to the podcast" class="gettb">Podcast <img src="/images/feed-icon-12x12_podcast.gif" width="12" height="12" border="0" class="nav_img" alt="Subscribe to the postcast"></a></li>
<li><a href="http://www.twitter.com/TidBITS" title="Get Article Updates via Twitter" class="gettb">Twitter <img src="/images/feed_icon_12x12_twitter.png" width="12" height="12" border="0" class="nav_img" alt="Get Article Updates via Twitter"></a></li>
<li><a href="http://www.facebook.com/pages/TidBITS/195314925519" title="Go to the TidBITS Page at Facebook" class="gettb">Facebook <img src="/images/feed_icon_12x12_facebook.gif" width="12" height="12" border="0" class="nav_img" alt="Go to the TidBITS Page at Facebook"></a></li>
<li><a href="javascript:void(0)" title="Sections" class="tabhead" onClick="return showhide('articleslist')">Sections <span id="articleslist_triangle"><img src="/images/nav_triangle_open.gif" width="9" height="9" border="0" class="navtriangle" id="articleslist_tri_image" alt="Click to show or hide the contents of this section."></span></a></li>
<li><a href="javascript:void(0)" onClick="return showhide('stafflist')" title="Staff" class="tabhead">Staff <span id="stafflist_triangle"><img src="/images/nav_triangle_closed.gif" width="9" height="9" border="0" class="navtriangle" id="stafflist_tri_image" alt="Click to show or hide the contents of this section."></span></a></li>
<li><a href="javascript:void(0)" title="Issues" class="tabhead" onClick="return showhide('issuelist')">Weekly Issues <span id="issuelist_triangle"><img src="/images/nav_triangle_closed.gif" width="9" height="9" border="0" class="navtriangle" id="issuelist_tri_image" alt="Click to show or hide the contents of this section."></span></a></li>
<li><a href="javascript:void(0)" onClick="return showhide('abouttidbits')" title="About TidBITS" class="tabhead">About TidBITS <span id="abouttidbits_triangle"><img src="/images/nav_triangle_closed.gif" width="9" height="9" border="0" class="navtriangle" id="abouttidbits_tri_image" alt="Click to show or hide the contents of this section."></span></a></li>
<div class="center_top">Thoughtful, detailed coverage of the Mac, iPhone, and iPad, plus the best-selling <a href="http://www.takecontrolbooks.com/?pt=TB-TAGLINE" style="color:yellow">Take Control</a> ebooks.</div>
<!-- begin centercolumn -->
<div id="centercolumn">
<!-- begin rightcolumn_container -->
<div id="rightcolumn_container">
<!-- begin rightcolumn -->
<!-- rightcolumn is embedded within centercolumn so featured text wraps around it -->
</div><!-- end tearoffbox_wide_container for watchlist items -->
<!-- begin tearoff box wide -->
<div class="tearoffbox_wide_container">
<div class="tearoffbox_wide_tips">
<div class="tip_display">
<div class="tips_sponsor_logo">
</div>
<h6>Quickly Mail a Link in Safari</h6>
<p><p>Reading a Web page in Safari and want to send the URL to a friend via email? Simply press Command-Shift-I to open a new email message with the Web page title as the Subject line and the Web page URL in the message body.</p></p>
</div>
<div class="tearoffbox_wide_bottom_tips">
<div style="padding-bottom:35px"><div class="tip_display" style="float:left"><p><br><a href="/tipbits/159">Link to this tip</a></p></div><div class="tip_display" style="float:right; width:150px">
<div class="tbf_wide_80" id="hc_rc_3968">To help us avoid automated posts and misuse of our site, please enter the words below.</div><div class="x_close_row" id="hc_upper_right2_3968"><a href="javascript:void(0)" onmousedown="HidePopupContent('hc_3968', 'hc', '3968'); return true;">Close</a></div>
<div class="featured_meta"><div class="meta_article">22 Feb 1999 | <a href="/article/5291?print_version=1">Print <span class="shift_up"><img src="/images/printer_icon.gif" alt="Printer-Friendly Version of This Article" border="0" width="9" height="10"></span></a></div></div>
<H2>What's a Firewall, and Why Should You Care?</H2>
<div id="article_box_3968"><P>One of the best things about the Internet - a legacy of its educational history - is that it lets us share information with people all over the planet. Another wonderful capability - this one a legacy of its Unix roots - is that it provides us <EM>access</EM> (to Web pages, email accounts, games, corporate info, and more) from any properly connected computer.</P><P>Of course, there are trade-offs. One of the biggest problems with sharing information with people you've never met is that some of them aren't nice. The Internet can put you in touch with fascinating folks, but it can also introduce you to people you'd rather avoid - spammers, antisocial hackers, and virus authors.</P><P>It's great that you can go to a coffee shop, computer lab, or copy shop and check your private email. However, people you don't know could be sitting over their own coffee right now, trying to access your credit card numbers, private records, or corporate data. Obviously, people can use the Internet to work from anywhere on the planet, but what about security issues? How do you differentiate between an employee at a coffee shop and a competitor at the next table?</P><P>Firewalls are one of the most effective ways to protect sensitive data and servers from hackers. Although firewalls aren't rocket science - despite what many consultants would have you believe - they aren't simple either. This article will show you how firewalls work and why they're important, and provide some guidance for your own thinking on firewalls. It assumes you're familiar with the basics of how the Internet works, although it explains some details briefly. If you have a full-time or multiple-machine Internet connection, you should consider a firewall, but they're generally unnecessary for individual users who don't use server software.</P><P><STRONG>The Intranet</STRONG> -- A few years ago, most networks were within buildings - local area networks, or LANs. Some companies connected their LANs with expensive dial-up links, making wide area networks, or WANs. In either case, you had to be on the premises to use company servers. Such physical security is extremely effective - there are laws against trespassing, and it's fairly easy to recognize valid employees. On the other hand, anyone who's visited an AOL chat room or IRC channel knows that identity is more complicated online. The problem for network administrators is providing access to legitimate users and blocking outsiders.</P><P>The intranet concept is an attempt to regain some of the control lost in this age of widely available Internet connections. Basically, an intranet is everything on the inside of the Internet connection - what would be a LAN or WAN if the Internet link was cut. Generally, users on the intranet have more access than outsiders - after all, they've made it into the building and past any guards, locks, or coworkers. People working on the far side of the Internet connection have less access - enough that they can get work done but not enough to cause harm. The key to the intranet is our friend the <EM>firewall</EM>, restricting Internet users to innocuous activities, and letting intranet users go about their business.</P><P>Public information available to anybody on the Internet might include public relations materials and public Web sites, software demos, and annual reports. Private information available only to people on the intranet includes things like detailed human resources policies, forms, and records; accounting and financial records; site-licensed software; and help desk systems and technical support resources. Deciding which services fall into public and private categories is key to a successful intranet.</P><P><STRONG>How Does It Work?</STRONG> Traffic on the Internet consists of individual packets of data, generally either TCP (Transmission Control Protocol) packets or UDP (Universal Datagram Protocol) packets. Every packet includes a header which identifies the sending computer and port, and the receiving computer and port. Both TCP and UDP use IP numbers (such as 209.177.45.3) to identify individual computers, and port numbers (which range from 0 to 65,535) to identify individual programs on each computer.</P><P>As an example, if you wanted to see the Audubon home page, your Web browser might create a packet with source IP 204.57.207.50 (assigned by your network administrator or ISP), source port 54,321 (arbitrarily chosen by your application), destination IP 209.177.45.3 (the Audubon Web server), destination port 80 (identifying the Web server), and a "payload" containing a request for the Audubon home page.</P><P><<A HREF="http://www.audubon.org/">http://www.audubon.org/</A>></P><P>The higher level protocols we use to surf the Web, send email, transfer files, and more, all run on top of TCP and UDP (which in turn run on top of IP - the Internet Protocol). Most protocols answer on a specific TCP or UDP port, but some higher level protocols can use either TCP or UDP.</P><P>It might help to think of IP addresses as street addresses and ports as apartment numbers. Every computer that sees a packet (including your computer, the router that connects you to the Internet, the routers between your ISP and your destination, etc.) looks at the IP address and ignores, forwards, or accepts the packet based on the IP address. Once the recipient computer sees and accepts the packet, it decides what program should handle it based on the destination port. TCP and UDP port numbers correspond to specific services, and the destination computer uses the port number to decide which program gets the packet. For example, without port numbers, an AppleShare IP server wouldn't know whether a specific packet should be handled by its FTP, SMTP, AppleShare-over-IP, or Web servers.</P><P>The Internet Assigned Numbers Authority maintains a list of the major assigned ports, including those used by standard services and registered to specific applications (even games).</P><P><<A HREF="http://www.isi.edu/in-notes/iana/assignments/port-numbers">http://www.isi.edu/in-notes/iana/assignments/ port-numbers</A>></P><UL><LI><P>HTTP - TCP port 80. HyperText Transfer Protocol is how Web browsers and servers talk to each other. (HTTPS, or Secure Sockets Layer, is an encrypted variant of HTTP that uses TCP port 443.)</P><LI><P>SMTP - TCP port 25. Most people send email using Simple Mail Transfer Protocol.</P><LI><P>POP3 - TCP port 110. Post Office Protocol version 3 is used to receive mail. Email programs like Eudora and Netscape Communicator typically send email via SMTP and receive email via POP3.</P><LI><P>DNS - TCP or UDP port 53. Domain Name Servers convert between human-readable names like www.audubon.org and IP numbers like 209.177.45.3.</P><LI><P>Telnet - TCP port 23. Telnet (or remote login) is the granddaddy of all remote control schemes.</P><LI><P>FTP - TCP port 21. FTP programs send commands to FTP servers using TCP port 21, but FTP is unusual in that it uses an additional port for the actual data transfer.</P><LI><P>ASIP - TCP port 548. Used by AppleShare-over-TCP/IP, as used by AppleShare IP, ShareWay IP, some Unix servers, Mac OS 8's built-in AppleShare client, and Microsoft Windows 2000/NT 5.</P></UL><P><<A HREF="http://www.apple.com/appleshareip/">http://www.apple.com/appleshareip/</A>><BR><<A HREF="http://www2.opendoor.com/gateway/sharewayip20.html">http://www2.opendoor.com/gateway/ sharewayip20.html</A>><BR><<A HREF="http://www.microsoft.com/ntserver/windowsnt5/exec/overview/WhatsNew.asp">http://www.microsoft.com/ntserver/windowsnt5/ exec/overview/WhatsNew.asp</A>></P><UL><LI><P>SNMP - UDP port 161. Simple Network Management Protocol servers are built into most routers, smart hubs, servers, and some desktop operating systems (SNMP is optional in Mac OS 8.5). An SNMP console, such as Dartmouth's excellent InterMapper, can monitor these servers to map out a network and watch for trouble.</P></UL><P><<A HREF="http://www.dartmouth.edu/netsoftware/intermapper/">http://www.dartmouth.edu/netsoftware/ intermapper/</A>></P><P>There are over four billion valid IP numbers (2^32 - and we're running out). Each computer on the Internet has its own complement of 131,072 ports which can talk to any port on any other computer on the Internet. The number of possible connections is more than anyone could track or guard - 2^(32+32+16+16+1), or 2^97 - but a firewall can bring this number down to a manageable range.</P><P><STRONG>Firewalls</STRONG> -- Firewalls work by selectively passing traffic between secure and insecure network areas. Typically, the firewall is a part of - or adjacent to - the Internet router. The Internet connection is a logical place for a firewall, since people on an intranet are more trusted than people using the Internet, and any hackers must get past the firewall to reach the tasty data on the intranet.</P><P>There are two types of firewalls: packet filters (also known as packet screening firewalls) and proxy servers. The more common packet filters are simpler, cheaper, and much faster than proxies. Since IP numbers identify computers and ports identify services, a firewall can determine whether a packet is legitimate by looking at the source and destination IPs and ports and comparing them against a simple set of rules. As IP addresses are often grouped logically, it's usually easy to determine who is or is not part of the local network.</P><P>Packet filters are simple because they don't consider the content (called the payload) of the packet: the firewall makes its decisions based solely on a packet's IP and port numbers. Think of a firewall as a military checkpoint - there are a few people with passes who can get through, and anyone else is turned away. The guards don't open briefcases.</P><P>Most firewalls keep people out, rather than prevent intranet users from getting out to the Internet (although there are a few common exceptions). Thus, configuring a firewall is generally a process of listing the few valid uses Internet users might have for intranet services, and then writing rules to allow <EM>only</EM> those uses, thus blocking out the vast number of unneeded connections which might otherwise pose a security risk. Here is a simple set of rules for a boring company named Examples, Inc., translated into plain English:</P><P>"Allow Internet computers to connect to mail.example.com on port 25. Allow mail.example.com to connect to outside computers on port 25. Block all other traffic to or from port 25 across the firewall." Port 25 is used by SMTP for sending email. Since the firewall controls only traffic crossing from one side to the other, this would prevent outsiders from using private internal mail servers and keep employees on the intranet from sending mail directly to servers outside the firewall. If mail.example.com logs all mail sent and received, you can ensure that nobody is using a private mail server to avoid being caught in corporate mail logs (or to send spam).</P><P>"Allow Internet computers to connect to www.example.com on ports 80 and 443. Allow any internal computer to connect to outside computers on ports 80 and 443. Log every outbound URL request along with the (internal) requesting IP. Block all traffic to port 80 or 443 on other internal servers." Port 80 is the standard HTTP (Web browsing) port, and port 443 is used by HTTPS (Secure Sockets Layer) for encrypted Web browsing. Again, this prevents outsiders from reaching private internal services (such as Personal Web Sharing). It also logs employee Web use, so administrators can tell if employees are using the company's Internet connection to access inappropriate Web sites. Many companies have policies against non-work-related use of the Internet - in fact, the Dilbert Zone's Pointy-Haired Boss Index lists companies that block access to the Dilbert site.</P><P><<A HREF="http://www.dilbert.com/comics/dilbert/financial/tphbx.html">http://www.dilbert.com/comics/dilbert/financial /tphbx.html</A>></P><P>"Block all inbound DNS requests." If you run a public DNS server outside the firewall, and a private server inside, you can prevent outsiders from finding out about non-public hosts, like printers.</P><P>"No FTP connections may come in. Outbound connections are unrestricted." In this case, ftp.example.com might be hosted by an upstream ISP outside the firewall, and employees would go out through the firewall to use it. Some organizations are concerned about information leaking out and force all employees to use FTP proxy servers that allow FTP GET but not FTP PUT. The idea is to prevent employees from giving a large chunk of sensitive data to a competitor.</P><P><STRONG>Proxy Servers</STRONG> -- The more complicated and expensive type of firewall is called a proxy. If a packet filtering firewall is a military checkpoint, a proxy is a finicky translator and interpreter. People on either side of a proxy can't talk directly to each other; instead, all communication passes through the proxy. If someone on the Internet tries something dodgy, the proxy refuses to pass the message. Further, machines on the outside have no direct communication with machines on the inside, which means they have no knowledge of the internal network topology, and can't attack or probe internal machines for vulnerabilities.</P><P>Network Address Translation (NAT) is a relatively new specification which enables a firewall to act as a proxy server without the client software doing anything different (or even knowing about the firewall's presence). The NAT-enabled firewall rewrites every packet to use its own source IP and an available source port, and then reverses the process for replies. Because it is fairly simple, NAT is becoming more common in firewalls and routers. More sophisticated firewalls understand specific protocols and can place restrictions on individual commands or actions which are suspicious. These firewalls generally run under Unix or NT and are quite expensive.</P><P><<A HREF="http://www.tis.com/prodserv/gauntlet/firewalls/">http://www.tis.com/prodserv/gauntlet/firewalls/</A>></P><P>At the other end of the spectrum, relatively inexpensive caching firewalls such as Maxum's WebDoubler focus on performance improvements rather than security. WebDoubler improves browsing speed by caching Web requests, then providing the cached copy to other users requesting the same page - just like the cache built into Navigator or Explorer, except that all WebDoubler users share the larger cache. Sustainable Softworks's IPNetRouter (which has its own packet screening capabilities) is bundled free with WebDoubler. Both run on Macs.</P><P><<A HREF="http://www.maxum.com/WebDoubler/">http://www.maxum.com/WebDoubler/</A>><BR><<A HREF="http://www.sustworks.com/products/product_ipnr.html">http://www.sustworks.com/products/product_ ipnr.html</A>></P><P><STRONG>Configuration</STRONG> -- Don't forget to configure your firewall! No matter how much it costs, a firewall can't help you unless you think about what you need to permit and exclude, then codify that in the firewall configuration. Since a firewall configuration is based on your IP numbers and the ports (services) you use, a generic configuration won't help. Before buying a firewall, look at a couple of configuration files. If they make sense to you, good. If you can't figure them out, you either need to read more or hire someone to do the configuration for you, and make sure they'll be available when you need to make changes.</P><P>First, make a list of all your internal services, then decide which the public and employees outside the intranet (satellite offices, travellers, people working from home, etc.) need to access. Firewall configuration often requires trade-offs - in blocking misuse of your systems, you may make some legitimate uses harder or even impossible.</P><P>Will people want access to their email? Are you confident about the security of your email server and its passwords, or are you better off providing external accounts for travelling users?</P><P>Can your Web server be configured to allow access to internal pages to anyone with an intranet IP address <EM>or</EM> who has a password? If so, you can set up an intranet Web site without setting up another Web server.</P><P>If you have a contingent of people outside the firewall who need full access to your intranet services, consider a Virtual Private Network (VPN) in conjunction with your firewall. VPN technologies encrypt all Internet traffic between your intranet and your remote users. VPNs make effective partners with firewalls, since you can allow VPN traffic through the firewall with confidence that only authorized users will have the VPN passwords and keys, and they can access all your services. This enables you to lock down much more on the firewall, since legitimate users gain access through the VPN.</P><P>Be sure to turn on any packet forgery and malformed-packet filters in the firewall - such packets can cause stability and security problems. Be sure to log rejected packets - if your firewall blocks an attack but you don't know about it, the attackers can keep trying until they get through.</P><P>Before setting up your firewall, think carefully about what should be outside and what should be inside. Since Web servers primarily serve the public, it might make sense to put them outside the firewall, perhaps even at your ISP. This may make your site faster for visitors and ensures that public access to your Web server doesn't become a beachhead into your internal security. ClearWay's FireSite manages such external Web servers, and provides most of the benefits of an internal Web server in terms of flexibility, logging, and customization. FTP servers raise the same question.</P><P><<A HREF="http://www.clearway.com/firesite/">http://www.clearway.com/firesite/</A>></P><P><STRONG>Buying a Firewall</STRONG> -- Before you buy a firewall, find out what capabilities your routers have. If your Internet router came with packet filtering capabilities, you may not need to buy anything else.</P><P>You can buy a hardware firewall from many of the same vendors who make routers, including Cisco and Compatible Systems. Several companies also make software firewalls for Unix and Windows NT.</P><P><<A HREF="http://www.cisco.com/">http://www.cisco.com/</A>><BR><<A HREF="http://www.compatible.com/">http://www.compatible.com/</A>></P><P>Fortunately, there are several Mac firewalls. IPNetRouter includes firewall functionality. Both Vicomsoft's Internet routers (Mac and Windows versions) include firewall functionality. Open Door Networks' DoorStop is a limited firewall - it protects only the machine on which it is running.</P><P><<A HREF="http://www.vicomsoft.com/products.html">http://www.vicomsoft.com/products.html</A>><BR><<A HREF="http://www2.opendoor.com/doorstop/">http://www2.opendoor.com/doorstop/</A>></P><P><STRONG>In the End</STRONG> -- If you have servers connected to the Internet, you should consider protecting them with a firewall. Fortunately, there are a plethora of options, some of which you may already own. Hopefully, you'll never be attacked, but there are nasty people out there. You owe it to yourself to think about network protection <EM>before</EM> someone else forces you to do so.</P><P>Configuring a firewall is a two-stage process. First think about how you use TCP/IP, and then balance the uses against the harm someone could do through subverting those facilities. If you plan well, your servers will be protected and your users may not even notice.</P><P>[Chris Pepper is webmaster and list manager for the National Audubon Society. This article was originally presented (in a highly abbreviated form) as part of a panel presentation at Macworld Expo SF '99.]</P><!-- What's a Firewall, and Why Should You Care? Chris Pepper --></div>
<!-- end article text -->
<!-- PayBITS -->
<p> </p><div class="sponsorbox">
<div class="sponsortext"><A HREF="http://www.smilesoftware.com/"><IMG SRC="http://db.tidbits.com/images/badges/SmileLogo2010-50x50.gif" ALT="" HEIGHT="50" WIDTH="50" BORDER="0" ALIGN="left"></A>Get more productive with software from Smile: PDFpen for<br />editing PDFs; TextExpander for saving time and keystrokes while you<br />type; DiscLabel for designing CD/DVD labels and inserts. Free demos,
<br />fast and friendly customer support. <<a href="http://www.smilesoftware.com/">http://www.smilesoftware.com/</a>></div>