Anda di halaman 1dari 43

Firewall Fi ll

Pengertian Firewall
Firewall adalah sebuah software atau hardware atau kombinasi keduanya maupun sistem itu sendiri untuk mencegah akses yang tidak berhak ke suatu jaringan sehingga ada suatu mekanisme yang bertujuan untuk melindungi, melindungi baik dengan menyaring, membatasi atau menyaring bahkan menolak suatu hubungan/kegiatan (dari luar dari kedalam atau dari dalam ke luar suatu segmen pada luar) jaringan pribadi dengan jaringan luar yang bukan l ar ang b kan merupakan ruang lingkupnya berdasarkan aturanaturan yang ditetapkan. Segmen tersebut dapat merupakan sebuah jaringan workstation, server,router, atau local area network (LAN) maupun wireless.
2

Konsep Firewall

Tujuan untuk melindungi, dengan : j g, g


Menyaring membatasi menolak

hubungan /kegiatan suatu segmen pada jaringan pribadi dengan jaringan luar yang bukan merupakan ruang lingkupnya

Segmen tersebut dapat merupakan sebuah workstation, server, router, atau local area network (LAN) anda

Konfigurasi Sederhana
p (jaringan local) <==> firewall <==> internet (j pc (j g ) (jaringan lain) g )

Boleh lewat mbak ? Nih surat-suratnya Anak kecil ga boleh keluar.. sudah malam

Firewall

Karakteristik Firewall

Seluruh hubungan/kegiatan dari dalam ke luar , harus melewati fi h l ti firewall. ll

Hal ini dapat dilakukan dengan cara memblok/membatasi baik secara fisik semua akses terhadap jaringan Lokal, kecuali melewati firewall Banyak sekali bentuk jaringan firewall. yang memungkinkan.

Hanya Kegiatan yang terdaftar/dikenal yang dapat melewati/melakukan hubungan, g

hal ini dapat dilakukan dengan mengatur policy pada konfigurasi keamanan lokal. Banyak sekali jenis firewall yang dapat dipilih sekaligus berbagai jenis policy yang ditawarkan.

Firewall itu sendiri haruslah kebal atau relatif kuat terhadap serangan/kelemahan.

hal ini berarti penggunaan sistem y g dapat dipercaya dan p gg yang p p y dengan Operating system yang relatif aman.
5

Teknik Yang Digunakan

Service control (kendali terhadap layanan)

berdasarkan tipe-tipe layanan yang digunakan di Internet dan boleh diakses baik untuk kedalam ataupun keluar firewall. Biasanya firewall akan mencek no IP Address dan juga nomor p y g di j g port yang gunakan baik pada protokol TCP dan UDP, bahkan bisa dilengkapi software untuk proxy yang akan menerima dan menterjemahkan setiap permintaan akan suatu layanan sebelum mengijinkannya.Bahkan bisa jadi software pada server itu sendiri , seperti layanan untuk web ataupun untuk mail mail. berdasarkan arah dari berbagai permintaan (request) terhadap layanan yang akan dikenali dan diijinkan melewati firewall. berdasarkan pengguna/user untuk dapat menjalankan suatu layanan, artinya ada user yang dapat dan ada yang tidak dapat menjalankan suatu servis,hal ini di karenakan user tersebut tidak di ijinkan iji k untuk melewati fi k l i firewall. Bi ll Biasanya di digunakan untuk k k membatasi user dari jaringan lokal untuk mengakses keluar, tetapi bisa juga diterapkan untuk membatasi terhadap pengguna dari luar. berdasarkan seberapa banyak layanan itu telah digunakan. Misal, firewall dapat memfilter email untuk menanggulangi/mencegah spam.

Direction Control (kendali terhadap arah)

User control (kendali terhadap pengguna)

Behavior Control (kendali terhadap perlakuan)

Tipe Firewall

Rule Based Packet Filtering


Static St ti Stateful

Application Level

Rules Based Firewall


Firewalls rules are created to match policy p y Rules are based on:

Routing based filters (Who siapa)


Sender and Destination berasal dari mana ? Mau ke mana ? Tidak peduli mau ngapain di sana TCP/IP Port numbers and Services Apa yang akan kamu lakukan di sana ? Tidak semudah yang nomer 1, sebab kadang-kadang p g bisa ditipu seorang client
8

Content based filters (What mau apa)


Dua pendekatan aturan

Default allow

Mengijinkan semua lewat kecuali yang terdaftar Place roadblocks/watch gates along a wide open road. Semua dilarang lewat kecuali yang terdaftar Build a wall and carve paths for everyone you like.

Default deny

Packet Filtering

Packet Filtering diaplikasikan dengan cara mengatur semua packet IP b ik yang menuju, melewati atau k t baik j l ti t akan dituju oleh packet tersebut. pada tipe ini packet tersebut akan diatur apakah akan di t i k terima d dit dan diteruskan , atau di t l k k t tolak. penyaringan packet ini di konfigurasikan untuk menyaring packet yang akan di transfer secara dua arah (baik dari atau ke jaringan lokal) lokal). Biasa dikenal sebagai packet inspection

Examines IP, TCP, UDP, and ICMP headers and port number

Static packet inspection Stateful inspection

10

Static Packet Filter Firewall


Corporate Network Permit (Pass) IP-H IP-H Deny (Drop) IP-H IP H The Internet TCP-H Application Message UDP-H Application Message ICMP-H ICMP H ICMP Message

Log File

Static Packet Filter Firewall Fi ll

Only IP, TCP, UDP and ICMP Headers Examined

11

Static Packet Filter Firewall


Corporate Network Permit (Pass) IP-H IP-H Deny (Drop) IP-H IP H The Internet TCP-H Application Message UDP-H Application Message ICMP-H ICMP H ICMP Message

Log File

Static Packet Filter Firewall Fi ll

Arriving Packets Examined One at a Time, in Isolation; This Misses Many Arracks
12

New Stateful Inspection Firewalls

Default Behavior Permit connections initiated by an internal host Deny connections initiated by an external host y y Can change default behavior with ACL

Automatically Accept Connection Attempt Router Internet

Automatically Deny A tomaticall Den Connection Attempt


13

Stateful Inspection Firewalls

State of Connection: Open or Closed


State: Order of packet within a dialog Often simply whether the packet is part of an open connection

14

Stateful Inspection Firewalls

Stateful Firewall Operation


If accept a connection connection Record the two IP addresses and port numbers in state table as OK (open) Accept future packets between these hosts and ports with no further inspection

This can miss some attacks, but it catches almost everything except attacks based on application message content
15

Stateful Inspection Firewall Operation I O ti


1. TCP SYN Segment From: 60.55.33.12:62600 To: 123.80.5.34:80 2. Establish Connection 3. TCP SYN Segment From: 60.55.33.12:62600 To: 123.80.5.34:80

Note: Outgoing Stateful Internal Connections Firewall Client PC Allowed By 60.55.33.12 Default Connection Table Type TCP Internal IP 60.55.33.12 Internal Port 62600 External IP 123.80.5.34

External Webserver 123.80.5.34 External Status Port 80 OK


16

Stateful Inspection Firewall Operation I O ti


Stateful Firewall 6. Internal TCP SYN/ACK Segment Client PC From: 123.80.5.34:80 60.55.33.12 To: 60.55.33.12:62600 4. TCP SYN/ACK Segment External From: 123.80.5.34:80 Webserver To: 60.55.33.12:62600123.80.5.34

Connection Table Type TCP Internal IP 60.55.33.12

5. Check Connection OK; Pass the Packet External IP 123.80.5.34

Internal Port 62600

External Status Port 80 OK


17

Stateful Inspection Firewalls

Stateful Firewall Operation

For UDP, also record two IP addresses and UDP port numbers in the state table
Internal IP 60.55.33.12 60.55.33.12 Internal Port 62600 63206 External IP 123.80.5.34 1.8.33.4 External Status Port 80 69 OK OK
18

Connection T bl C ti Table Type TCP UDP

PACKET FILTERING
Contohnya: packet bertujuan ke server kita menggunakan IP 202.159.121.38 dengan port 80 (atribut yang dimiliki paket tsb) An bb i t d A abbreviated packet k t Source SrcPort Destination DestPort 204.210.251.1 8104 128.146.2.205 31337 A Cisco packet filter access-list 2640 deny any 128.146.2.0 0.0.0.255 gt 1023

19

Packet Filtering Example (1)


1. If source IP address = 10.*.*.*, DENY [private IP address range] 2. 2 If source IP address = 172 16 * * to 172 31 * * DENY [ i t IP dd 172.16.*.* 172.31.*.*, [private address range] 3. If source IP address = 192.168.*.*, DENY [private IP address g ] range] 4. If source IP address = 60.40.*.*, DENY [firms internal address range] 5. 5 If source IP address = 1 2 3 4 DENY [black-holed address of 1.2.3.4, [black holed attacker] 6. If TCP SYN=1 AND FIN=1, DENY [crafted attack packet] 7. If destination IP address = 60.47.3.9 AND TCP destination port=80 OR 443, PASS [connection to a public webserver] 8. 8 If TCP SYN 1 AND ACK=0 DENY [attempt to open a SYN=1 ACK 0, connection from the outside]
20

Packet Filtering Example (1)


9. If TCP destination port = 20, DENY [FTP data connection] 10. 10 If TCP destination port = 21, DENY [FTP supervisory control d i i 21 i t l connection] 11. If TCP destination port = 23, DENY [Telnet data connection] 12. 12 If TCP destination port = 135 through 139, DENY [NetBIOS 139 connection for clients] 13. If TCP destination port = 513, DENY [UNIX rlogin without password] 14. 14 If TCP destination port = 514, DENY [UNIX rsh l d ti ti t 514 h launch shell h h ll without login] 15. If TCP destination port = 22, DENY [SSH for secure login, but ] some versions are insecure] 16. If UDP destination port=69, DENY [Trivial File Transfer Protocol; no login necessary] 17. If ICMP Type = 0, PASS [allow incoming echo reply messages] DENY ALL 21

Packet Filtering Example (1)

DENY ALL

Last rule Drops any packets not specifically permitted by earlier rules In the previous ACL, Rules 8-17 are not needed; Deny all would catch them y

22

Packet Filtering Example (2)


1. If source IP address = 10.*.*.*, DENY [private IP address range] 2. If source IP address = 172.16.*.* to 172.31.*.*, DENY [private IP address range] 3. If source IP address = 192.168.*.*, DENY [private IP address , [p range] 4. If source IP address NOT = 60.47.*.*, DENY [not in internal address range] g ]
Rules 1-3 are not needed because of this rule

5. If ICMP Type = 8, PASS [allow outgoing echo messages] 6. If Protocol=ICMP, DENY [drop all other outgoing ICMP messages] 7. If TCP RST=1, DENY [do not allow outgoing resets; used in host 23 scanning]

Packet Filtering Example (2)


8. If source IP address = 60.47.3.9 and TCP source port = 80 OR 443, PERMIT [public webserver responses]
Needed because next rule stops all packets from well-known port numbers

9. If TCP source port=0 through 49151, DENY [well-known and registered ports] 10. If UDP source port=0 through 49151, DENY [well-known and registered ports] 11. If TCP source port =49152 through 65,536, PASS [allow outgoing client connections] 12. If UDP source port = 49152 through 65,536, PERMIT [allow p g [ outgoing client connections]
Note: Rules 9-12 only work if all hosts follow IETF rules for port assignments (well-known, registered, and ephemeral). Windows computers do. Unix computers do not

13. DENY ALL


No need for Rules 9-12

24

Packet Filtering

Kelebihan dari tipe ini adalah mudah untuk di p implementasikan, transparan untuk pemakai, lebih cepat Kelemahannya :

Cukup rumitnya untuk menyetting paket yang akan difilter secara tepat, serta lemah dalam hal authentikasi Mudah terjadi miskonfigurasi Sukar melakukan konfigurasi terhadap protokol yang dinamis Tidak dapat menangani content-based filtering (remove e-mail attachments, javascript, ActiveX)
25

Packet Filtering

Serangan yang mungkin terjadi

IP address spoofing :

intruder (penyusup) dari luar dapat melakukan ini dengan cara menyertakan/menggunakan ip address jaringan lokal yanbg j telah diijinkan untuk melalui firewall. tipe ini tidak menganalisa informasi routing sumber IP, sehingga memungkinkan untuk membypass firewall. intruder (penyusup) membagi IP kedalam bagian bagian (fragment) yang lebih kecil dan memaksa terbaginya informasi mengenai TCP header. Serangan jenis ini di design untuk menipu aturan penyaringan yang bergantung kepada informasi dari TCP header. penyerang berharap hanya bagian (fragment) pertama saja yang akan di periksa dan sisanya akan bisa lewat dengan bebas. Hal ini dapat di tanggulangi dengan cara menolak semua packet dengan protokol TCP dan d memiliki Off iliki Offset = 1 pada IP f d fragment (b i IP) (bagian
26

Source routing attacks :

Tiny Fragment attacks :

Aplication Level Gateway (Proxy Firewall) Fi ll)


Mekanismenya tidak hanya berdasarkan y y sumber, tujuan dan atribut paket, tetapi juga bisa mencapai isi paket tersebut

27

Application Level

Application-level Gateway yang biasa juga di kenal sebagai proxy server yang berfungsi untuk memperkuat/menyalurkan arus aplikasi. Tipe ini akan mengatur semua hubungan yang menggunakan layer aplikasi ,baik itu FTP, HTTP, GOPHER dll. Cara kerjanya adalah apabila ada pengguna yang menggunakan salah satu aplikasi semisal FTP untuk k l h t lik i i l t k mengakses secara remote, maka gateway akan meminta user memasukkan alamat remote host yang akan di akses.Saat pengguna mengirimkan USer ID serta informasi lainnya yang sesuai maka gateway akan melakukan h b i k t k l k k hubungan t h d terhadap aplikasi tersebut yang terdapat pada remote host, dan menyalurkan data diantara kedua titik. apabila data tersebut tidak sesuai maka firewall tidak akan meneruskan data tersebut atau menolaknya. Lebih j h l i pada ti t b t t l k L bih jauh lagi, d tipe i i ini Firewall dapat di konfigurasikan untuk hanya mendukung beberapa aplikasi saja dan menolak aplikasi lainnya untuk melewati firewall. Biasa dikenal Application Inspection

Examines application layer messages

28

Application Level

Kelebihannya :

Relatif lebih aman daripada tipe packet filtering router lebih mudah untuk memeriksa (audit) dan mendata (log) semua aliran data yang masuk pada level aplikasi. Tidak mengijinkan langsung koneksi antara internal dan eksternal host Can support authentication, classes of users Can allow/deny access based on content Can keep very detailed logs of activity (including the data portions of packets) Caching C hi pemrosesan tambahan yang berlebih pada setiap hubungan. yang akan mengakibatkan terdapat dua buah sambungan koneksi antara pemakai dan gateway, dimana gateway akan memeriksa dan meneruskan semua arus dari dua arah. Lebih lambat daripada packet filtering firewall p p g

Kekurangannya

Require additional hardware more hardware for more users slow hardware = slow service Some firewalls require special client configurations on the workstations. Some protocols may not be supported (AIM, RealAudio, Napster, H.323) Varies (AIM RealAudio Napster H 323) by vendor. Configuration can be complex Must configure proxy for each protocol

29

Architecture Firewall A hit t Fi ll

Home Firewall Architecture


PC Firewall Fi ll Always-On Connection Coaxial Cable Broadband Modem UTP Cord

Internet Service Provider

Home PC

Windows XP has an internal firewall Originally called the Internet Connection Firewall Disabled by default After Ser ice Pack 2 called the Windo s Firewall Service Windows Fire all Enabled by default
New

31

SOHO Firewall Router Architecture A hit t


Internet Service Provider I t t S i P id Ethernet Switch UTP Broadband Modem (DSL or Cable) UTP SOHO Router --Router DHCP Sever, NAT Firewall, and Firewall Limited Application Firewall UTP User PC

User PC

Many Man Access Ro ters Combine the Ro ter Routers Router and Ethernet Switch in a Single Box

User PC
32

Firewall Architecture for a Larger Firm with a Single Site L Fi ith Si l Sit
1. Screening Router 60.47.1.1 60 47 1 1 Last Rule=Permit All Internet 172.18.9.x Subnet 172 18 9 S b t Public Webserver W b 60.47.3.9 External DNS S Server 60.47.3.4

Marketing Client on 172.18.5.x Subnet

Accounting Server on 172.18.7.x Subnet

SMTP e ay Relay Proxy 60.47.3.10

HTTP Proxy Server 60.47.3.1

33

Setting Firewall

Using the DMZ (DeMilitarized zone) to DMZ your advantage Firewalls as Intrusion Detection devices Configure VPNs for management

34

DMZ Configuration

Separate area off the firewall p Different network segments may have different policies

Departments Service areas Public Services Internal Services

Usually a different subnet Commonly used to house Internet facing machines (i.e. Web Servers) Has its own firewall policy
35

DMZ Configuration

Place web servers in the DMZ network Only allow web ports (TCP ports 80 and 443)

internet
Firewall

Web Server 36

DMZ Configuration

Dont allow web servers access to your network Allow l All local network to manage web servers (SSH) l k b Dont allow servers to connect to the Internet Patching is not convenient
Mas ..yang merah gak boleh lewat lho

internet

Firewall

Web Server 37

DMZ Configuration
Jaringan L k l J i Lokal: Semua boleh menghubungi web(p server (port 80/443 PC-PC tertentu boleh menghubungi server lewat SSH (port 22) Server tidak boleh menghubungi jaringan lokal Internet: I t t Semua boleh menghubungi web(p server (port 80/443 Selain layanan web tidak diperkenankan Server tidak boleh jalan-jalan jalan jalan di internet

Firewall

Web Server

38

Firewall sebagai IDS


IDS = Intrusion Detection System Collect log information from the deny rules Find Portscanning, hacking attempts, etc t Isolate traffic with deny rules helps cut down the information overload
39

Firewall sebagai IDS


What to do with ALL that data data..Graph Graph It! Shows trends what people are looking trends, for

Helps i iti H l prioritize security t k it tasks

Occasionally you may want to block portscans


40

Firewall sebagai IDS


Pay close attention to traffic leaving DMZ Often the first sign of a compromise Low traffic rules, so logs arent as enormous Email is nice, provided youre the only one reading it
41

VPN

VPN = Virtual Private Network VPN is far more secure than other management methods:

SSL and SSH are vulnerable to Man-InThe Middle Attacks Telnet and SNMP are clear text There are no known MIM attacks against Th k tt k i t IPSEC (Yet)
42

VPN

VPN clients are supported on most platforms Most firewalls will work with most clients Netscreen now officially supports FreeSwan F S Mac OS X is now supporting VPN

43

Anda mungkin juga menyukai