Are You Secure?
Total Page:16
File Type:pdf, Size:1020Kb
L L I I GnuPG Hacks | Guarddog | Mono Primer | AJAX Galore | Firewall Scripting | Eclipse Plugins N N U U X X J J O O LISTEN TO THE SOUNDS U U R R OF LINUX VIA SONOS N N A A L L BARK UP THE RIGHT TREE FOR S S FIREWALL MANAGEMENT E E C C U U R R GET YOUR I I T T Y Y LINUX ON A STICK TAPPING INTO ™ AMAZON WEB SERVICE Since 1994: The Original Magazine of the Linux Community G AJAX E-MAIL MARCH 2006 | www.linuxjournal.com n u SOLUTIONS P G H a c Put mod_security k s | to work on your G u a Apache server r d d o g | Secure that ssh M o n server, soldier! o P r i m e r | A J A X ARE G a l o r e | F YOU i r e w a l l S c r i p SECURE? t i n LOCK DOWN EVERYTHING g | FROM FILES TO YOUR E c l SECURITY SYSTEM ITSELF i p s e P l u g i n LIDS takes s file security M M to the kernel A A R R C C H H 2 Perl script your way 0 0 AN 6 to firewall security I I S S PUBLICATION S S U U E E USA $5.00 1 4 CAN $6.50 3 U|xaHBEIGy03102ozXv+:. MARCH 2006 CONTENTS Issue 143 security FEATURES 48 GETTING STARTED WITH MOD_SECURITY 68 GETTING STARTED WITH THE LINUX INTRUSION What's the mod way of securing your Apache-driven Web site? Mick Bauer DETECTION SYSTEM Put a LID on unwanted file access the kernel way. Irfan Habib 52 GNUPG HACKS What can GnuPG do for you besides encrypt and decrypt e-mail? ON THE COVER Tony Stieber • Tapping into Amazon Web Service p. 20 58 DEMONS SEEKING DÆMONS—A PRACTICAL APPROACH • Bark up the right tree for firewall management p. 26 TO HARDENING YOUR OPENSSH CONFIGURATION • Listen to the sounds of Linux via Sonos p. 36 Don't wait until you have to exorcise a dæmon seeking to possess • Get your Linux on a stick p. 42 your SSH server. Phil Moses • Ajax e-mail solutions p. 43 & 76 • Put mod_security to work on your Apache server p. 48 62 GENERATING FIREWALL RULES WITH PERL • Secure that SSH server, soldier! p. 58 A Perl alternative to those tired of tweaking firewall rules by hand. • Perl script your way to firewall security p. 62 Mike Diehl • LIDS takes file security to the kernel p. 68 4 | march 2006 www.linuxjournal.com MARCH 2006 CONTENTS Issue 143 COLUMNS INDEPTH 20 REUVEN M. LERNER’S AT 72 SINGLE SIGN-ON AND THE Next Month THE FORGE CORPORATE DIRECTORY, PART IV Amazon Web Services Wrap up your single sign-on system with CUPS, SSH and firewall rules. 26 MARCEL GAGNÉ’S COOKING Ti Leggett WIKIS, BLOGS WITH LINUX The Best Security...Barks! 76 TOUGH ON GREASE BUT EASY AND PODCASTING ON WEB SERVERS 32 DAVE TAYLOR’S WORK THE SHELL Ajax expert Ben Galbraith chats about Are Wikis the wave of the future Writing a Shell Game Asynchronous Java and XML. or headed for the Internet grave- 36 DOC SEARLS’ LINUX FOR SUITS Kevin Bedell yard? We opine, we explain, you decide. In the meantime, how The Sound of Linux 79 RAPID GNOME DEVELOPMENT about using Wikis and blogs to WITH MONO 96 NICHOLAS PETRELEY’S ETC/RANT ease system administration? It’s Separation of Church and Choice If you’re itching to try Mono here’s where possible, and we explain how. to start. Robert Love Xoops is a powerful object-oriented REVIEWS PHP-based blog/Web content management system. If you want 42 LET YOUR FINGER DO 83 STEALTH E-MAIL TO THE RESCUE A sneaky way to get to your personal to learn how to set it up, we’ve THE BOOTING e-mail server from work. got the scoop. If Xoops isn’t your James Turner Peter Ziobrzynski scene, we also explain how to install and customize Mediawiki. 87 SUBVERSION: NOT JUST FOR CODE ANYMORE And there’s more. We have the Never lose track of your constantly details of how Jon Watson and changing personal information again. Kelly Penguin Girl have done William Nagel weekly GNU/Linux user podcasts. Learn how to extend Web ser- 90 DEVELOPING ECLIPSE PLUGINS vices, perform remote tempera- Don’t let your development habits be ture monitoring with Linux, and eclipsed by missing features others haven’t create a blog aggregator. yet added to this extensible IDE. Mike McCullough 43 BATTLE OF THE AJAX MAIL PACKAGES James Turner IN EVERY ISSUE 10 LETTERS 14 UPFRONT 46 NEW PRODUCTS 81 ADVERTISER INDEX Read about Doc’s experience with the Linux-based Sonos Digital Music System. p.36 6 | march 2006 www.linuxjournal.com Editor in Chief Nick Petreley, [email protected] Executive Editor Jill Franklin [email protected] Senior Editor Doc Searls [email protected] Web Editor Heather Mead [email protected] Art Director Garrick Antikajian [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] Products Editor James Turner [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 Proofreader Geri Gale VP of Sales and Marketing Carlie Fairchild [email protected] Director of Marketing Rebecca Cassity [email protected] International Market Analyst James Gray [email protected] Sales Coordinator Lana Newlander [email protected] Regional Advertising Sales NORTHERN USA: Joseph Krack, +1 206-782-7733 x118, [email protected] EASTERN USA: Martin Seto, +1 206-782-7733 x117, [email protected] SOUTHERN USA: Laura Whiteman, +1 206-782-7733 x119, [email protected] INTERNATIONAL: Annie Tiemann, +1 206-782-7733 x111, [email protected] Advertising Inquiries [email protected] Linux Journal is published by SSC Media Corporation and is a registered trade name of SSC Publications, Inc. PO Box 55549, Seattle, WA 98155-0549 USA • [email protected] Publisher Phil Hughes [email protected] Accountant Candy Beauchamp [email protected] 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 Subscriptions E-MAIL: [email protected] URL: www.linuxjournal.com PHONE: +1 206-297-7514 FAX: +1 206-297-7515 TOLL-FREE: 1-888-66-LINUX MAIL: PO Box 55549, Seattle, WA 98155-0549 USA Please allow 4–6 weeks for processing address changes and orders PRINTED IN USA USPS LINUX JOURNAL (ISSN 1075-3583) is published monthly by SSC Media Corporation, 2825 NW Market Street #208, Seattle, WA 98107. Periodicals postage paid at Seattle, Washington and at additional mailing offices. Cover price is $5 US. Subscription rate is $25/year in the United States, $32 in Canada and Mexico, $62 elsewhere. POSTMASTER: Please send address changes to Linux Journal, PO Box 55549, Seattle, WA 98155-0549. Subscriptions start with the next issue. Back issues, if available, may be ordered from the Linux Journal Store: store.linuxjournal.com. LINUX is a registered trademark of Linus Torvalds. MBX is the Industry Leader for Server Appliances From design to delivery we are dedicated to building a partnership with you. • Intel® Celeron 336 Processor at 2.8GHz • 1U Rackmount Chassis 16.5” Deep • Brandable With Your Color and Logo • 512MB PC4200 DDR2 Memory • Custom OS and Software Install • Maxtor 80GB Serial ATA Hard Drive • No Minimum Quantity Required • Eight Gigabit NIC’s, 4 ports with by-pass • 3 Year Warranty • Optional 16x2 LCD with Keypad other configurations available • On-board Compact Flash Socket $1,499 please call for pricing MBX RP-1110 Platform • Intel® Celeron 336 Processor at 2.8 GHz • 1U Rackmount Chassis • 512MB PC3200 DDR Memory • Maxtor 80GB Serial ATA Hard Drive • Dual On-board Gigabit NIC’s • Custom OS and Software Install • No Minimum Quantity Required • 3 Year Warranty other configurations available $899 please call for pricing MBX is the leader in custom appliances. Many premier application developers have chosen MBX as their manufacturing partner because of our experience, flexibility and accessibility. Visit our website or better yet, give us a call. Our phones are personally answered by experts ready to serve you. www.mbx.com 1-800-681-0016 Intel, Intel Inside, Pentium and Xeon are trademarks and registered trademark of Intel Corporation or its subsidiaries in the United States and other countries. Lease calculated for 36 months, to approved business customers. Prices and specifications subject to change without notice. Setup fee may apply to certain branding options. Motherboard Express Company. 1101 Brown Street Wauconda, IL. 60084. SMB-OEM NSA and 512.indd 1 1/4/2006 3:01:52 PM letters Tribute to Geoffrey Robertson Love LJ Subscription Service I wanted to contact you some time ago with a In April of 2003, my mother asked me what I mention of a person I think you should honour as wanted for my birthday. I told her I would like a sub- someone contributing to the Linux Community in scription to Linux Journal, so she got me one for two Sydney, Australia. Forgive me if this has been men- years.