Tekil Mesaj gösterimi
Alt 24 Aralık 2005, 16:44   #1
Caistlin
Guest
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Yüzdesi:(%)
Dedicated/Co-Location/VPS sahiplerinin dikkatine..




Distributed Denial of Services (ddos) ataklara karsi ne kadar korunabiliyoruz. Yapilmasi gerekenler nelerdir. Bu baslik altina toplayalim.
Herseyi Datacenter in aldigi guvenlik onlemlerine birakmak yanlis olur. Kendimiz Firewall yollar bulmaliyiz. oncelikle.
Mod_security ve MOD_DOSEVASIVE dosyalarini yukleyip aktiflestirin. Bunu cogumuz biliriz. Benim asil değinmek istedigim baska bir yol var.

(Advanced Policy Firewall)? APF Firewall

Kurulumunu adim adim anlatayim.
root accessimiz olmasi gerekiyor.
ssh ye root ile login oluyoruz..

1. cd /root/downloads
2. wget [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]
3. tar -xvzf apf-current.tar.gz
4. cd apf*
5. ./install.sh

PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
Installing APF 0.9.5-1Completed.
Installation Details:
Install path: /etc/apf/
Config path: /etc/apf/conf.apf
Executable path
: /usr/local/sbin/apf
AntiDos install path
: /etc/apf/ad/
AntiDos config path: /etc/apf/ad/conf.antidos
DShield Client Parser
: /etc/apf/extras/dshield



Kod:   Kodu kopyalamak için üzerine çift tıklayın!
Other Details: Listening TCP ports: 1,21,22,25,53,80,110,111,143,443,465,993,995,2082,2083,2086,2087,2095,2096,3306 Listening UDP ports: 53,55880



Not : portlar otomatik olarak kurulumla birlikte hazir hale gelmiyor, Bizzat yazmaniz gerekiyor. manual.

6. pico /etc/apf/conf.apf
ozelligi aktif etmek icin
USE_DS="0"
degerini

USE_DS="1"
olarak ayarlayin.

7. Configuring Firewall Ports:

Cpanel sunucu

Common ingress (inbound) ports
# Common ingress (inbound) TCP ports -3000_3500 = passive port range for Pure FTPD
IG_TCP_CPORTS="21,22,25,53,80,110,143,443,2082,208 3, 2086,2087, 2095, 2096,3000_3500"
#
# Common ingress (inbound) UDP ports
IG_UDP_CPORTS="53"

outbound port (giden)
# Egress filter [0 = kapat / 1 = Ac ]
EGF="1"

# Common egress (outbound) TCP ports
EG_TCP_CPORTS="21,25,80,443,43,2089"
#
# Common egress (outbound) UDP ports
EG_UDP_CPORTS="20,21,53"


inbound port ( gelen )
# Common ingress (inbound) TCP ports
IG_TCP_CPORTS="21,22,25,53,80,110,143,443,19638"
#
# Common ingress (inbound) UDP ports
IG_UDP_CPORTS="53"

outbound port
# Egress filtering [0 = Disabled / 1 = Enabled]
EGF="1"

# Common egress (outbound) TCP ports
EG_TCP_CPORTS="21,25,80,443,43"
#
# Common egress (outbound) UDP ports
EG_UDP_CPORTS="20,21,53"

Değişiklikleri kaydet Ctrl+X sonra Y

8. firewalli baslatalim.


/usr/local/sbin/apf -s

Diğer Komutlar:
usage ./apf [OPTION]
-s|--start ......................... load firewall policies
-r|--restart ....................... flush & load firewall
-f|--flush|--stop .................. flush firewall
-l|--list .......................... list chain rules
-st|--status ....................... firewall status
-a HOST CMT|--allow HOST COMMENT ... add host (IP/FQDN) allow_hosts.rules

-d HOST CMT|--deny HOST COMMENT .... add host (IP/FQDN) deny_hosts.rules



9. pico /etc/apf/conf.apf

CTRL+W DEVM="1"

usteki satiri bulup altaki gibi değştiriyoruz.
DEVM="0"

10. Configure AntiDOS APF
pico /etc/apf/ad/conf.antidos


Kendimize gore duzenliyoruz .

# Organization name to display on outgoing alert emails
CONAME="Your Company"
sunucu adini girelim.
# Send out user defined attack alerts [0=off,1=on]
USR_ALERT="0"
Email almak icin 1 yapin.

# User for alerts to be mailed to
USR="
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
"
E-mail adresinizi yazin


değişiklikleri kaydedin. Ctrl+X sonra Y basin.
firewalli resetleyin.: /usr/local/sbin/apf -r

11. APF Log sistemi

tail -f /var/log/apf_log

Örnek :
Aug 23 01:25:55 ocean apf(31448): (insert) deny all to/from 185.14.157.123
Aug 23 01:39:43 ocean apf(32172): (insert) allow all to/from 185.14.157.123


12. APF otomatik olarka sistem resetledindiginde calissin mi ?

Reboot tan sonra Otomatik apf calis:
chkconfig --level 2345 apf on
Otomatik Calismayi iptal et:
chkconfig --del apf


13. Denying IPs with APF Firewall (Blocking)
IP Blocklamanin bir cok yolu var burda ikisini gorecegiz A ve B olarak. Ustelik kendimizi sisteme ekleyip block yeme riskimizi ortadan kaldiracagiz.

A) /etc/apf/apf -d IP
> -d flagi bizim ipimizi guvenli yapar

Örnek:

./apf -d 185.14.157.123 TESTING

pico /etc/apf/deny_hosts.rules


# added 185.14.157.123 on 08/23/05 01:25:55
# TESTING
185.14.157.123

B) pico /etc/apf/deny_hosts.rules


/etc/apf/apf -r

14. Allowing IPs with APF Firewall (Unblocking)

A) pico /etc/apf/deny_hosts.rules

/etc/apf/apf -r

B) /etc/apf/apf -a IP

Örnek:

./apf -a 185.14.157.123 UNBLOCKING

pico /etc/apf/allow_hosts.rules

# added 185.14.157.123 on 08/23/05 01:39:43
# UNBLOCKING
185.14.157.123




Konu Caistlin tarafından (24 Aralık 2005 Saat 18:30 ) değiştirilmiştir. Sebep: kelime hatalari
 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları reklam ver Benimmekan Mobil Sohbet