Konfigurasi Cisco Secure PIX Firewall & 2 Cisco Router

KONFIGURASI:
Konfigurasi yang ditampilkan pertama kali disini adalah PIX Firewall karena konfigurasi router harus sudah mengerti sebelumnya dalam hubungannya dengan Firewall.

PIX Firewall
!— Sets the outside address of the PIX Firewall:
ip address outside 131.1.23.2

!— Sets the inside address of the PIX Firewall:
ip address inside 10.10.254.1

!— Sets the global pool for hosts inside the firewall:
global (outside) 1 131.1.23.12-131.1.23.254

!— Allows hosts in the 10.0.0.0 network to be
!— translated through the PIX:

nat (inside) 1 10.0.0.0

!— Configures a static translation for an admin workstation
!— with local address 10.14.8.50:

static (inside,outside) 131.1.23.11 10.14.8.50

!— Allows syslog packets to pass through the PIX from RTRA.
!— You can use conduits OR access-lists to permit traffic.
!— Conduits has been added to show the use of the command,
!— however they are commented in the document, since the
!— recommendation is to use access-list.
!— To the admin workstation (syslog server):
!— Using conduit:
!— conduit permit udp host 131.1.23.11 eq 514 host 131.1.23.1

!— Using access-list:
Access-list 101 permit udp host 131.1.23.1 host 131.1.23.11 255.255.255.0 eq 514
Access-group 101 in interface outside

!— Permits incoming mail connections to 131.1.23.10:
static (inside, outside) 131.1.23.10 10.10.254.3

!— Using conduits
!— conduit permit TCP host 131.1.23.10 eq smtp any
!— Using Access-lists, we use access-list 101
!— which is already applied to interface outside.
Access-list 101 permit tcp any host 131.1.23.10 eq smtp

!— PIX needs static routes or the use of routing protocols
!— to know about networks not directly connected.
!— Add a route to network 10.14.8.x/24.
route inside 10.14.8.0 255.255.255.0 10.10.254.2

!— Add a default route to the rest of the traffic
!— that goes to the internet.
Route outside 0.0.0.0 0.0.0.0 131.1.23.1

!— Enables the Mail Guard feature
!— to accept only seven SMTP commands
!— HELO, MAIL, RCPT, DATA, RSET, NOOP, and QUIT:
!— (This can be turned off to permit ESMTP by negating with
!— the no fixup protocol smtp 25 command):

fixup protocol smtp 25

!— Allows Telnet from the inside workstation at 10.14.8.50
!— into the inside interface of the PIX:

telnet 10.14.8.50

!— Turns on logging:
logging on

!— Turns on the logging facility 20:
logging facility 20

!— Turns on logging level 7:
logging history 7

!— Turns on the logging on the inside interface:
logging host inside 10.14.8.50

Catatan: RTRA adalah router pertahanan luar. RTRA harus melindungi PIX Firewall dari serangan secara langsung, melindungi server FTP/HTTP, dan berfungsi sebagai sebuah alarm system. Jika seseorang masuk ke RTRA, system administrator akan tahu seketika.

RTRA
no service tcp small-servers
!— Prevents some attacks against the router itself.
logging trap debugging

!— Forces the router to send a message
!— to the syslog server for each and every
!— event on the router. This includes packets denied
!— access through access lists and
!— configuration changes. This acts as an early warning system to the system
!— administrator that someone is trying to break in, or has broken in and is
!— trying to create a “hole” in their firewall.
logging 131.1.23.11

!— The router logs all events to this
!— host, which in this case is the
!— “outside” or “translated” address of the system
!— administrator’s workstation.

enable secret xxxxxxxxxxx
!
interface Ethernet 0
ip address 131.1.23.1 255.255.255.0
!
interface Serial 0
ip unnumbered ethernet 0
ip access-group 110 in

!— Shields the PIX Firewall and the HTTP/FTP
!— server from attacks and guards
!— against spoofing attacks.

!
access-list 110 deny ip 131.1.23.0 0.0.0.255 any log

!— RTRA and the PIX Firewall.
!— This is to prevent spoofing attacks.

access-list 110 deny ip any host 131.1.23.2 log

!— Prevents direct attacks against the
!— outside interface of the PIX Firewall and
!— logs any attempts to connect to the
!— outside interface of the PIX to the syslog server.

access-list 110 permit tcp any 131.1.23.0 0.0.0.255 established

!— Permits packets which are part
!— of an established TCP session.

access-list 110 permit tcp any host 131.1.23.3 eq ftp

!— Allows FTP connections into the FTP/HTTP server.

access-list 110 permit tcp any host 131.1.23.3 eq ftp-data

!— Allows ftp-data connections into the FTP/HTTP server.
access-list 110 permit tcp any host 131.1.23.3 eq www

!— Allows HTTP connections into the FTP/HTTP server.
access-list 110 deny ip any host 131.1.23.3 log

!— Disallows all other connections to
!— the FTP/HTTP server, and logs any attempt
!— to connect this server to the syslog server.

access-list 110 permit ip any 131.1.23.0 0.0.0.255

!— Permits other traffic destined to the
!— network between the PIX Firewall and RTRA.

!
line vty 0 4
login
password xxxxxxxxxx
access-class 10 in

!— Restricts Telnet access to the router
!— to those IP addresses listed in
!— access list 10.

!
access-list 10 permit ip 131.1.23.11

!— Permits only the workstation of the administrator
!— to Telnet into the router. This
!— access list may need to be changed to permit
!— access from the Internet for
!— maintenance, but should contain as few
!— entries as possible.

Catatan: RTRB adalah router pertahanan bagian dalam. RTRB adalah garis pertahanan terakhir dalam firewall anda, dan merupakan pintu masuk ke dalam jaringan internal anda.

RTRB
logging trap debugging
logging 10.14.8.50

!— Log all activity on this router to the
!— syslog server on the administrator’s
!— workstation, including configuration changes.

!
interface Ethernet 0
ip address 10.10.254.2 255.255.255.0
no ip proxy-arp
ip access-group 110 in

!— Prevents inside and outside addresses
!— from mingling; guards against attacks
!— launched from the PIX Firewall or the
!— SMTP server as much as possible.

!
access-list 110 permit udp host 10.10.250.5 0.0.0.255

!— Permits syslog messages destined
!— to the administrator’s workstation.

access-list 110 deny ip host 10.10.254.1 any log

!— Denies any other packets sourced
!— from the PIX Firewall.

access-list 110 permit tcp host 10.10.254.3 10.0.0.0 0.255.255.255 eq smtp

!— Permits SMTP mail connections from the
!— mail host to internal mail servers.

access-list 110 deny ip host 10.10.254.3 10.0.0.0 0.255.255.255

!— Denies all other traffic sourced
!— from the mail server.

access-list 110 deny ip 10.10.250.0 0.0.0.255 any

!— Prevents spoofing of trusted addresses
!— on the internal network.

access-list 110 permit ip 10.10.254.0 0.0.0.255 10.10.250.0 0.255.255.255

!— Permits all other traffic sourced from
!— the network between the PIX Firewall and RTRB.

!
line vty 0 4
login
password xxxxxxxxxx
access-class 10 in

!— Restricts Telnet access to the router
!— to those IP addresses listed in
!— access list 10.

!
access-list 10 permit ip 10.14.8.50

!— Permits only the workstation of the administrator
!— to Telnet into the router. This
!— access list may need to be changed to permit
!— access from the Internet for
!— maintenance, but should contain as few entries as possible.
!— A static route or routing protocol must be utilized
!— to make the router aware of network 10.14.8.x (which is
!— inside the corporate network). This is because
!— it is not a directly connected network.

KONSEP
Tujuan dari Firewall adalah untuk mencegah masuknya trafik yang tidak diinginkan (unauthorized/illegal) ke dalam jaringan anda bersamaan dengan trafik yang anda inginkan (authorized/legal). Hal ini akan menjadi lebih mudah dimulai dengan menganalisa dan membreakdown objek objek yang penting kemudian mempertimbangkan bagaimana membuat pertahanan dari kriminal/hacker yang selalu mengintai untuk memasuki jaringan anda. Misal seorang kriminal mengincar server anda yang berisi informasi penting dan bisa dijual ke kompetitor anda. Dia mulai mempelajari server anda, misal alamat server anda 10.10.250.100
Sang kriminal menemukan beberapa masalah serius: alamat IP server anda tidak bisa dicapai melalui Internet, jadi tidak ada satupun organisasi yang mengirimkan paket ke alamat network 10. Hal ini menyebabkan sang kriminal mencari tahu alamat ip berapa yang digunakan untuk mentranslate ip ini ke internet. Asumsikan bahwa sang kriminal tidak dapat menemukan cara untuk memasuki/menyerang server anda secara langsung dari internet, kemudian mencari akal dengan jalan masuk ke jaringan dan menyerang server dari dalam jaringan anda.
Rintangan pertama yang ditemuinya adalah “demilitarized zone” (DMZ), pada diagram diatas adalah antara RTRA dan PIX Firewall. Sang kriminal mencoba melewati/memasuki RTRA, tetapi router telah dikonfigurasi hanya menerima koneksi dari workstation sang admin, dan memblock paket yang berasal dari DMZ itu sendiri. Jika sang kriminal bisa masuk ke RTRA, dia hanya menemukan bahwa dirinya sedang berhadapan dengan PIX Firewal itu sendiri – dia tidak akan bisa masuk ke jaringan anda, dan dia tetap tidak bisa menyerang/masuk ke host/server anda.
Sang kriminal bisa mencoba dengan mematahkan FTP/HTTP server, yang memiliki satu kemungkinan untuk dicoba. Host ini harus benar-benar aman dari jenis serangan seperti ini. Jika sang kriminal bisa mematahkan FTP/HTTP dan masuk ke server, dia masih belum berada pada posisi untuk menyerang server secara langsung yang meiliki data-data sensitive, tapi dia berada pada posisi bisa menyerang PIX Firewall secara langsung. Dalam kasus ini, segala aktivitas kriminal seharusnya di LOG (menyimpan syslog pada server) oleh sang admin, sehingga bisa memberikan peringatan/alert akan keberadaan seorang penyusup/kriminal.
Jika attacker (sang kriminal) sukses mematahkan outer DMZ, kurang lebih dia sudah berada pada posisi untuk menyerang PIX Firewall, jadi target selanjutnya adalah inner DMZ. Dia bisa mencapai inner DMZ dengan menyerang PIX Firewall atau menyerang RTRB, yang telah diprogram hanya menerima Telnet session dari PC sang admin saja. Sekali lagi, usaha attacker tsb utk mematahkan inner DMZ telah di LOG baik di PIX Firewall maupun di RTRB, jadi system administrator seharusnya menerima beberapa pesan peringatan “Warning” dan bisa menghentikan serangan sebelum attacker bisa masuk ke titik rawan / server yang berisi data-data sensitive.
Konsepnya adalah buatlah pertahanan berlapis lapis bukan satu “super strong” firewall. Masing-masing bagian saling terhubung satu sama lain menjadi sebuah struktur Firewall yang sangat kuat, cukup flexible untuk melewatkan trafik yang anda inginkan, dan juga memiliki system alert/peringatan (alarms & early warning systems).

Sumber : http://mudji.net/press/?p=253

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: