Basic Linux Desktop Security © Konrad Rosenbaum this presentation is protected by the GNU General Public License version 2 or any newer.

Slides:



Advertisements
Similar presentations
IUT– Network Security Course 1 Network Security Firewalls.
Advertisements

Ipchains and Iptables Linux operating system natively supports packet-filtering rules: Kernel versions 2.2 and earlier support the ipchains command. Kernel.
Cosc 4765 Network Security: Routers, Firewall, filtering, NAT, and VPN.
Firewalls and Intrusion Detection Systems
Securing Network using Linux. Lesson Outline Setting up a secure system TCP Wrapper configuration Firewalls in Linux Authentication Systems –NIS –Kerberos.
1 Some TCP/IP Basics....NFSDNSTELNETSMTPFTP UDPTCP IP and ICMP Ethernet, serial line,..etc. Application Layer Transport Layer Network Layer Low-level &
Firewalls: General Principles & Configuration (in Linux)
Firewalls Marin Stamov. Introduction Technological barrier designed to prevent unauthorized or unwanted communications between computer networks or hosts.
FIREWALL TECHNOLOGIES Tahani al jehani. Firewall benefits  A firewall functions as a choke point – all traffic in and out must pass through this single.
CS426Fall 2010/Lecture 361 Computer Security CS 426 Lecture 36 Perimeter Defense and Firewalls.
1 Figure 5-4: Drivers of Performance Requirements: Traffic Volume and Complexity of Filtering Performance Requirements Traffic Volume (Packets per Second)
FIREWALL Mạng máy tính nâng cao-V1.
IPTables Tips and Tricks: More Than Just ACCEPT and DROP
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.
07/11/ L10/1/63 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: voice.
Karlstad University Introduction to Vulnerability Assessment Labs Ge Zhang Dvg-C03.
SCSC 455 Computer Security Network Security. Control access to system Access control mechanisms in specific network programs  e.g. 1, wu-FTP server support.
Firewalls A device that screens incoming and outgoing network traffic and allows or disallows traffic based on a set of rules The “device” –Needs at least.
NETWORK SECURITY USING IPTABLES. TOPICS OF DISCUSSION NETWORK TRAFFIC IN PRESENT SCENARIO !! WHY WE NEED SECURITY ? T TYPE OF ATTACKS & WAYS TO TACKLE.
Firewalling With Netfilter/Iptables. What Is Netfilter/Iptables? Improved successor to ipchains available in linux kernel 2.4/2.6. Netfilter is a set.
IPtables Objectives Contents Practicals Summary
Advanced Unix Chapter 14. Network Tools There are many, many network tools that come with a standard Linux installation. There are many, many network.
Firewall Tutorial Hyukjae Jang Nc lab, CS dept, Kaist.
Le firewall Technofutur. Table des matières Schémas du réseau Routage sans VPN Routage avec VPN Le NAT Le firewall.
1 Quick Overview Overview Network –IPTables –Snort Intrusion Detection –Tripwire –AIDE –Samhain Monitoring & Configuration –Beltaine –Lemon –Prelude Conclusions.
CSN09101 Networked Services Week 6 : Firewalls + Security Module Leader: Dr Gordon Russell Lecturers: G. Russell.
Firewalls & Network Monitoring Advanced Registry Operations Curriculum.
1 Firewalls. ECE Internetwork Security 2 Overview Background General Firewall setup Iptables Introduction Iptables commands “Limit” Function Explanation.
Firewalls Group 11Group 12 Bryan Chapman Richard Dillard Rohan Bansal Huang Chen Peijie Shen.
CITA 310 Section 9 Securing the Web Environment (Textbook Chapter 10)
Chapter 8 Network Security Thanks and enjoy! JFK/KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking:
Firewall C. Edward Chow CS691 – Chapter 26.3 of Matt Bishop Linux Iptables Tutorial by Oskar Andreasson.
Web Server Administration Chapter 10 Securing the Web Environment.
Introduction to Linux Firewall
Firewalls Chien-Chung Shen The Need for Firewalls Internet connectivity is essential –however it creates a threat (from the network) vs.
LINUX® Netfilter The Linux Firewall Engine. Overview LINUX® Netfilter is a firewall engine built into the Linux kernel Sometimes called “iptables” for.
1 CNLab/University of Ulsan Chapter 19 Firewalls  Packet Filtering Firewall  Application Gateway Firewall  Firewall Architecture.
Chapter 8.  Upon completion of this chapter, you should be able to:  Understand the purpose of a firewall  Name two types of firewalls  Identify common.
Linux Firewall Iptables.
Routing with Linux 'cause you really love the command line
防火牆 Firewall All rights reserved. No part of this publication and file may be reproduced, stored in a retrieval system, or transmitted in any form or.
Polytechnic University Firewall and Trusted Systems Presented by, Lekshmi. V. S cos
Introduction to Vulnerability Assessment Labs Ge Zhang Dvg-C03.
Securing your network But still be able to access it Hugh Mahon.
Firewalls. A Firewall is: a) Device that interconnects two networks b) Network device that regulates the access to an internal network c) Program that.
Common System Exploits Tom Chothia Computer Security, Lecture 17.
Firewalls Dr. X (Derived from slides by Prof. William Enck, NCSU)
FIREWALL configuration in linux
Securing services in a unix-based environment
The Linux Operating System
Firewalls.
Securing services in a unix-based environment
Firewall – Survey Purpose of a Firewall Characteristic of a firewall
Network and System Security Risk Assessment
Packet Filtering Dick Steflik.
CIT 480: Securing Computer Systems
Introduction to Networking
Guide to Computer Network Security
Firewalls Purpose of a Firewall Characteristic of a firewall
Lab 7 - Topics Establishing SSH Connection Install SSH Configure SSH
Setting Up Firewall using Netfilter and Iptables
OPS235: Configuring a Network Using Virtual Machines – Part 2
Firewalls By conventional definition, a firewall is a partition made
دیواره ی آتش.
Firewalls.
Firewalls Chapter 8.
From ACCEPT to MASQUERADE Tim(othy) Clark (eclipse)
Session 20 INST 346 Technologies, Infrastructure and Architecture
Presentation transcript:

Basic Linux Desktop Security © Konrad Rosenbaum this presentation is protected by the GNU General Public License version 2 or any newer

Think Security: 5Q 1) What is the problem? 2) What is the proposed solution? 3) What is the cost? 4) Is it effective? 5) What are the collateral damages? ➔ Worth it? (from: Schneier “Beyond Fear”)

Think Security: SPoF ● Never design a single point of failure! ● Design as layers of security. System

Think Security: Trust? ● Design a threat model: – What are you concerned about? – What components/people do you trust? – How far do you trust them? – With what do you trust them? – Are you sure?

Distribution ● Chose a “distribution” that is designed for what you want to do. ●...one you can trust. ● Find its security mail list. – eg. Debian: debian-security-announce (AT) lists.debian.org ● Find out how things are done with it. ● Keep updating! (at least once/week)

Passwords ● Chose secure passwords: – mix upper-/lower-case letters, special characters and digits – don't use words from any dictionary – make it long enough (about 8 characters) – eg. use a sentence that you can remember, use the first letter of each word, replace some letters by digits ● Remember: Passwords are unsafe.

Get rid of Junk ● Shutdown/uninstall anything you don't need. – Do you need CUPS? (printer?) – Do you need Apache? (is this a web-server?) – Do you really need FTP? – Do you really need five different databases? – Do you need GCC? (Are you a developer?)

Configure Securely ● Default config is often insecure. ● Don't allow open mail relay. ● Don't allow open web proxies. ● SSH: – Don't open it to outside network if not necessary. – Don't use password-authentication.

Restrict Users ● NEVER WORK AS ROOT!!! ● Don't give users rights they don't need. ● Don't give anyone your password. There is no excuse! No Admin will ever need it! ● Use different passwords on different systems. (Or groups of systems.)

Firewalls ● Every system has a right to its own firewall! ● Never connect an unprotected system to any network. ● Make the firewall as tight as possible. – Opening up later is easier than cleaning up an incident. ● Whenever possible: block both directions. ● Don't forget IPv6!

Random Thoughts ● Alteration Detection: Tripwire ● Intrusion Detection: Snort ● Rootkit Scanner: Tiger ● etc.pp.

IP-Tables ● Tables: – filter - the actual firewall part – nat - network address translation ● filter chains – INPUT, FORWARD, OUTPUT ● nat chains – PREROUTING, POSTROUTING, OUTPUT

IP-Tables: filtering ● Use tools: iptables-save/-restore ● Policy: DROP/REJECT ● Divide Traffic per Interface. *filter :INPUT DROP :FORWARD DROP :OUTPUT DROP :netw - :netout - :rootout - #Incoming Traffic #accept loopback: -A INPUT -i lo -j ACCEPT #filter all others -A INPUT -j netw #paranoid droppings: -A INPUT -j DROP #This is not a router: -A FORWARD -j DROP #Outgoing Traffic #accept loopback -A OUTPUT -o lo -j ACCEPT #filter all others -A OUTPUT -j netout #reject remainder -A OUTPUT -j REJECT

IP-Tables: INPUT ● Accept what you requested. ● Accept legitimate users. ● Reject everything else. #accept ICMP -A netw -p icmp -j ACCEPT # accept DNS (see query_source in /etc/bin/named.conf) -A netw -p udp -m udp --sport 53 -j ACCEPT -A netw -p tcp -m tcp --sport 53 -j ACCEPT # XNTP -A netw -p udp -m udp --dport 123 -j ACCEPT # accept SSH -A netw -p tcp -m tcp --dport 22 -j ACCEPT # accept TCP when established from local ## filter SYN -A netw -p tcp -m tcp --syn -j DROP ## accept TCP above 1024 (denies communication with priv. ports) -A netw -p tcp -m tcp --dport 1024: -j ACCEPT

IP-Tables: OUTPUT ● Allow desired services. ● Allow some users. ● Reject everything else. #Allow ICMP -A netout -p icmp -j ACCEPT #Allow DNS in both directions -A netout -p tcp -m tcp --dport 53 -j ACCEPT -A netout -p udp -m udp --dport 53 -j ACCEPT #Allow XNTP -A netout -p udp -m udp --sport 123 -j ACCEPT ##Owner exceptions #root -A netout -p tcp -m owner --uid-owner 0 -j rootout ##Filter TCP SYN -A netout -p tcp -m tcp --syn -j REJECT #allow remainder (established) of TCP -A netout -p tcp -m tcp -j ACCEPT ##Filter all UDP -A netout -p udp -m udp -j REJECT

IP-Tables: users ● Allow only needed services. ● Prevents broken systems from doing more harm. ### Root (apt-get) #update.pureserver.info: -A rootout -p tcp -m tcp -d dport 80 -j ACCEPT #security.debian.org -A rootout -p tcp -m tcp -d dport 80 -j ACCEPT -A rootout -p tcp -m tcp -d dport 80 -j ACCEPT -A rootout -p tcp -m tcp -d dport 80 -j ACCEPT

IP-Tables: chain-design ● Policy: don't allow anything. ● Start at bottom: reject everything. ● Move upwards: – allow wanted services – make exceptions – become more specific

? Questions?