Openbsd As a File Server

Total Page:16

File Type:pdf, Size:1020Kb

Openbsd As a File Server OpenBSD as a File Server With Active Directory threatening the traditional SMB (Server Message Block) Windows file sharing and Appletalk/Chooser MacOS file sharing, open source Unix has an opening to become recognized as a file sharing platform that can cheaply and efficiently replace the more traditional operating systems. Although support for active directory is lacking, in the present interim where SMB, Chooser, and NFS (Network File System) still reign supreme, tools exist to make OpenBSD the perfect file server for cross-platform client networks and complex internetworks. As an example configuration for the various subsystems involved in this, let's look at my main OpenBSD server at work, which handles Appletalk, SMB, and NFS simultaneously and distributes files over a multi- platform internetwork. There are three repositories of data, which must all be accessible by Macintosh and Windows clients on the internal network: 1. /home/www (A local web-hosting directory on newboing, the server in question) 2. /deepthought (An NFS mount from deepthought, a remote server at a co-location facility) 3. /doca (An NFS mount from doc_a, a local NT server providing main internal file serving) Given this layout, there are three discernable steps involved in configuration. Step 1, configuring the mounts The NFS daemon on deepthought was configured to export only the /home directory and all its subsidiaries, and only to the correct IP address of newboing. This was done via an entry in /etc/exports reading: /home 202.56.38.123 Then it was mounted on newboing via the following command: mount -t nfs deepthought.domain.com.au:/home /deepthought Since there are problems mounting SMB filesystems under OpenBSD (it is possible, but the new smbfs- based smbmount is heavily Linux oriented), I chose to run PC-NFS on doc_a. PC-NFS is a port of NFS to Windows NT and 2000. Without going into the details of PC-NFS configuration, the mount on newboing was performed using the command: mount -t nfs 192.168.0.40:/data1 /doca Step 2, exporting data via SMB The Samba suite, available within the OpenBSD ports tree, provides SMB interoperability for most UNIX platforms. I've used Samba within this instance to export all three data repositories over SMB, for the use of the internal Windows clients. Samba installation from the ports tree is a simple process: cd /usr/ports/net/samba make && make install Samba draws its configuration primarily from one file, /etc/smb.conf. This file is installed with a set of default options by the ports tree distribution. For the purposes of this example, the following implicit configuration was made in smb.conf: workgroup = documenta # This defines the workgroup, or in this case # NT Domain, as 'documenta' server string = OpenBSD (newboing) # The NetBIOS description field, viewable when # a windows client browses to this server. encrypt passwords = yes # By default, Windows 98 & NT use encrypted passwords, # so in nearly every instance they should be enabled. smb passwd file = /etc/smbpasswd # Specifies the location of the encrypted password file. interfaces = 192.168.0.1/24 # Specifies that only the interface spanning 192.168.0.1/24 # should be Samba-enabled (ie. not over the live interface). With this generic configuration complete, it's time to specify the shares. These are also entered into smb.conf, with the default example shares commented out using a ; (semi-colon): [www] comment = www path = /home/www public = yes writable = yes create mask = 0777 [deepthought] comment = deepthought path = /deepthought public = yes writable = yes create mask = 0777 [doca] comment = doc_a path = /doca public = yes writable = yes create mask = 0777 In each case, these shares are "public" -- meaning that anyone with a valid SMB logon on newboing can read, write, and delete (provided the relevant Unix permissions to the files permit it). As previously mentioned, Samba has its own user authentication mechanism, different than OpenBSD's native system authentication. To add a user to the Samba authentication system, perform the following commands: adduser joe smbpasswd -a joe The first command adds the user to the OpenBSD system, the second adds them to the Samba authentication system. In each instance of the commands above, you will be prompted for password details. For manageability purposes, it is recommended to keep these passwords in synch. This complete, it's time to start the Samba daemons and test your system. There are two daemons that must be started: nmbd & smbd & The first, nmbd, is the NetBIOS naming-scheme daemon, while smbd handles actual SMB file and print sharing. To ensure that the daemons start upon boot, a simple entry in /etc/rc.local is required: echo -n 'Starting Samba Daemons...' nmbd -D smbd -D Assuming we have added the user "joe" with password "password" and the internal IP address of the Samba server is 192.168.0.1, the following command would be used: smbclient -L 192.168.0.1 -U joe This command attempts to list all SMB shares on the host 192.168.0.1 available to the user joe. You will then be prompted for a password to authenticate the user joe: added interface ip=192.168.0.1 bcast=192.168.0.255 nmask=255.255.255.0 Password: password After successfully authenticating, a list of SMB shares will appear: Domain=[DOCUMENTA] OS=[Unix] Server=[Samba 2.0.6] Sharename Type Comment --------- ---- ------- www Disk www deepthought Disk deepthought doca Disk doc_a IPC$ IPC IPC Service (OpenBSD (newboing)) Server Comment --------- ------- DOC_A NEWBOING OpenBSD (newboing) Workgroup Master --------- ------- DOCUMENTA DOC_A This complete, you're ready to set up Windows clients to use the shares. Step 3, exporting data via Appletalk The netatalk (pronounced "nedtalk") package is used to handle Appletalk interoperability. Given that Appletalk is a protocol independent of TCP/IP and that the GENERIC kernel does not contain support for it, the first step towards installation is to build a compatible kernel. Details of kernel configuration were discussed in the previous article in this series, "OpenBSD Kernel Compilation and Optimization," so I will not go into great detail here. A kernel should be built with the option in its configuration file: option NETATALK This will provide kernel-level support for Appletalk and its associated protocols. Once the system has been rebooted with this in place, netatalk installation is ready to take place from the ports tree, using the following commands: cd /usr/ports/net/netatalk make && make install In contrast to Samba, netatalk does use OpenBSD's system authentication, so in the case of this example it is not necessary to perform any user configuration, as the system users have already been added. Share definitions are handled by the file/etc/netatalk/AppleVolumes.default for users who have no implicit AppleVolumes file of their own. The file by default contains the single line: ~ This allows each user who logs in to access ~/ (their own home directories). Other shares available to all users should be added to the top of the file /etc/netatalk/AppleVolumes.system, which handles these share definitions as well as file extension descriptors. For this example, the following AppleVolumes.system configuration was required: #Share Comment /home/www WWW /deepthought deepthought /doca doc_a Unlike other filesharing systems such as NFS and Samba, netatalk requires quite a number of daemons to be run simultaneously in order to achieve full functionality. This is controlled by the file /etc/netatalk/rc.atalk, which is installed by default from the ports tree distribution. To start netatalk simply execute the following commands: chmod +x /etc/netatalk/rc.atalk /etc/netatalk/rc.atalk The bottom command should also be added to /etc/rc.local in order to make netatalk start automatically upon boot. This complete, any Macintosh machines on a local network segment should be able to access these shares via Chooser. David Jorm has been involved with open source and security projects for several years, originally with OpenBSD and Debian GNU/Linux, now with the development team at wiretapped.net..
Recommended publications
  • IPS Signature Release Note V9.17.79
    SOPHOS IPS Signature Update Release Notes Version : 9.17.79 Release Date : 19th January 2020 IPS Signature Update Release Information Upgrade Applicable on IPS Signature Release Version 9.17.78 CR250i, CR300i, CR500i-4P, CR500i-6P, CR500i-8P, CR500ia, CR500ia-RP, CR500ia1F, CR500ia10F, CR750ia, CR750ia1F, CR750ia10F, CR1000i-11P, CR1000i-12P, CR1000ia, CR1000ia10F, CR1500i-11P, CR1500i-12P, CR1500ia, CR1500ia10F Sophos Appliance Models CR25iNG, CR25iNG-6P, CR35iNG, CR50iNG, CR100iNG, CR200iNG/XP, CR300iNG/XP, CR500iNG- XP, CR750iNG-XP, CR2500iNG, CR25wiNG, CR25wiNG-6P, CR35wiNG, CRiV1C, CRiV2C, CRiV4C, CRiV8C, CRiV12C, XG85 to XG450, SG105 to SG650 Upgrade Information Upgrade type: Automatic Compatibility Annotations: None Introduction The Release Note document for IPS Signature Database Version 9.17.79 includes support for the new signatures. The following sections describe the release in detail. New IPS Signatures The Sophos Intrusion Prevention System shields the network from known attacks by matching the network traffic against the signatures in the IPS Signature Database. These signatures are developed to significantly increase detection performance and reduce the false alarms. Report false positives at [email protected], along with the application details. January 2020 Page 2 of 245 IPS Signature Update This IPS Release includes Two Thousand, Seven Hundred and Sixty Two(2762) signatures to address One Thousand, Nine Hundred and Thirty Eight(1938) vulnerabilities. New signatures are added for the following vulnerabilities: Name CVE–ID
    [Show full text]
  • 1.0 Intro to Openbsd Information Pertaining to Any -Current Options, It Only Attempts to Track 2.0 Other Resources What Has Been Released on CD
    OpenBSD Frequently Asked Questions Frequently Asked Questions OpenBSD FAQ This FAQ is maintained with information pertaining to the 2.6 release of OpenBSD. Not all information presented here may be accurate for older Language: [en] releases of OpenBSD. Information for previous releases is available. You [es] [de] should check http://www.openbsd.com/errata.html for important updates. The FAQ follows release versions of OpenBSD. It will not have 1.0 Intro to OpenBSD information pertaining to any -current options, it only attempts to track 2.0 Other resources what has been released on CD. This is so there is no confusion as to 3.0 Obtaining OpenBSD which versions are being documented here. 4.0 Installation Guide This FAQ will take you through most critical steps to setting up your own 5.0 Kernel Configuration OpenBSD system. The addressed questions range from new to advanced 6.0 Networking Setup users. Hopefully you will find this FAQ useful. Downloadable versions of 7.0 Keyboard Controls the FAQ are available in text and PDF. These versions may not be as 8.0 General Questions up-to-date as the HTML versions available from this page. 9.0 Migrating from Linux ● Text Version 10.0 System Management ● PDF Version 11.0 Performance Tuning 12.0 For Advanced Users Any questions can be directed to: [email protected] 13.0 IPSec 2.6, 2.7 Recently updated or added FAQ's 14.0 Disk setup ● 6.1.1 - Identifying and Setting Up Your Network Interfaces - Changed to reflect the movment of some drivers to the dc* driver.
    [Show full text]
  • The Apple Ecosystem
    APPENDIX A The Apple Ecosystem There are a lot of applications used to manage Apple devices in one way or another. Additionally, here’s a list of tools, sorted alphabetically per category in order to remain vendor agnostic. Antivirus Solutions for scanning Macs for viruses and other malware. • AVG: Basic antivirus and spyware detection and remediation. • Avast: Centralized antivirus with a cloud console for tracking incidents and device status. • Avira: Antivirus and a browser extension. Avira Connect allows you to view device status online. • BitDefender: Antivirus and malware managed from a central console. • CarbonBlack: Antivirus and Application Control. • Cylance: Ransomware, advanced threats, fileless malware, and malicious documents in addition to standard antivirus. • Kaspersky: Antivirus with a centralized cloud dashboard to track device status. © Charles Edge and Rich Trouton 2020 707 C. Edge and R. Trouton, Apple Device Management, https://doi.org/10.1007/978-1-4842-5388-5 APPENDIX A THe AppLe ECOSYSteM • Malware Bytes: Antivirus and malware managed from a central console. • McAfee Endpoint Security: Antivirus and advanced threat management with a centralized server to track devices. • Sophos: Antivirus and malware managed from a central console. • Symantec Mobile Device Management: Antivirus and malware managed from a central console. • Trend Micro Endpoint Security: Application whitelisting, antivirus, and ransomware protection in a centralized console. • Wandera: Malicious hot-spot monitoring, jailbreak detection, web gateway for mobile threat detection that integrates with common MDM solutions. Automation Tools Scripty tools used to automate management on the Mac • AutoCasperNBI: Automates the creation of NetBoot Images (read: NBI’s) for use with Casper Imaging. • AutoDMG: Takes a macOS installer (10.10 or newer) and builds a system image suitable for deployment with Imagr, DeployStudio, LANrev, Jamf Pro, and other asr or Apple Systems Restore-based imaging tools.
    [Show full text]
  • Linux Networking-HOWTO
    Linux Networking−HOWTO: Linux Networking−HOWTO: Table of Contents Linux Networking−HOWTO:............................................................................................................................1 Author: Joshua Drake poet@linuxports.com...........................................................................................1 1.Introduction...........................................................................................................................................1 2.Document History.................................................................................................................................1 3.How to use this HOWTO......................................................................................................................1 4.General Information about Linux Networking.....................................................................................1 5.Generic Network Configuration Information.......................................................................................1 6.Ethernet Information.............................................................................................................................2 7.IP Related Information..........................................................................................................................2 8.Advanced Networking with Kernel 2.2................................................................................................2 9.Using common PC hardware................................................................................................................2
    [Show full text]
  • Freenas® 11.2-U3 User Guide
    FreeNAS® 11.2-U3 User Guide March 2019 Edition FreeNAS® is © 2011-2019 iXsystems FreeNAS® and the FreeNAS® logo are registered trademarks of iXsystems FreeBSD® is a registered trademark of the FreeBSD Foundation Written by users of the FreeNAS® network-attached storage operating system. Version 11.2 Copyright © 2011-2019 iXsystems (https://www.ixsystems.com/) CONTENTS Welcome .............................................................. 8 Typographic Conventions ..................................................... 10 1 Introduction 11 1.1 New Features in 11.2 .................................................... 11 1.1.1 RELEASE-U1 ..................................................... 14 1.1.2 U2 .......................................................... 14 1.1.3 U3 .......................................................... 15 1.2 Path and Name Lengths .................................................. 16 1.3 Hardware Recommendations ............................................... 17 1.3.1 RAM ......................................................... 17 1.3.2 The Operating System Device ........................................... 18 1.3.3 Storage Disks and Controllers ........................................... 18 1.3.4 Network Interfaces ................................................. 19 1.4 Getting Started with ZFS .................................................. 20 2 Installing and Upgrading 21 2.1 Getting FreeNAS® ...................................................... 21 2.2 Preparing the Media ...................................................
    [Show full text]
  • Make Ubuntu a Perfect Mac File Server and Time Machine Volume [Update6]
    HowTo: Make Ubuntu A Perfect Mac File Server And Time Machine Volume [Update6] by Matthias Kretschmann (/about/) 5 years ago For quite some time I use my Ubuntu machine as a file and backup server for all Macs in my network which is perfectly accessible from the Finder in Mac OS X. There are some instructions available in the web for this task but all failed in my case so I wrote my own tutorial with all the steps needed for it to work properly. So here’s my little Tutorial for connecting Mac OS X Leopard with Ubuntu and using your Ubuntu machine as a backup volume for Time Machine but all steps can be repro- duced on every Linux box and they work with Mac OS X 10.4 Tiger too. At the end of this tutorial you will have a server which shows up in the Finder sidebar and behaves just like a Mac server when accessing it from your Macs. To be perfectly integrated with Mac OS X we’re going to use Apple’s Filing Protocol (AFP) (http://en.wikipedia.org/wiki/Ap- 1 di 21 16/09/13 16:47 ple_Filing_Protocol) for network and file sharing. Although this Tutorial involves using the Terminal in Ubuntu and looks a bit geeky it’s very easy even for beginners. I have tried to explain all steps and Terminal commands so you may learn a bit about the Terminal too. At the end of the article you can down- load my Server Displays icon pack quickly made by me with custom icons for a Mac, Ubuntu and Windows server.
    [Show full text]
  • (VI.) Connections: How CUPS Talks to Servers, Clients and Printers
    Linux Printing Tutorial at Linux−Kongress 2002 Cologne, Germany: (VI.) Connections: How CUPS talks to Print Servers, Print Clients and Printers (VI.) Connections: How CUPS talks to Servers, Clients and Printers Table of Contents (VI.) Connections: How CUPS talks to Print Servers, Print Clients and Printers...................1 CUPS in heterogeneous networks.....................................................................................................1 Receiving print data − CUPS as a print server..................................................................................3 IPP − Internet printing protocol............................................................................................3 LPD − Unix clients...............................................................................................................4 SMB/CIFS − Windows clients.............................................................................................5 AppleTalk/NetATalk − Mac clients.....................................................................................5 Sending print data − The CUPS backends........................................................................................6 Local printers: Parallel, USB, serial, FireWire, SCSI..........................................................6 HP's multi−function devices.................................................................................................8 IPP − Internet printing protocol............................................................................................8
    [Show full text]
  • Apple File Protocol Afp File Sharing
    Apple File Protocol Afp File Sharing Bartholemy never insphering any hollering creping mulishly, is Hanan fastidious and unasked enough? Auld Ivan undam very profitably while Willmott remains intercrural and unfeudal. Lamar often presuppose paltrily when eidetic Leonard solemnize heliacally and skydive her dynatrons. This action will NOT as LIABLE is ANY DIRECT, INDIRECT or doctor other friend of loss. Apple network shared access to files Keenetic. Get fixed setup an apple has a security of it allows remote access to share protocol. This must be aware that is updated? The primary file-sharing protocol for Macintosh computers is Apple File Protocol AFP AFP features file-system compatibility for both Mac OS X and legacy Mac. Recent changes in the file systems used by macOS have brought. Get much more power users can connect with extensive experience within their choice on a credit card. Directories can go have default ACLs irrelevant to access checks. Afp is visible in sizes, make it has never think about products not apply california, of all times per connection? The hijack of the immediate area needs to be adjusted in case images are still loading. How apple just one mac os x with information about how many others access: this file protocol apple will allow any questions or migration assistant lets you should be an error posting. The template described in this document is for file sharing services using the AFP Apple Filing Protocol protocol 4 The AFP protocol can is either AppleTalk. If you agree instead of issue that told them without permission is enabled by connecting user login username or materials, you must pursue your website functionalities require each windows? Is SMB an adequate alternative for this marble case? Your server brings even after applying in vms.
    [Show full text]
  • Novell AFP for Linux Administration Guide 12.2 Enabling Auditing
    Open Enterprise Server 11 SP3 Novell Apple Filing Protocol for Linux Administration Guide July 2016 Legal Notice For information about legal notices, trademarks, disclaimers, warranties, export and other use restrictions, U.S. Government rights, patent policy, and FIPS compliance, see https://www.novell.com/company/legal/. Copyright © 2014 - 2016 Novell, Inc. All Rights Reserved. Contents About This Guide 7 1 Overview of AFP 9 1.1 Understanding AFP . 9 1.1.1 AFP and Universal Password . 10 1.2 AFP Features and Capabilities. 10 1.3 Limitations . 10 1.4 What’s Next . 11 2 What’s New or Changed in AFP 13 2.1 What’s New (OES 11 SP3). 13 2.2 What’s New (OES 11 SP2). 13 2.3 What’s New or Changed in AFP (OES 11 SP1) . 13 2.4 What’s New or Changed in AFP (OES 11). .13 3 AFP Monitoring and Management 15 3.1 Overview of AFP Monitoring and Management . 15 3.2 Using AFP Monitoring and Management . .15 3.3 Monitoring Connections . 15 3.4 Monitoring Files . 16 3.5 Monitoring Configuration Parameters . 17 4 Planning and Implementing AFP 19 4.1 Supported Platforms. 19 4.2 Requirements. 19 4.3 Antivirus Support . 19 4.4 Unsupported Service Combinations. 20 4.5 What’s Next . 20 5 Installing and Setting Up AFP 21 5.1 Installing AFP during OES 11 SP3 Installation. 21 5.2 Installing AFP after OES 11 SP3 Installation . 24 5.3 Installing AFP NMAS Methods. 24 5.3.1 Installing AFP NAMS Methods during a New Installation .
    [Show full text]
  • Netatalk 2.0 Manual Next
    [main] [faq] [documentation] [downloads] [links] [mailing lists] Netatalk 2.0 Manual Next Netatalk 2.0 Manual 2.0.5 Table of Contents Legal Notice 1. Introduction to Netatalk 2. Installation How to obtain Netatalk Binary packages Source packages Compiling Netatalk Prerequisites Compiling Netatalk Compiling a new Berkeley DB for Netatalk 3. Setting up Netatalk Appletalk To use AppleTalk or not No AppleTalk routing atalkd acting as an AppleTalk router File Services Setting up the AFP file server CNID backends Charsets/Unicode Authentication Printing Setting up the PAP print server Using AppleTalk printers Time Services Using Netatalk as a time server for Macintoshes Starting and stopping Netatalk 4. Upgrading from a previous version of Netatalk Overview Volumes and filenames How to upgrade a volume to 2.0 How to use a 1.x CAP encoded volume with 2.0 How to use a 1.x NLS volume with 2.0 Choosing a CNID storage scheme How to upgrade if no persistent CNID storage was used How to upgrade if a persistent CNID storage scheme was used How to upgrade if a persistent CNID storage scheme was used, the brute force approach Setting up a test server on the same machine Setting up an empty test share Duplicating an already existing share Configuring and running the test afpd 5. Manual Pages achfile — change type and/or creator of Apple Macintosh files (netatalk format) acleandir — clean up a directory containing netatalk Apple Macintosh files aecho — send AppleTalk Echo Protocol packets to network hosts afile — display type and creator of Apple Macintosh
    [Show full text]
  • Open Source Used in Asyncos 9.5 for Email
    Open Source Used In Cisco AsyncOS 9.5 for Email Cisco Systems, Inc. www.cisco.com Cisco has more than 200 offices worldwide. Addresses, phone numbers, and fax numbers are listed on the Cisco website at www.cisco.com/go/offices. Text Part Number: 78EE117C99-84954594 Open Source Used In Cisco AsyncOS 9.5 for Email 1 This document contains licenses and notices for open source software used in this product. With respect to the free/open source software listed in this document, if you have any questions or wish to receive a copy of any source code to which you may be entitled under the applicable free/open source license(s) (such as the GNU Lesser/General Public License), please contact us at [email protected]. In your requests please include the following reference number 78EE117C99-84954594 Contents 1.1 AnyEvent 5.34 1.1.1 Available under license 1.2 Apache Commons Lang 2.0 1.2.1 Notifications 1.2.2 Available under license 1.3 Apache Commons: Logging 1.0.3 1.3.1 Notifications 1.3.2 Available under license 1.4 Aquarium 2.2.1 1.4.1 Available under license 1.5 Archive::Zip 1.30 1.5.1 Available under license 1.6 B::Deobfuscate 0.10 1.6.1 Available under license 1.7 B::Deobfuscate 0.20 1.7.1 Available under license 1.8 B::Keywords 0.06 1.8.1 Available under license 1.9 B::Keywords 1.10 1.9.1 Available under license 1.10 BerkeleyDB-perl 0.49 1.10.1 Available under license 1.11 Boost 1.41 1.11.1 Available under license 1.12 Bouncy Castle 1.34 1.12.1 Available under license Open Source Used In Cisco AsyncOS 9.5 for Email 2 1.13
    [Show full text]
  • The Netbsd Operating System
    The NetBSD Operating System A Guide Federico Lupi The NetBSD Operating System: A Guide by Federico Lupi Copyright © 1999, 2000, 2001, 2002 by Federico Lupi Copyright © 2003 by The NetBSD Foundation License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by Federico Lupi for the NetBSD Project. 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    [Show full text]