Ftp File and Print Server

Slides:



Advertisements
Similar presentations
Ipchains and Iptables Linux operating system natively supports packet-filtering rules: Kernel versions 2.2 and earlier support the ipchains command. Kernel.
Advertisements

Securing Network using Linux. Lesson Outline Setting up a secure system TCP Wrapper configuration Firewalls in Linux Authentication Systems –NIS –Kerberos.
Homework 5b: Samba. Computer Center, CS, NCTU 2 Network-based File Sharing (1)  NFS (UNIX-based) mountd is responsible for mount request nfsd and nfsiod.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
Linux+ Guide to Linux Certification, Second Edition
Linux Networking CIS Why Linux/Unix? Configurability ▫Customizable System to satisfy unique needs. Scalability ▫Able to serve an increasing number.
1 COP 4343 Unix System Administration Unit 9: printing – lpr – CUPS.
1 Chapter Overview Introduction to Windows XP Professional Printing Setting Up Network Printers Connecting to Network Printers Configuring Network Printers.
Network File System CIS 238. NFS (Network File System) The most commercially successful and widely available remote file system protocol Designed and.
1 Network File System. 2 Network Services A Linux system starts some services at boot time and allow other services to be started up when necessary. These.
CMSC 691X – Summer 2002 Project By Pravin D’Souza.
Installing Samba Vicki Insixiengmay Jonathan Krieger.
1 COP 4343 Unix System Administration Unit 16: file server – samba.
UNIT - III. Installing Samba Windows uses Sever Message Block(SMB) to communicate with each other using sharing services like file and printer. Samba.
Linux Services Sirak Kaewjamnong. 2 Linux DHCP Server  DHCP is an IP address dynamically assigned from DHCP server.  PC client will most likely get.
VPN Plus Samba Making My Home Computing Environment Identical to My Work Computing Environment.
2440: 141 Web Site Administration Remote Web Server Access Tools Instructor: Enoch E. Damson.
Linux+ Guide to Linux Certification, Third Edition
Samba Objectives Contents Practical Summary
1 SAMBA. 2 Module - SAMBA ♦ Overview The presence of diverse machines in the network environment is natural. So their interoperability is critical. This.
Microsoft Windows 2003 Server. Client/Server Environment Many client computers connect to a server.
1 Web Server Administration Chapter 9 Extending the Web Environment.
NetFilter – IPtables Firewall –Series of rules to govern what Kind of access to allow on your system –Packet filtering –Drop or Accept packets NAT –Network.
1 Network File Sharing. 2 Module - Network File Sharing ♦ Overview This module focuses on configuring Network File System (NFS) for servers and clients.
1 COP 4343 Unix System Administration Unit 15: file server – ftp – nfs.
VsFTP in Linux. Introduction to FTP The File Transfer Protocol (FTP) is used as one of the most common means of copying files between servers over the.
Home Media Network Hard Drive Training for Update to 2.0 By Erik Collett Revised for Firmware Update.
SAMBA Integrating Linux and Window. What is Samba? Free suite of programs that enables flavors of UNIX to work with other operating systems such as OS/2.
Network Services CSCI N321 – System and Network Administration Copyright © 2000, 2007 by Scott Orr and the Trustees of Indiana University.
Tero Koskinen & Juuso Rintala.  First we decided which OS we´re operating with › CentOS was the most familiar to us  Then which services we´d like to.
SUSE Linux Enterprise Desktop Administration Chapter 12 Administer Printing.
Samba Advanced System Administration Course James Lwali University computing Centre Ltd, University of Dar es salaam,
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
1 INFO 321 Server Technologies II FTP Material adapted from Dr. Randy Kaplan.
Linux Services Muhammad Amer. 2 xinetd Programs  In computer networking, xinetd, the eXtended InterNET Daemon, is an open-source super-server daemon.
CIS Lesson 10 Printers. CIS Lesson 10.
Advanced Unix Chapter 14. Network Tools There are many, many network tools that come with a standard Linux installation. There are many, many network.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 13 FTP and Telnet.
Sys Admin Course NFS and SAMBA Fourie Joubert. Sys Admin Course NFS NFS is the Network File System It allows Linux systems to share a file system, or.
1 Linux Networking and Security Chapter 5. 2 Configuring File Sharing Services Configure an FTP server for anonymous or regular users Set up NFS file.
NFS Network File System. NFS (Network File System) Network file systems allow us to share files between users on different systems, often with different.
Windows-Linux Interconnection Campus-Booster ID : **XXXXX Copyright © SUPINFO. All rights reserved Samba.
General rules 1. Rule: 2. Rule: 3. Rule: 10. Rule: Ask questions ……………………. 11. Rule: I do not know your skill. If I tell you things you know, please stop.
Unit - III. Providing a Caching Proxy Server (1) A caching proxy server is software that stores (caches) frequently requested internet objects such as.
Linux Operations and Administration
VIRTUAL HOSTING WITH PureFTPd And MYSQL (Quota And Bandwidth Management) BY Odoh Kenneth Emeka Sun Yu Patrick Appiah.
FTP COMMANDS OBJECTIVES. General overview. Introduction to FTP server. Types of FTP users. FTP commands examples. FTP commands in action (example of use).
Unit – 5 FTP Server. FTP Introduction One of the oldest and most commonly used protocols The original specification for the File Transfer Protocol was.
PRESENTED BY ALI NASIR BITF13M040 AMMAR HAIDER BITF13M016 SHOIAB BAJWA BITF13M040 AKHTAR YOUNAS BITF13M019.
LINUX - SAMBA
Guide to Operating Systems, 5th Edition
Introduction to Operating Systems
COP 4343 Unix System Administration
Chapter 9 Router Configuration (Ospf, Rip) Webmin, usermin Team viewer
FTP Lecture supp.
Network Administration Module 09
Exercise 7 Samba.
LINUX ADMINISTRATION 1
Lab 1 introduction, debrief
IS3440 Linux Security Unit 6 Using Layered Security for Access Control
Network Services CSCI N321 – System and Network Administration
Network Services.
Setting Up Firewall using Netfilter and Iptables
Samba.
CUPS Print Services.
NFS.
COP 4343 Unix System Administration
LINUX SYSTEM ADMINISTRATION
CIT 470: Advanced Network and System Administration
Presentation transcript:

Ftp File and Print Server

What is samba Samba is a popular freeware program that allows end users to access and use files, printers, and other commonly shared resources on a company's intranet or on the Internet. Samba is often referred to as a network file system and can be installed on a variety of operating system platforms, including: Linux, most common UNIX platforms, OpenVMS, and OS/2.

General Samba Server Configuration yum install samba samba-commons cups-libs chkconfig smb on chkconfig nmb on service smb restart service nmb restart

Configure smb.conf file #============ Global Settings==================#   [global] workgroup = WORKGROUP Security = share #============ Share Definitions =================# [SambaShare] path = /samba/share valid users = @smbgrp guest ok = no writable = yes browsable = yes

Configure Samba Users useradd smbuser groupadd smbgrp Add the user to samba group usermod -a -G smbgrp smbuser smbpasswd -a smbuser

Create Share folder and Set Permissions for Samba Users cd /samba/ mkdir share chown -R smbuser:smbgrp share/ chmod -R 0770 share/ vi /etc/selinux/config SELINUX=disabled iptables -I INPUT 4 -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT iptables -I INPUT 5 -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT iptables -I INPUT 6 -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT service iptables save service smb restart service nmb restart

Samba swat Samba service can provides files haring and printing services to its clients. System administrator can install SWAT in order to configure samba and perform samba administration from the web browser. You just need to install xinetd together with samba-SWAT software. [root@samba ~]# yum install samba-swat xinetd -y

Add 192.168.0.0/24 network and enable swat by set ‘disable’ to ‘no’. # default: off # description: SWAT is the Samba Web Admin Tool. Use swat \ # to configure your Samba server. To use SWAT, \ # connect to port 901 with your favorite web browser. service swat { port = 901 socket_type = stream wait = no only_from = 127.0.0.1 192.168.0.0/16 user = root server = /usr/sbin/swat log_on_failure += USERID disable = no } 4. Start the xinetd service : [root@samba ~]# service xinetd start Access to [http://(server’s IP address):901] and enter root login password.

NFS Network File System (NFS) is a distributed file system protocol originally developed by Sun Microsystems in 1984, allowing a user on a client computer to access files over a computer network much like local storage is accessed.

NFS Server Configuration Install NFS in Server yum install nfs* -y /etc/init.d/nfs start chkconfig nfs on Install NFS in Client

Create shared directories in server [root@server ~]# mkdir /home/ostechnix [root@server ~]# chmod 755 /home/ostechnix/ Export shared directory on server [root@server ~]# vi /etc/exports /home/ostechnix 192.168.1.0/24(rw,sync,no_root_squash,no_all_squash) [root@server ~]# /etc/init.d/nfs restart

Mount shared directories in client [root@vpn client]# mkdir -p /nfs/shared [root@vpn client]# mount -t nfs 192.168.1.200:/home/ostechnix/ /nfs/shared/

[root@server ~]# vi /etc/sysconfig/nfs # # Define which protocol versions mountd  # will advertise. The values are "no" or "yes" # with yes being the default #MOUNTD_NFS_V2="no" #MOUNTD_NFS_V3="no" # # # Path to remote quota server. See rquotad(8) #RQUOTAD="/usr/sbin/rpc.rquotad" # Port rquotad should listen on. RQUOTAD_PORT=875 # Optinal options passed to rquotad #RPCRQUOTADOPTS="" # # # Optional arguments passed to in-kernel lockd #LOCKDARG= # TCP port rpc.lockd should listen on. LOCKD_TCPPORT=32803 # UDP port rpc.lockd should listen on. LOCKD_UDPPORT=32769 # # # Optional arguments passed to rpc.nfsd. See rpc.nfsd(8) # Turn off v2 and v3 protocol support #RPCNFSDARGS="-N 2 -N 3" # Turn off v4 protocol support #RPCNFSDARGS="-N 4" # Number of nfs server processes to be started. # The default is 8.  #RPCNFSDCOUNT=8 # Stop the nfsd module from being pre-loaded #NFSD_MODULE="noload" # Set V4 grace period in seconds #NFSD_V4_GRACE=90 # # # # Optional arguments passed to rpc.mountd. See rpc.mountd(8) #RPCMOUNTDOPTS="" # Port rpc.mountd should listen on. MOUNTD_PORT=892 # # # Optional arguments passed to rpc.statd. See rpc.statd(8) #STATDARG="" # Port rpc.statd should listen on. STATD_PORT=662 # Outgoing port statd should used. The default is port # is random STATD_OUTGOING_PORT=2020 # Specify callout program  #STATD_HA_CALLOUT="/usr/local/bin/foo" # # # Optional arguments passed to rpc.idmapd. See rpc.idmapd(8) #RPCIDMAPDARGS="" # # Set to turn on Secure NFS mounts.  #SECURE_NFS="yes" # Optional arguments passed to rpc.gssd. See rpc.gssd(8) #RPCGSSDARGS="" # Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8) #RPCSVCGSSDARGS="" # # To enable RDMA support on the server by setting this to # the port the server should listen on #RDMA_PORT=20049Now restart the NFS service

[root@server ~]# vi /etc/sysconfig/iptables # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter -A INPUT -m state --state NEW -m udp -p udp --dport 2049 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT -A INPUT -m state --state NEW -m udp -p udp --dport 111 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 111 -j ACCEPT -A INPUT -m state --state NEW -m udp -p udp --dport 32769 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 32803 -j ACCEPT -A INPUT -m state --state NEW -m udp -p udp --dport 892 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 892 -j ACCEPT -A INPUT -m state --state NEW -m udp -p udp --dport 875 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 875 -j ACCEPT -A INPUT -m state --state NEW -m udp -p udp --dport 662 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 662 -j ACCEPT :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited COMMIT

root@server ~]# service iptables restart [root@vpn client]# mount -t nfs 192.168.1.200:/home/ostechnix/ /nfs/shared/ [root@vpn client]# mount [root@vpn shared]# mkdir test [root@vpn shared]# touch file1 file2 file3 [root@server ~]# cd /home/ostechnix/ [root@server ostechnix]# ls file1  file2  file3  test [root@server ostechnix]#

Cups Configuration Basic CUPS (formerly an acronym for Common UNIX Printing System) is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server. A computer running CUPS is a host that can accept print jobs from client computers, process them, and send them to the appropriate printer.

Install Cups [root@dlp ~]# vi /etc/cups/cupsd.conf # line 18: change Listen 631 # line 31: add access permition <Location />    Order allow,deny    Allow 10.0.0.0/24 </Location>

# line 37: add access permition <Location /admin>    Order allow,deny    Allow 10.0.0.0/24 </Location> # line 43: add access permition <Location /admin/conf>    AuthType Default    Require user @SYSTEM    Order allow,deny    Allow 10.0.0.0/24 # add at the last: specify certificates ServerCertificate /etc/pki/tls/certs/server.crt ServerKey /etc/pki/tls/certs/server.key [root@dlp ~]# /etc/rc.d/init.d/cups start  Starting cups: [ OK ] [root@dlp ~]# chkconfig cups on 

Access to "https://(your server's hostname or IP address):631/" with web browser and Click "Adminstration"-"Add Printer".

FTP Principle The File Transfer Protocol (FTP) is a standard network protocol used for the transfer of computer files from a server to a client using the Client–server model on a computer network.

Configuration of FTP Server [root@www ~]# yum -y install vsftpd [root@www ~]# vi /etc/vsftpd/vsftpd.conf # line 12: no anonymous anonymous_enable=NO # line 81,82: uncomment ( allow ascii mode ) ascii_upload_enable=YES ascii_download_enable=YES # line 96,97: uncomment ( enable chroot ) chroot_local_user=YES chroot_list_enable=YES # line 99: uncomment ( specify chroot list ) chroot_list_file=/etc/vsftpd/chroot_list # line 105: uncomment ls_recurse_enable=YES # add follows to the end # specify root directory ( if don't specify, users' home directory become FTP home directory) local_root=public_html # use localtime use_localtime=YES

[root@www ~]# vi /etc/vsftpd/chroot_list # add users who are not applied with chroot cent [root@www ~]# /etc/rc.d/init.d/vsftpd start  Starting vsftpd for vsftpd: [  OK  ] [root@www ~]# chkconfig vsftpd on Open the port 21 from firewall Use filezilla to transfer file