The Developer's Guide to Virtual Machines

Total Page:16

File Type:pdf, Size:1020Kb

The Developer's Guide to Virtual Machines The Developer’s Guide to Virtual Machines an Developer eBook The Developer's Guide to Virtual Machines n a world of multiple operating systems, each with various versions, no developer has the luxury of building appli- cations for only one target configuration. Every developer needs to ensure that his or her applications will function I correctly on all the OS configurations used by today's heterogeneous IT environments. Because dedicating physi- cal test systems for each target environment is out of most development teams' budgets, virtual machines (VMs) are the right solution at the right time. Virtualization solutions enable you to run multiple VMs on one physical computer. Each VM behaves as an isolated physi- cal PC or server with its own configuration – a very useful testing and development environment that's much cheaper than the real thing. Java developers know the benefits of the VM concept well. The promise of enabling developers to "write once, run anywhere" was a key factor in the broad adoption of Java, which itself runs on the Java Virtual Machine. As the market for virtualization grows, the ways in which developers use virtualization itself are expanding. The tradition- al development and testing uses of virtual machines as local disposable sandboxes and solutions for application isola- tion are broadening. Sharing development tasks across large teams in disparate locations appears to be the next step. Proper Virtual Machine Uses in Development and Testing Virtual machines can cut time and money from the software development and testing process, but they aren't the best choice in every scenario. When should you use virtual machines for developing and testing software, and when should you use a more traditional setup with physical machines? Software development typically involves developing and testing for different target environments, but dedicating a physical computer to each environment can be expensive. Not only do you have to consider the initial purchase cost, but physical computers also take up space, use power, and require maintenance. Virtual machines can reduce this cost by providing a way to run multiple development and test environments on one physical computer. Another problem with dedicating a physical computer to each environment is that setting up your target environ- ments can be quite time-consuming. In this situation, virtual machines can save you time. If you need to duplicate a particular environment, you can create a library of virtual hard disks that are pre-loaded with specific sets of soft- ware. You and other members of your develop- Figure 1 ment and test team can clone the disks that you need and quickly replicate a particular environment in a virtual machine. This type of setup can save lots of time when you need to start over with a clean installation, or duplicate the same environ- ment in several virtual machines This type of setup can save lots of time when you need to start over with a clean installa- tion, or duplicate the same environment in several virtual machines (See Figure 1). The figure shows Microsoft's Virtual Server with three virtual machines running the same build of BizTalk Server on three different operating systems. You could click one of 1 The Developer’s Guide to Virtual Machines, an Internet.com Developer eBook. Copyright 2006, Jupitermedia Corp. The Developer's Guide to Virtual Machines the thumbnails to access the virtual machine or use a Remote Desktop connection. (Note that licensing for software running in virtual machines is pretty much the same as in physical According to Rich Lechner, VP of Virtualization technol- machines, so make sure you have the proper licenses for all ogy for IBM, “Anywhere from 40 to 50 percent of the of your running software.) clients out there either have implemented or plan to implement virtualization over the next one to two You can also attach virtual machines to physical networks just as if they were physical, or you can create a virtual network years. We are seeing very broad-based adoption. for testing different scenarios, while isolating virtual machine Certainly much broader than, in my experience, the network traffic to the host computer. This is useful for patch- early days of Java and Linux." ing virtual machines, providing general network access to them, and validating different network scenarios that might be The trend has not been lost on chipmakers such as relevant in your software testing. Intel and AMD, who are tweaking the underlying sili- con of the x86 platform to enable VM software makers to optimize their products. Development and Testing Uses for Virtual Machines Let's examine exactly how virtualization works. The following sections describe the different ways that you An operating system running on a physical computer can use virtual machines for development and testing. controls the computer's hardware, including memory, CPU, network adapters, hard disks, and peripherals. Create a Library of Virtual Hard Disks Because only one operating system can control the hardware at any given time, you usually can't run As previously mentioned, you can create a library of virtual more than one operating system on the same comput- hard disk (.vhd) files that you and your colleagues can use to er at the same time. "instantly" recreate a particular environment. Using Microsoft's Virtual Server and Virtual PC, you can do this by creating a virtual machine, installing the requisite software on it, and then Virtual machine technology uses an agent to allocate cloning the .vhd file. You can attach the .vhd file to a new vir- physical hardware resources to the host operating tual machine, boot it up, and voila: your environment is run- system and the running virtual machines as needed. ning on the new virtual machine. The host still controls the physical hardware, but each virtual machine emulates its own set of hardware and If you want to run more than one virtual machine with the "borrows" physical resources from the host to run it. same .vhd on the same network, you must sysprep the virtual The virtualization agent (called the virtual machine machine to prevent network conflicts. monitor in Microsoft's Virtual Server and Virtual PC Create a Standardized IDE products) allocates the resources to each virtual machine's emulated hardware. This allows the hard- With your IDE deployed in a virtual machine, you can quickly ware of the physical computer to serve the host oper- set up a development environment that meets your compa- ating system and a number of virtual machines simul- ny's standards and even share it with colleagues in your .vhd taneously. library. If you work at home, you can install a virtual machine on your personal computer with the corporate "standard" As you might guess, you need enough hardware environment so you can connect to the corporate network. resources to run the various operating systems and applications, which is at the root of the main limitation You can also sandbox the virtual machine, isolating it from of virtual machines: you may need to beef up your your personal computer, to satisfy corporate security require- ments. We'll go into sandboxing in more detail later. hardware if it doesn't have enough resources for the virtual machines you want to run. 2 The Developer’s Guide to Virtual Machines, an Internet.com Developer eBook. Copyright 2006, Jupitermedia Corp. The Developer's Guide to Virtual Machines Test New Development and Test Tools You can try out new tools for software development and testing on a virtual machine without jeopardizing your pri- mary workstation setup. You can set up a .vhd file that has your basic environment installed, copy it, attach it to a new virtual machine, and boot it up. You can then install the new tools and see how they work in your environment. Perform Functionality Tests Use the following tips to make it quicker and easier to perform software functionality tests with virtual machines: • Deploy a variety of destination environments for functionality testing using minimal hardware (as previously mentioned). • Set up a library of test environments in virtual machines for rapid deployment (also previously mentioned). Just copy the .vhd file, attach it to a virtual machine, and boot up. • Run tests and then quickly roll your virtual machines back to a clean state. You can do this with Microsoft's Virtual PC and Virtual Server thanks to a cool feature called "undo disks." It can be used to reinstall builds of software that are under development at Microsoft. To get back to a clean base where you can install the latest build, do the following: • Install all of the prerequisites for the software. • Enable undo disks. • Install the software. When you want to go back to a clean base, turn off the virtual machine and discard undo disks. • Test complex network scenarios without setting up a physical network. Thanks to the flexible virtual network- ing in Virtual Server, you can create a complete network setup on your test computer and keep all of the net- work traffic isolated to the physical box. You can even set up a domain. What Not to Expect from Virtual Machines While their benefits all sound ideal, virtual machines do have two main drawbacks: they share physical resources with the host and any other running virtual machines, and they carry some processing overhead. So you can't expect the same performance from a virtual machine as you do from a physical one. Because they contend for resources in this way, the following are not good uses of virtual machines: • Performance and stress testing. Your results may not be accurate because the amount of resources available for a given operation can fluctuate.
Recommended publications
  • Redbooks Paper Linux on IBM Zseries and S/390
    Redbooks Paper Simon Williams Linux on IBM zSeries and S/390: TCP/IP Broadcast on z/VM Guest LAN Preface This Redpaper provides information to help readers plan for and exploit Internet Protocol (IP) broadcast support that was made available to z/VM Guest LAN environments with the introduction of the z/VM 4.3 Operating System. Using IP broadcast support, Linux guests can for the first time use DHCP to lease an IP address dynamically from a DHCP server in a z/VM Guest LAN environment. This frees the administrator from the previous method of having to hardcode an IP address for every Linux guest in the system. This new feature enables easier deployment and administration of large-scale Linux environments. Objectives The objectives of this paper are to: Review the z/VM Guest LAN environment Explain IP broadcast Introduce the Dynamic Host Configuration Protocol (DHCP) Explain how DHCP works in a z/VM Guest LAN Describe how to implement DHCP in a z/VM Guest LAN environment © Copyright IBM Corp. 2003. All rights reserved. ibm.com/redbooks 1 z/VM Guest LAN Attention: While broadcast support for z/VM Guest LANs was announced with the base z/VM 4.3 operating system, the user must apply the PTF for APAR VM63172. This APAR resolves several issues which have been found to inhibit the use of DHCP by Linux-based applications running over the z/VM Guest LAN (in simulated QDIO mode). Introduction Prior to z/VM 4.2, virtual connectivity options for connecting one or more virtual machines (VM guests) was limited to virtual channel-to-channel adapters (CTCA) and the Inter-User Communications Vehicle (IUCV) facility.
    [Show full text]
  • Firewalld ↔ Iptables (Continued)
    firewalld ↔ iptables (continued) Or, better said as, Understanding Linux Firewall Changes and Tools A firewall evolution and system management process Presented to SLUUG By David Forrest August 9, 2017 Bio I am David Forrest, a businessman in the housing and construction materials industry. Always keen to use the open and supportable solution even if it means getting my hands dirty. I was there, I did that, I have the t-shirt. And, I'm retired so now I can work on the “bleeding edge” - so on to the testing kernel! Why tonight? Why should we switch to firewalld? I felt a continuation was in order to address the problems that are caused by the virtual world and the interaction of processes within today's machines. Our various distributions seem to be jumping to the systemd init setup as it appears to offer better administration control to Linux Kernel machines. Firewalld just one of many efforts to see the future. In recent years, operating system virtualization has taken the industry by storm. But I'm still on CentOS7 and it uses firewalld as its default firewall along with systemd https://wiki.debian.org/Debate/initsystem/systemd firewalld It's a daemon and a command line interface to all the backends! One can start it as a service with a default setup and change it dynamically with a command line or with the daemon using D-Bus or NetworkManager. And with the new nftables release, we'll be able to combine several rules in one rich rule. The firewalld Architecture Firewalld and nft Systems have also moved toward Software Defined Networking (SDN) and system density has increased.
    [Show full text]
  • Hardening Linux
    eBooks-IT.org 4444_FM_final.qxd 1/5/05 12:39 AM Page i eBooks-IT.org Hardening Linux JAMES TURNBULL 4444_FM_final.qxd 1/5/05 12:39 AM Page ii eBooks-IT.org Hardening Linux Copyright © 2005 by James Turnbull All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN (pbk): 1-59059-444-4 Printed and bound in the United States of America 987654321 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Lead Editor: Jim Sumser Technical Reviewer: Judith Myerson Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis, Jason Gilmore, Chris Mills, Dominic Shakeshaft, Jim Sumser Project Manager: Kylie Johnston Copy Edit Manager: Nicole LeClerc Copy Editor: Kim Wimpsett Production Manager: Kari Brooks-Copony Production Editor: Kelly Winquist Compositor: Linda Weidemann Proofreader: Lori Bring Indexer: Kevin Broccoli Artist: Kinetic Publishing Services, LLC Cover Designer: Kurt Krames Manufacturing Manager: Tom Debolski Distributed to the book trade in the United States by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013, and outside the United States by Springer-Verlag GmbH & Co. KG, Tiergartenstr. 17, 69112 Heidelberg, Germany. In the United States: phone 1-800-SPRINGER, fax 201-348-4505, e-mail [email protected], or visit http://www.springer-ny.com.
    [Show full text]
  • Demystifying Internet of Things Security Successful Iot Device/Edge and Platform Security Deployment — Sunil Cheruvu Anil Kumar Ned Smith David M
    Demystifying Internet of Things Security Successful IoT Device/Edge and Platform Security Deployment — Sunil Cheruvu Anil Kumar Ned Smith David M. Wheeler Demystifying Internet of Things Security Successful IoT Device/Edge and Platform Security Deployment Sunil Cheruvu Anil Kumar Ned Smith David M. Wheeler Demystifying Internet of Things Security: Successful IoT Device/Edge and Platform Security Deployment Sunil Cheruvu Anil Kumar Chandler, AZ, USA Chandler, AZ, USA Ned Smith David M. Wheeler Beaverton, OR, USA Gilbert, AZ, USA ISBN-13 (pbk): 978-1-4842-2895-1 ISBN-13 (electronic): 978-1-4842-2896-8 https://doi.org/10.1007/978-1-4842-2896-8 Copyright © 2020 by The Editor(s) (if applicable) and The Author(s) This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Open Access This book is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this book are included in the book’s Creative Commons license, unless indicated otherwise in a credit line to the material.
    [Show full text]
  • Migrazione Da Iptables a Nftables
    UNIVERSITÀ DEGLI STUDI DI GENOVA MASTER IN CYBER SECURITY AND DATA PROTECTION Migrazione da iptables a nftables Autore: Tutor accademico: dott. Marco DE BENEDETTO prof. Mario MARCHESE Tutor aziendale: dott. Carlo BERUTTI BERGOTTO Project Work finale del Master di secondo livello in Cyber Security and Data Protection III edizione (a.a. 2016/17) 10 marzo 2019 iii Indice 1 Introduzione 1 2 Packet Filtering in Linux 3 2.1 Storia ...................................... 3 2.2 Netfilter .................................... 4 2.3 Nftables successore di iptables? ....................... 6 3 Firewall Linux nella rete Galliera 7 3.1 Cenni storici .................................. 7 3.2 Architettura attuale .............................. 7 3.3 Problemi dell’infrastruttura ......................... 9 3.4 Opportunità di migrazione a nftables ................... 9 4 Nftables 11 4.1 Caratteristiche di nftables .......................... 11 4.2 Packet flow in nftables ............................ 12 4.3 Strumenti di debug e tracing ......................... 15 5 Migrazione del Captive Portal 17 5.1 Captive Portal con iptables .......................... 17 5.2 Captive Portal nella versione nftables ................... 19 5.3 Autorizzazioni temporizzate ........................ 20 5.4 Aggiornamento del timeout ......................... 21 5.5 Limitazione della banda ........................... 22 6 Strumenti di sviluppo e test 25 6.1 Virtualizzazione ................................ 25 6.2 Debug ..................................... 26 7 Considerazioni finali
    [Show full text]
  • Linux Quick Reference Guide (6Th Ed.)
    Linux Quick Reference Guide 6th edition August 2018 Foreword This guide stems from the notes I have been taking both while working as a Linux sysadmin and while preparing the certification exams LPIC-1 (Linux Professional Institute Certification level 1), LPIC-2, RHCSA (Red Hat Certified System Administrator), and RHCE (Red Hat Certified Engineer). It contains a good amount of topics for these certification exams, with some subjects handled in more details than others, plus other useful information about standards and tools for Linux system administration. Unless otherwise specified, shell commands and operations refer to Bash. This is an independent publication and is not affiliated with, authorized by, sponsored by, or otherwise approved by LPI or Red Hat. You can freely use and share this whole guide or the single pages, both in electronic or in printed form, provided that you distribute them unmodified and not for profit. Happy Linux hacking, Daniele Raffo Version history 1st edition May 2013 2nd edition September 2014 3rd edition July 2015 4th edition June 2016 5th edition September 2017 6th edition August 2018 Bibliography and suggested readings ● Evi Nemeth et al., UNIX and Linux System Administration Handbook, O'Reilly ● Rebecca Thomas et al., Advanced Programmer's Guide to Unix System V, McGraw-Hill ● Mendel Cooper, Advanced Bash-Scripting Guide, http://tldp.org/LDP/abs/html ● Adam Haeder et al., LPI Linux Certification in a Nutshell, O'Reilly ● Heinrich W. Klöpping et al., The LPIC-2 Exam Prep, http://lpic2.unix.nl ● Michael Jang, RHCSA/RHCE Red Hat Linux Certification Study Guide, McGraw-Hill ● Asghar Ghori, RHCSA & RHCE RHEL 7: Training and Exam Preparation Guide, Lightning Source Inc.
    [Show full text]
  • Porting Linux to the Powerpc MPC7451
    Freescale Semiconductor Document Number: AN2145 Application Note Rev. 2, 10/2006 Porting Linux to the PowerPC™ MPC7451 by Maurie Ommerman CPD Application Freescale Semiconductor, Inc. Austin, TX This document describes porting Montavista’s Hardhat™ Contents Linux from a sandpoint 2 platform with the MPC8240PMC, 1 Terminology . .1 2 Development Environment . .2 the MPC755PMC, or the MPC7400PMC to the 3 Installing Montavista CDK 1.2 . .3 MPC7450/MPC7451. It explains how to set up the 4 CDK RPMs . 3 development environment and how to compile, load, and run 5 Mandrake CD RPMs . 4 6 Building the Kernel . .5 the resultant Hardhat Linux on the sandpoint MPC7450 7 Dependencies . .10 platform. (If building Linux for sandpoint 3, refer to 8 Source Code Changes . .10 Appendix A, “Sandpoint 3 Platform.”) 9 Executable Images . .13 10 Installing an Updated Kernel Source . .13 The MPC7451 has the same functionality as the MPC7450, 11 Untar the Source . .14 and any differences in data regarding bus timing, signal 12 Additional Required Files . 14 behavior, and AC, DC, and thermal characteristics are 13 Sandpoint Setup . .15 14 Hard Drive for Linux OS . .15 detailed in the hardware specifications. Note that because the 15 fdisk Commands . .16 MPC7450 and MPC7451 have the same functionality, they 16 Partition Configuration . .16 are used interchangeably throughout the documentation and 17 Making a ramdisk Linux OS . .17 18 make menuconfig . .17 code. 19 genromfs . .17 20 Downloading the Executable . .19 21 Terminal Emulators . .20 1 Terminology 22 Minicom . .20 23 DINK32 Booting the MPC7450 Linux: Example . .22 The following terms are used in this document.
    [Show full text]
  • Linux IPCHAINS-HOWTO
    Linux IPCHAINS−HOWTO Linux IPCHAINS−HOWTO Table of Contents Linux IPCHAINS−HOWTO..............................................................................................................................1 Rusty Russell...........................................................................................................................................1 1.Introduction...........................................................................................................................................1 2.Packet Filtering Basics..........................................................................................................................1 3.I'm confused! Routing, masquerading, portforwarding, ipautofw.......................................................1 4.IP Firewalling Chains...........................................................................................................................1 5.Miscellaneous.......................................................................................................................................2 6.Common Problems...............................................................................................................................2 7.A Serious Example...............................................................................................................................2 8.Appendix: Differences between ipchains and ipfwadm.......................................................................2 9.Appendix: Using the ipfwadm−wrapper script.....................................................................................3
    [Show full text]
  • Linux® Firewalls: Enhancing Security with Nftables and Beyond
    Linux® Firewalls Fourth Edition This page intentionally left blank Linux® Firewalls Enhancing Security with nftables and Beyond Fourth Edition Steve Suehring Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Capetown • Sydney • Tokyo • Singapore • Mexico City Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales department at [email protected] or (800) 382-3419. For government sales inquiries, please contact [email protected]. For questions about sales outside the U.S., please contact [email protected]. Visit us on the Web: informit.com/aw Library of Congress Cataloging-in-Publication Data Suehring, Steve. Linux firewalls : enhancing security with nftables and beyond.—Fourth edition / Steve Suehring. pages cm Earlier ed. authored by Robert L. Ziegler. Includes bibliographical references and index. ISBN 978-0-13-400002-2 (pbk.
    [Show full text]
  • Security Guide
    Fedora 11 Security Guide A Guide to Securing Fedora Linux Johnray Fuller John Ha David O'Brien Scott Radvan Eric Christensen Security Guide Fedora 11 Security Guide A Guide to Securing Fedora Linux Edition 1.0 Author Johnray Fuller [email protected] Author John Ha [email protected] Author David O'Brien [email protected] Author Scott Radvan [email protected] Author Eric Christensen [email protected] Copyright © 2008 Red Hat, Inc. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. The original authors of this document, and Red Hat, designate the Fedora Project as the "Attribution Party" for purposes of CC-BY-SA. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. For guidelines on the permitted uses of the Fedora trademarks, refer to https://fedoraproject.org/wiki/ Legal:Trademark_guidelines. Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
    [Show full text]
  • Building a Linux Firewall Matthew D. Rossmiller November 11, 2003 1
    ¢¡¤£¦¥¨§©£¦ © £¦ ¡£¨ ¥¦¥ "!#!%$'&)(+*,-/.1020#35476867&:9 ;<.>=?&:3@A&:9CB1B?DFE?G1G1H I JLKMONP/QCRTSUMV¨PWK XZY[]\_^)`bac`d^fe>gih#YkjmlnY^pophq`rlsdtps_urhqYv[)opYjml>jmswud`x[yurji^flzjms{sdh#|¨}c`djml>~Cl:udh#`dlch¨uW|q^)l>l>h2|¦urh#ozl>hqu_^f`dps#C >h<~f^f[)gFjms ud^Y[]pjiYjmqh<sdh#|q}>`djiu_tjiudc^)}pubgm^fsdjml>~Tud>h<e"h#l>h¨>uxsb^)ud>h/lch¨u_U^)`r?TXY[y\_^f`Uh#[]a?^)lzsdtps_urhqYv[)opYjml>jmswud`x[yur^)`xs c[%fhjilCud>h{f}ch#swu^)`swh2|¨}>`rjiu_t©jsur>h"`dh#U[)gig8XUhqgmgur}>l>h2oTc`rhq[]gmgjsur>hc`xswugmjil>hW^]Aophqhqlcsdh^f`l>hqu_^f`dfh#o Y[)|x>jml>h2sq >js`dh#a"^f`wu|q^y)hq`xsc`rhq[]gmg'|q^)lp"~)}>`x[yurji^fl^)a>udjm^)lcs^f`ud>h/jil}p^)a?hq`x[yudjml>~sdtswudh#YT{u{[)srsw}>Yh2s[¤~fhql>h#`r[)g []Yjmgij[]`rjiu_tbjiudc`rhq[]gmgc[]l"olfurhq`rl>h¨uU F`r^]ud^p|q^)gL¡_ U¢'l>hqu_^f`djml>~|¨^)l"|¨hqa>urs#OXo>ophql"op}>YX£a>`r^yjmoph2sF[]l^yfhq`r:jmhq ^]"`dh#U[)gigO|¨^)l"|¨hqa>urs[)lcoTurhq`rY{jml>^fgi^f~)t©^)`ur>h{}>l>jml>j¤urjm[]udh2o¥Xo>oph#lcop}>Y§¦ |¨^flfux[]jmlcs[<e>`rjihqFjil:ud`r^pop}c|¨udjm^)lur^/udch l:udh#`dl>hqu F`r^]ud^p|q^)g¡_ U¢Ul>h¨u_U^)`rjil>~|¨^flc|¨h#apurs`rhqgmhqy[)lfuur^[o>jmsr|¨}csrsdji^fl<^]Oc`rhq[]gmg¥swtpswudhqYs# >h`rhqY[]jmlcoph#`^]Oud>jsac[)a"h#`js^)`r~f[)l>ji#h#o<jil:ud^^f}>`sdh#|¨udjm^)lcs#lswh2|¦udjm^)l¤u_U^hjmgig¨gi^^f<[yu^f}>`sdhqac[)`r[]udh c`rhq[]gmg"jmYa>gmhqYhql:ur[]udjm^)lcs^f`jil}p¥©:udc`dh#h^fa"h#lpªsd^)}c`r|qh[]l"o/^)lch|q^)YYhq`x|¨j[]g8O >h#lL«pjml©sdh#|¦urji^flcsAud>`rhqh[]lco/^)}>` Uhjmgighqp[)Yjil>hU^)lch^)cudchA^f}>`'jiYa>gmhqYhql:ux[yudjm^)l"sq«]lch¨uw"g¤urhq`¨¬%jmapur[)e>gih2sq«yjmlWo>h¨ur[)jig8­h#|¨udjm^)l®|¨^fl:ur[]jmlcs'sd^)YhA~fhql>h#`r[)g
    [Show full text]
  • Nsrc Default Presentation
    Simple iptables firewall Network Startup Resource Center www.nsrc.org These materials are licensed under the Creative Commons Attribution-NonCommercial 4.0 International license (http://creativecommons.org/licenses/by-nc/4.0/) Linux has a built-in firewall ● A good way to limit access to your host ● Has been through many versions! – ipfwadm – ipchains – iptables – nftables ● Today most distributions use iptables iptables: viewing rules ● iptables -L -n -v – Show the FILTER rules – (L)ist rules, (n)o reverse DNS, (v)erbose – Separate rules INPUT (packets to the host), OUTPUT (packets from the host), and FORWARD (packets routed via the host) ● iptables -L -n -v -t nat – Show the NAT rules iptables: writing rules ● It's very difficult to do it properly – lots of edge cases – certain ICMP packets are essential for correct network operation (e.g. path MTU discovery) ● Instead, use a simpler front-end ● For Ubuntu/Debian: look at ufw and ferm ● For CentOS/RedHAT: system-config-firewall-tui or firewall-cmd ufw in operation # install apt-get install ufw # show rules ufw status # allow all traffic from a given IP ufw allow in from 128.223.157.19 # allow from all IPs to given service # (note: "in" is assumed if not specified) ufw allow proto tcp to 1.2.3.4 port 80 ufw configuration storage ● Stored in /etc/ufw/ and /etc/ufw/applications.d/ ● The latter has pre-defined application rules – you can apply these rules if you want them – simplifies application configuration # cat /etc/ufw/applications.d/openssh-server [OpenSSH] title=Secure shell server, an rshd replacement description=OpenSSH is a free implementation of \ the Secure Shell protocol.
    [Show full text]