Protecting SSH Servers with Single Packet Authorization
Total Page:16
File Type:pdf, Size:1020Kb
AJAX | POSTGRESQL | ZIMBRA | MOCHIKIT | FIREBUG | APTANA LINUX JOURNAL A close look at AJAX PostgreSQL AJAX Ethernet Analyzer ™ Since 1994: The Original Magazine of the Linux Community Ajax MAY 2007 | ISSUE 157 | PostgreSQL | Zimbra NOW with er! | iKit Pow MochiKit Moch se! Siimmplele toto U | Firebug | Aptana | ODF Ajax | IICCH SPA N, R THTHAT CLECLEA 10 out of 10 FOR IEENNCEE!! | T EEXPXPEERR WordPress Zimbra customers CLLIEIEN prefer Ajax! OurOur extraextra ingredientingredient AptanaAptana cleanscleans dirtdirt fast!fast! NEW!NEW! Firebug removes bugs fast! CombineCombine withwith WordPressWordPress CleansCleans withwith PerlPerl andand PostgreSQLPostgreSQL too!too! forfor brighterbrighter colors!colors! MAY www.linuxjournal.com 2007 USA $5.00 | CAN $6.50 ISSUE PLUS: 157 UU Use Python to Manipulate ODF U|xaHBEIGy03102ozXv!:; UU Single Packet Authorization in Practice Today, Carlo restored a failed router in Miami, rebooted a Linux server in Tokyo, and remembered someone’s very special day. With Avocent centralized management solutions, the world can finally revolve around you. Avocent puts secure access and control right at your fingertips – from multi-platform servers to network routers, your local data center to branch offices. Our “agentless” out-of-band solution manages your physical and virtual connections (KVM, serial, integrated power, embedded service processors, IPMI and SoL) from a single console. You have guaranteed access to your critical hardware even when in-band methods fail. Let others roll crash carts to troubleshoot – with Avocent, trouble becomes a thing of the past, so you can focus on the present. Visit www.avocent.com/special to download Data Center Control: Guidelines to Achieve Centralized Management white paper. Avocent, the Avocent logo and The Power of Being There are registered trademarks of Avocent Corporation. All other trademarks or company names are trademarks or registered trademarks of their respective companies. Copyright © 2006 Avocent Corporation. MAY 2007 CONTENTS Issue 157 ILLUSTRATION BY GARRICK ANTIKAJIAN BY GARRICK ILLUSTRATION FEATURES 55 Ajax Simplified 70 Four Cool Plugins for WordPress Ajax doesn’t have to be intimidating. Spruce up your WordPress-based site with these four plugins. Nicholas Petreley Marco Fioretti 58 Writing Web Applications with ON THE COVER Web Services and Ajax • A close look at PostgreSQL, p. 48 How about a slightly more advanced Ajax primer? • Ajax Ethernet Analyzer, p. 74 Mike Diehl • Now with MochiKit Power, p. 64 • 10 out of 10 Zimbra customers prefer Ajax, p. 42 • Firebug removes bugs fast, p. 22 64 MochiKit by Example • Cleans with Perl and PostgreSQL too, p. 58 Get up to speed without losing control. • Our extra ingredient Aptana cleans dirt fast, p. 46 Ryan Wilcox • Combine with WordPress for brighter colors, p. 70 • Use Python to Manipulate ODF, p. 86 • Single Packet Authorization in Practice, p. 82 2 | may 2007 www.linuxjournal.com The competition doesn’t stand a chance. If you base deployment decisions on performance and price, Coyote Point’s for you. We’ve cornered that market. To prove it we asked The Tolly Group to evaluate our E350si application traffic manager against the competition. The results speak for themselves. Throughput? Almost 40% more than others in our space. Cost of transactions per second? Up to four times less. Connection rate? In some cases, one-sixth the cost. One-sixth! And we’re told Coyote Point is the #1 choice for today’s open source networks. But don’t just take our word for it. Get the facts. Call 1.877.367.2696 or write [email protected] for your free copy of the full Tolly Report. © 2007 Coyote Point Systems, Inc. All Rights Reserved. www.coyotepoint.com MAY 2007 CONTENTS Issue 157 COLUMNS QUICK TAKES 22 REUVEN M. LERNER’S 42 ZIMBRA COLLABORATION AT THE FORGE SUITE, VERSION 4.5 Firebug Marcel Gagné 26 MARCEL GAGNÉ’S COOKING WITH LINUX When Ajax Held the World on His Shoulders 46 THE APTANA IDE FOR AJAX DEVELOPMENT 70 FOUR COOL PLUGINS FOR WORDPRESS Ben Martin 48 OPEN-SOURCE DATABASES, PART II: POSTGRESQL 32 DAVE TAYLOR’S WORK THE SHELL Reuven M. Lerner Next Month Displaying Image Directories in Apache, Part II INDEPTH LANGUAGES 74 AN AJAX-ENHANCED Next month’s issue contains a WEB-BASED ETHERNET smörgåsbord of articles on lan- ANALYZER guages and programming tools. Ruby + Ajax + bash + CGI = Frustrated by the fact that Qt 4.x Ethernet Analyzer? uses synchronous access to databases Paul Barry by default? We tell you how to do asynchronous database access with Qt instead. Then, jump into the 34 JON "MADDOG" HALL’S 82 PROTECTING SSH SERVERS WITH SINGLE PACKET deep end of Python programming BEACHHEAD with the first of two Python tutori- What Is the Value of Software? AUTHORIZATION als. And, we talk with Sun’s Simon Security does not live on SSH alone. Phipps about a variety of topics 36 DOC SEARLS’ Michael Rash including the GPL-ization of Java. LINUX FOR SUITS Penguins in Winnipeg 86 OPENOFFICE.ORG ODF, There’s more. Now that Reuven PYTHON AND XML Lerner has given you information 96 NICHOLAS PETRELEY’S Messing with the internals of ODF about MySQL and PostgreSQL, he helps you choose the database /VAR/OPINION Collin Park They’re Ba-ack that’s right for you. Plus, learn how to validate an e-mail address in PHP the right way. IN EVERY ISSUE 8 LETTERS 12 UPFRONT 20 TECH TIPS USPS LINUX JOURNAL (ISSN 1075-3583) is published monthly by Belltown Media, Inc., 2211 Norfolk, Ste 514, Houston, TX 40 NEW PRODUCTS 77098 USA. Periodicals postage paid at Houston, Texas and at additional mailing offices. Cover price is $5 US. Sub scrip tion rate is $25/year in the United States, $32 in Canada and Mexico, $62 elsewhere. POSTMASTER: Please send address changes to Linux 81 ADVERTISERS INDEX Journal, PO Box 980985, Houston, TX 77098. Subscriptions start with the next issue. 4 | may 2007 www.linuxjournal.com Editor in Chief Nick Petreley, [email protected] Executive Editor Jill Franklin [email protected] Senior Editor Doc Searls [email protected] Art Director Garrick Antikajian [email protected] Products Editor James Gray [email protected] Editor Emeritus Don Marti [email protected] Technical Editor Michael Baxter [email protected] Senior Columnist Reuven Lerner [email protected] Chef Français Marcel Gagné [email protected] Security Editor Mick Bauer [email protected] Contributing Editors David A. Bandel • Greg Kroah-Hartman • Ibrahim Haddad • Robert Love • Zack Brown • Dave Phillips • Marco Fioretti • Ludovic Marcotte • Paul Barry • Paul McKenney • Dave Taylor Proofreader Geri Gale Publisher Carlie Fairchild [email protected] General Manager Rebecca Cassity [email protected] Director of Sales Laura Whiteman [email protected] Regional Sales Manager Joseph Krack [email protected] Regional Sales Manager Kathleen Boyle [email protected] Circulation Director Mark Irgang [email protected] Marketing Coordinator Lana Newlander [email protected] System Administrator Mitch Frazier [email protected] Webmaster Keith Daniels [email protected] Accountant Candy Beauchamp [email protected] Linux Journal is published by, and is a registered trade name of, Belltown Media, Inc. PO Box 980985, Houston, TX 77098 USA Editorial Advisory Board Daniel Frye, Director, IBM Linux Technology Center Jon “maddog” Hall, President, Linux International Lawrence Lessig, Professor of Law, Stanford University Ransom Love, Director of Strategic Relationships, Family and Church History Department, Church of Jesus Christ of Latter-day Saints Sam Ockman, CEO, Penguin Computing Bruce Perens Bdale Garbee, Linux CTO, HP Danese Cooper, Open Source Diva, Intel Corporation Advertising E-MAIL: [email protected] URL: www.linuxjournal.com/advertising PHONE: +1 713-344-1956 ext. 2 Subscriptions E-MAIL: [email protected] URL: www.linuxjournal.com/subscribe PHONE: +1 713-589-3503 FAX: +1 713-589-2677 TOLL-FREE: 1-888-66-LINUX MAIL: PO Box 980985, Houston, TX 77098 USA Please allow 4–6 weeks for processing address changes and orders PRINTED IN USA LINUX is a registered trademark of Linus Torvalds. letters ASTERISK | TRIXBOX | ADHEARSION | VOIP | SELINUX | SIP | NAT of security policy lets me load a library from a few places), and I found that building the code removable drive but not from the hard disk? required all the latest installed software. I guess I’m not surprised that a GNOME-based piece of An MPD-Based As a programmer who tries to make things for software is incompatible with my 11-month-old, Audio Appliance other people to use, I know how easy it is to out-of-the-box R Cubed Linux laptop, but I am ™ Since 1994: The Original Magazine of the Linux Community get lost in the details and fail to anticipate disappointed that Gagné didn’t make mention of Linux and Asterisk what is going to trip somebody up. We all the fact that in order to build and install this soft- just have to try harder. ware, you had to be willing to re-engineer some- DoTe lephony -- one else’s code or go out and purchase a new >> ASTERISK FOR CONVENIENT PHONE CALLS William McConnaughey computer with a fresh install of the latest GNOME >> WIRESHARK SNIFFS desktop. Anyway, please relay to Mr Gagné both VOIP PROBLEMS >> VOIP THROUGH NAT Long Live Freedom my interest in his software picks as well as my >> EMBEDDED ASTERISK Nice mag, I read it over here in the UK as an frustration in those same picks that are incompati- >> ADHEARSION WITH ASTERISK import to my local Borders store. ble with the bulk of existing Linux installations. >> COMMUNIGATE PRO AND VOIP -- I just read Nicholas Petreley’s /var/opinion article Evan Carew MARCH 2007 | ISSUE 155 www.linuxjourna l.com USA $5.00 in the February 2007 issue of Linux Journal, and CAN $6.50 I agree with his point of not using Novell tools, Marcel replies: First off, let me apologize for get- U|xaHBEIGy03102ozXv+:.