Hoşgeldiniz
Server saldırılarından alınan hasarı azaltmak ve çeşitli saldırı ve sorunları engellemek için ufak bir rehber hazırlama gereği duydum.
Öncelikle en baştan bilgilendirmek isterimki yapıcağınız tüm işlemler kullanıcıya aittir, herhangi sorumluluk kabul etmiyorum. Yapacağınız tüm işlemlerden önce yedek almayı unutmayın.
Öncelikle şunu önemle belirtmek isterim ki metinler TAMAMEN benim tarafımdan çevrilmiş ve DENENMİŞTİR. Lütfen emeğe saygı için izinsiz kopyalamayın.
Ek olarak şunu da belirtmek isterim Direk İngilizce'den çevirme olmadığı için Farklı makalelerden çevirdiğim için Çeviri'de aksaklık olursa kusura bakmayın.
İlk olarak PF ve IPFW anlatımı ile başlayalım
Hemen Anlatıma Başlayalım
Server saldırılarından alınan hasarı azaltmak ve çeşitli saldırı ve sorunları engellemek için ufak bir rehber hazırlama gereği duydum.
Öncelikle en baştan bilgilendirmek isterimki yapıcağınız tüm işlemler kullanıcıya aittir, herhangi sorumluluk kabul etmiyorum. Yapacağınız tüm işlemlerden önce yedek almayı unutmayın.
Öncelikle şunu önemle belirtmek isterim ki metinler TAMAMEN benim tarafımdan çevrilmiş ve DENENMİŞTİR. Lütfen emeğe saygı için izinsiz kopyalamayın.
Ek olarak şunu da belirtmek isterim Direk İngilizce'den çevirme olmadığı için Farklı makalelerden çevirdiğim için Çeviri'de aksaklık olursa kusura bakmayın.
İlk olarak PF ve IPFW anlatımı ile başlayalım
Hemen Anlatıma Başlayalım
1-1)PF(Packet Filter) Derleme Ve Yapılandırma[/FONT]
1-1-1)Derleme
Yapılcaklar;
- <li data-xf-list-type="ul">1-1-1-1)Kernel Kaynağı İndirilecek <li data-xf-list-type="ul">1-1-1-2)Başlatıcı Düzenlenicek <li data-xf-list-type="ul">1-1-1-3)Konfigrasyon dosyası yeni kernel için yapılandırılcak <li data-xf-list-type="ul">1-1-1-4)Yeni kernel derlenecek
Başlayalım..
1-1-1-1)Kernel Kaynağı:
İlk evrede kaynak indirmeyi göstericem.
Putty'den vereceğim komutları uygulayın;
Kod:
sysinstall [enter] --> [seçin] configure [enter] --> [seçin] distributions [enter] --> [seçin] src [enter] --> [seçin] base ve sys [işaretleyin] --> [sağ sol tuş ile alttan ok'u seçin] --> [enter] FTP [enter] main site [enter] --> bekleyin sysinstall'e kadar geri dönün
Bu aşama bitti
Bu şekilde kernel çekirdeği güncelledik artık çalışabilir ve ihtiyacımızı göre adapte edebilir hale getirdik.
1-1-1-2) Başlatıcı düzenleme:
PF'nin gerekli izinlerini sağlamak için başlatıcıyı düzenlememiz gerekiyor.
Aşağıdaki komutu putty'den uygulayın.
Kod:
cd /boot/defaults && ee loader.conf
Kod:
[COLOR=#000000]PF_LOAD[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"NO"[/COLOR]
Kod:
[COLOR=#000000]PF_LOAD[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"YES"[/COLOR]
Bundan sonra dosyayı kaydedip geri dönün.
Bu aşamada bitti
1-1-1-3)Konfigrasyon dosyasını yeni kernel için yapılandırma
Konfigrasyon çekirdek seçeneklerini PF için düzenleyelim
32-64Bit sistemler için 2 farklı yol mevcut.
32Bit Kullanıcıları;
Kod:
[COLOR=#000000]cd [/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]usr[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]src[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]sys[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]i386[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]conf[/COLOR]
64Bit Kullanıcıları;
Kod:
[COLOR=#000000]cd [/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]usr[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]src[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]sys[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]amd64[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]conf[/COLOR]
Komutunu uygulasın.
Daha sonra yukarıdaki komutlardan size uygun olanını girdikten sonra aşağıda vereceğim komut ile GENERIC konfigrasyon dosyasını kopyalayın.
Kod:
[COLOR=#000000]cp GENERIC [/COLOR][COLOR=#ff0000]bizim-cekirdegimiz[/COLOR]
Örnek:
Kod:
[COLOR=#000000]cp GENERIC [/COLOR][COLOR=#660066]Pasha[/COLOR]
Bu komuttan sonra konfigrasyon düzenleme zamanı:
Kod:
ee [COLOR=#ff0000]bizim-cekirdegimiz[/COLOR]
Örnek:
Kod:
ee Pasha
"Options" yerine aşağıdaki seçenekleri ekleyelim
Kod:
device[TAB][TAB]pf device[TAB][TAB]pflog device[TAB][TAB]pfsync options[TAB][TAB]ALTQ options[TAB][TAB]ALTQ_CBQ options[TAB][TAB]ALTQ_RED options[TAB][TAB]ALTQ_RIO options[TAB][TAB]ALTQ_HFSC options[TAB][TAB]ALTQ_PRIQ options[TAB][TAB]ALTQ_NOPCC
Not: = Notepad'de tab tuşu ile oluşturacağınız boşluk
Bu aşamada bitti
1-1-1-4)Yeni kerneli derlemek
Şimdi PF kısımının son aşaması olan çekirdek derleme kısmına geldik
Basit bir işlem ancak uzun bir zaman alabilir.
Aşağıdaki komutları girin.
Kod:
cd /usr/src && make buildkernel KERNCONF=[COLOR=#ff0000]çekirdek-adı [/COLOR]&& make installkernel KERNCONF=[COLOR=#ff0000]çekirdek-adı[/COLOR]
Bu aşamada bitti işlemin tamamlanması için yapı oluşturulana kadar bekleyin
1-1-2) Başlangıç ve komutlar
Şimdi başlangıç dosyasını düzenleme ve size temel komutları verme zamanı geldi.
1-1-2-1)Başlangıç
Aşağıdaki komutlardan sonra başlatma dosyası(rc.conf) düzenleyin.
Kod:
[COLOR=#000000]ee [/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]etc[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]rc[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]conf[/COLOR]
Aşağıdaki içeriği yapıştırın.
Kod:
pf_enable="YES" pf_rules="/etc/pf.conf" pf_flags="" pflog_enable="YES" pflog_logfile="/var/log/pflog" pflog_flags="â
Bu otomatik başlatma kısmı Şimdi komutları listeleme zamanı:
1-1-2-2)Komutlar
PF Komutları:
Kod:
[COLOR=#008800]/etc/[/COLOR][COLOR=#000000]rc[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]d[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]pf restart [/COLOR][COLOR=#666600]|[/COLOR][COLOR=#000000] start [/COLOR][COLOR=#666600]|[/COLOR][COLOR=#000000] stop[/COLOR]
Kod:
pfctl -F all -f /etc/pf.conf
Sırada son adım
1-1-2-3) PF Kuralları
PF.conf dosyasında bulunan PF kuralları
Önemli parça olduğundan Onlar olmadan kernel işlemlerini yapamayız
Şimdi size hazır kuralları verip bunları nasıl yapacağınızı göstericem
ilk önce PF dosyası oluşturuyoruz
Kod:
ee /etc/pf.conf
Kuralları yapmaya başlıyoruz.
Öncelikle rahatça kendi kurallarınızı yazabilirsiniz kendi değişkenlerinizi ve yapılandırmalarını yapabilirsiniz. Yaygın bir makro mevcut.
Şimdi, aşağıda anlatacağım kurallar ile tamamen kendi kurallarınızı içeren PF yapabilirsiniz.
- <li data-xf-list-type="ul">1 Makro <li data-xf-list-type="ul">2 Zaman bağlantısı üzerinden yönetim seçenekleri <li data-xf-list-type="ul">3 Parçalanmış veya kırık paketlerin sunulması <li data-xf-list-type="ul">4 Standart paketleri <li data-xf-list-type="ul">5 Trafik yoğunluğu gibi bant genişliği kontrol yöntemi <li data-xf-list-type="ul">6 çeviri Paketi <li data-xf-list-type="ul">7 Yönlendirme - filtreleme kuralları <li data-xf-list-type="ul">8 paket filtreleme
Kuralların PF işlevleri;Kurallarda PF işaretleme koşul ve protokolleri:
Her Kural gibi PF'nin de kendi koşul, bayrak, protokolleri vardır.
Ayrıca TCP(Genellikle ICMP) üzerinden kullanılan Port taraması, Port engellemeye vs izin verir.
Bunun için bu kuralları bilmek ve Çeşitli setler ile bu kuralların değerlerini değiştirmek yeterlidir.
Koşullar:
Kod:
pass - kilidi kaldırmak için kullanılan koşul, paket geçme izni, port kilidi açma vs. block - pass karşısında paket , port vs engellemek için kullanılan koşul quick - PF'de belirli bir kuralı durdurmak kuralları ve akışı görüntülemesini iptal etmek(ağ güvenliği için yararlı) kullanılan koşul proto - Protokol, örneğin TCP protokolünü tanımlar.
Argümanlar:
Kod:
any - Tüm kaynaklardan from - bir yerden bir yere (" from any to any" gibi) all - Tümü (örneğin herşeyi engellemek için) on - ne, hangi kartı in / out - paket ve kurallarda giriş çıkışları kontrol etmek için max 'num' (Örnek: "max 200") istek paketin byte boyutunu belirler
Protokoller:
Kod:
TCP - Unix üzerinden hemen hemen her yerde kullanabilirsiniz, port tarama, bağlantı noktası tarama vs standart ve en yaygın kullanılan protokol. UDP - İletim ve Birleştirme için standart bir protokol Saldırılarda genellikle DoS saldırılarında tespit için olan protokol sınırı çok azdır. ICMP - Genellikle sistemin kendi aktif bağlantıları, engellenmemiş bağlantıları kontrol etmek için kullanılan protokol ICMP6 - -
PF Koşulları:
Kod:
modulate state - Durumu değiştirir, daha iyi bir pf için kullanılır keep state - Aşırı yükte iletişimi kesmek için kullanılır
PF Koşulları, Saldırılardan ağı korumak için çok önemli koşullardır.
TCP İşaretlemeleri:
Kod:
F -- FIN, Bağlantıyı kapatma S -- SYN, Bağlantıyı açma R -- RST, Bağlantıyı yeniden başlatma P -- PSH, Verilerin gelen trafiğini kontrol etmek için A -- ACK, Alınanlar paketler için U -- URG, Paketin acil olduğunu belirtmek için
Bu işaretlemeler sadece TCP için geçerlidir
Şuan kendi kurallarını yapmak için yeterli örnekler bulunuyor
PF temel kurallar bitti.
Basit Örnekler:
Sızıntı için herhangi bir kombinasyon:
Kod:
#makro int_if = "em1" ext_if = "em0" #PF kurallari pass out on $ext_if proto tcp all modulate state flags S/SA pass out on $ext_if proto { udp, icmp } all keep state pass in on $ext_if proto tcp all modulate state flags S/SA pass in on $ext_if proto { udp, icmp } all keep state pass quick on lo0 all
Hazır orta sınıf kurallar:
Kod:
ext_if="em0" int_if="em1" lan_net="10.0.0.0/24" tcp_services="{ 3306, 22 }" udp_services="{ 3306, 22 }" icmp_types="echoreq" set skip on lo0 set block-policy return set loginterface $ext_if scrub in all block in on $ext_if pass in on $int_if from $lan_net to any pass out on $int_if from any to $lan_net antispoof log quick for $int_if pass in on $ext_if proto tcp from any to any port $tcp_services modulate state flags S/SA pass in on $ext_if proto udp from any to any port $udp_services keep state pass out on $ext_if proto tcp from any to any port $tcp_services modulate state flags S/SA pass out on $ext_if proto udp from any to any port $udp_services keep state pass in on $ext_if proto { tcp, udp } from any to $ext_if port 53 pass in inet proto icmp all icmp-type $icmp_types keep state pass out on $ext_if proto { tcp, udp, icmp } all
1-2) IPFW (IP Firewall) Kurulumu:
Şimdi size nasıl sunucunuz için güvenlik duvarı oluşturacağınızı göstericem.
Putty'i açın ve aşağıdaki komutları uygulayın
Kod:
sysinstall
Açılan menüden
Kod:
configure > distributions > src
Kod:
sys
Kod:
ok > FTP > URL
64 Bit için:
Kod:
[COLOR=#000000]ftp[/COLOR][COLOR=#666600]:[/COLOR][COLOR=#880000]//ftp-archive.freebsd.org/pub/FreeBSD/releases/amd64/8.2-RELEASE[/COLOR]
32 Bit için:
Kod:
[COLOR=#000000]ftp[/COLOR][COLOR=#666600]:[/COLOR][COLOR=#880000]//ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.2-RELEASE[/COLOR]
Ve
Kod:
yes
Şimdi nasıl indirip açmak için aşağıdaki komutları giriyoruz
64 Bit için:
Kod:
[COLOR=#000000]cd [/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]usr[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]src[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]sys[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]amd64[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]conf[/COLOR]
32 Bit için:
Kod:
[COLOR=#000000]cd [/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]usr[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]src[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]sys[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]i386[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]conf[/COLOR]
Şimdi,
Kod:
cp GENERIC IPFWKERNEL
Ve ardından,
Kod:
ee IPFWKERNEL
Ve "options" bölümünü bulup ekliyoruz.
Kod:
options[tab][tab]IPFIREWALL # IPFW için gerekli options[tab][tab]IPFIREWALL_VERBOSE # LOG için gerekli options[tab][tab]IPFIREWALL_VERBOSE_LIMIT=10 # Giriş limiti options[tab][tab]IPDIVERT # NATD için gerekli
Not: = Notepad'de tab tuşu ile oluşturacağınız boşluk
Kod:
Esc > leave editor > yes
Ve türü,
Kod:
[COLOR=#000000]cd [/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]usr[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]src [/COLOR][COLOR=#666600]&&[/COLOR][COLOR=#000000] make buildkernel KERNCONF[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000]IPFWKERNEL[/COLOR]
Kurulum için girin
Kod:
[COLOR=#000000]make installkernel KERNCONF[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000000]IPFWKERNEL[/COLOR]
Kod:
[COLOR=#000000]ee [/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]etc[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]rc[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]conf[/COLOR]
Ve sonuna ekleyin.
Kod:
[COLOR=#000000]firewall_enable[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"YES"[/COLOR]
Kod:
[INDENT][COLOR=#000000]firewall_script[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#008800]"/etc/ipfw.rules"[/COLOR][/INDENT]
Kod:
Esc > leave editor > yes
Şimdi girin:
Kod:
[COLOR=#000000]ee [/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]etc[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]ipfw[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]rules[/COLOR]
ve oraya yazın,
Kod:
IPF="ipfw -q add" ipfw -q -f flush #loopback $IPF 10 allow all from any to any via lo0 $IPF 20 deny all from any to 127.0.0.0/8 $IPF 30 deny all from 127.0.0.0/8 to any $IPF 40 deny tcp from any to any frag # statefull $IPF 50 check-state $IPF 60 allow tcp from any to any established $IPF 70 allow all from any to any out keep-state $IPF 80 allow icmp from any to any # open port ftp (20,21), ssh (22), mail (25) # http (80), dns (53) etc $IPF 110 allow tcp from any to any 21 in $IPF 120 allow tcp from any to any 21 out $IPF 130 allow tcp from any to any 22 in $IPF 140 allow tcp from any to any 22 out $IPF 150 allow tcp from any to any 25 in $IPF 160 allow tcp from any to any 25 out $IPF 170 allow udp from any to any 53 in $IPF 175 allow tcp from any to any 53 in $IPF 180 allow udp from any to any 53 out $IPF 185 allow tcp from any to any 53 out $IPF 200 allow tcp from any to any 80 in $IPF 210 allow tcp from any to any 80 out # deny and log everything $IPF 500 deny log all from any to any
Kod:
Esc > leave editor > yes
İzinleri düzenleyin
Kod:
[COLOR=#000000]chmod [/COLOR][COLOR=#666600]-[/COLOR][COLOR=#000000]R [/COLOR][COLOR=#006666]777[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]etc[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]ipfw[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]rules[/COLOR]
Sistemi yeniden başlatın
Kod:
reboot
IPFW Komutları:
Kod:
/etc/rc.d/ipfw start - IPFW Başlatır /etc/rc.d/ipfw restart - IPFW Yeniden Başlatır /etc/rc.d/ipfw stop - IPFW Durdurur
Port eklemek:
Winscp ile ftp yi açın ve /etc/ dizinine gidin ipfw.rules dosyasını açın ve aşağıdaki örnekteki gibi portları ekleyin
Kod:
$IPF 200 allow all from any to any 11002 in $IPF 210 allow all from any to any 11002 out
IPFW den yasaklama verilmesi:
Kod:
# IP yasaklari # Ornek $IPF 100 deny all from IP/32 to any in $IPF 101 deny all from IP/32 to any in # SSH, Mysql yasakları $IPF 120 deny log all from IP/20 to any 22 in $IPF 121 deny log all from IP/20 to any 22 in $IPF 122 deny log all from IP/20 to any 3306 in $IPF 123 deny log all from IP/20 to any 3306 in
1-3)RC.Conf Kurulum
Aşağıdaki komut ile rc.conf'a bağlanın
Kod:
[COLOR=#000000]ee [/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]etc[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]rc[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]conf[/COLOR]
Ve bu değeri yapıştırın.
Kod:
####################### ####AĞ Değerleri#### ####################### sshd_enable="YES" mysql_enable="YES" apache22_enable="YES" ntpdate_enable="YES" ntpdate_hosts="213.186.33.99" ################### ####Bakım#### ################### fsck_y_enable="YES" clear_tmp_enable="YES" named_enable="YES" ############################# ####AĞ Yapılandırması#### ############################# ifconfig_em0="inet 37.59.18.89 netmask 255.255.255.0 broadcast 37.59.18.255" defaultrouter="37.59.18.254" hostname="ns232361.ovh.net" ###################### ####Güvenlik#### ###################### icmp_drop_redirect="YES" icmp_log_redirect="YES" tcp_drop_synfin="YES" icmp_bmcastecho="NO" icmp_bandlim="YES" clear_tmp_enable="YES" ################# ####Firewall#### ################# firewall_enable="YES" firewall_script="/etc/ipfw.rules" firewall_logging="YES" natd_enable="YES" natd_interface="em0" natd_flags="-dynamic -m" pf_enable="YES" pf_rules="/etc/pf.conf" pf_flags="" pflog_enable="YES" pflog_logfile="/var/log/pflog" pflog_flags="" ################# ####Diğer#### ################# # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable dumpdev="NO"
.
1-4)Hazır PF CONF
Kod:
[COLOR=#000000]ee [/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]etc[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]pf[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]conf[/COLOR]
Aşağıdaki kodu yapıştırın
Kod:
################# ###PF Kurallari :### ################# #makro ext_if="re0" lan_net="10.0.0.0/24" tcp_services="{ 9987, 3306, 22, 53, 25 }" #udp_services="{ 3306, 25, 53, 22 }" icmp_types="echoreq" #filtre set skip on lo0 set optimization normal set ruleset-optimization basic set require-order yes set block-policy return set loginterface $ext_if set state-policy if-bound scrub in all scrub on $ext_if fragment drop-ovl scrub on $ext_if all reassemble tcp block in quick from urpf-failed block in quick from urpf-failed label uRPF antispoof log quick for $ext_if #loopback pass out quick on lo0 proto tcp all pass in quick on lo0 proto tcp all keep state #istisnalar #seçilen oslar pass in quick on $ext_if from any os Windows keep state pass in quick on $ext_if from any os "Windows XP" keep state pass in quick on $ext_if from any os "Windows Vista" keep state pass in quick on $ext_if from any os "Windows 7" keep state pass in quick on $ext_if from any os unknown keep state #engellenen oslar block in quick on $ext_if from any os "Linux 2.4 ts" #block in quick on $ext_if from any os unknown block in quick on $ext_if from any os OpenBSD block in quick on $ext_if from any os Linux block in quick on $ext_if from any os Debian #engelli ipler table <blockip> persist file "/etc/blockip.txt" block in quick on $ext_if from <blockip> to any #port yönlendirme pass in quick on $ext_if proto tcp from any to any port $tcp_services keep state flags S/SA pass out quick on $ext_if proto tcp from any to any port $tcp_services keep state flags S/SA #pass in quick on $ext_if proto udp from any to any port $udp_services keep state #pass out quick on $ext_if proto udp from any to any port $udp_services keep state pass in quick inet proto icmp all icmp-type $icmp_types keep state pass out quick on $ext_if proto { tcp, udp, icmp } all modulate state #varsayılan kilit block return block in all block out all
1-5) Sysctl.conf düzenleme
Kod:
[COLOR=#000000]sysctl [/COLOR][COLOR=#666600]-[/COLOR][COLOR=#000000]a[/COLOR]
herşey sorunsuz ise bu mesaj çıkmalıdır
Kod:
[COLOR=#666600]%[/COLOR][COLOR=#000000] sysctl kern[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]maxproc[/COLOR]
şimdi konfigrasyona girip sysctl düzenleme zamanı
Kod:
[COLOR=#000000]ee [/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]etc[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]sysctl[/COLOR][COLOR=#666600].[/COLOR][COLOR=#000000]conf[/COLOR]
Aşağıdaki gibi yapılandırın
Kod:
# $FreeBSD: release/9.0.0/etc/sysctl.conf 112200 2003-03-13 18:43:50Z mux $ # # This file is read when going to multi-user and its contents piped thru # ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details. # # Uncomment this to prevent users from seeing information about processes that # are being run under another UID. #security.bsd.see_other_uids=0 ########################################## ####Sınırlama ve Ağ ayarları#### ########################################## n#security.bsd.see_other_uids=0 security.bsd.see_other_uids=0 net.inet.tcp.blackhole=2 net.inet.udp.blackhole=1 net.inet.ip.ttl=128 kern.maxfilesperproc=200000 kern.maxvnodes=600000 kern.maxfiles=204800 kern.ipc.maxsockbuf=16777216 kern.ipc.shmmax=1073741824 kern.ipc.somaxconn=32768 kern.ipc.shmall=134217728 net.inet.tcp.rfc1323=1 net.inet.tcp.recvbuf_max=16777216 net.inet.tcp.sendbuf_auto=1 net.inet.tcp.sendbuf_inc=262144 net.inet.tcp.recvbuf_auto=1 net.inet.tcp.recvbuf_inc=524288 net.inet.tcp.hostcache.expire=1 net.inet.ip.redirect=0 net.inet.ip.sourceroute=0 net.inet.ip.accept_sourceroute=0 net.inet.icmp.maskrepl=0 net.inet.icmp.log_redirect=0 net.inet.icmp.drop_redirect=1 net.inet.tcp.drop_synfin=1 net.inet.tcp.msl=5000 net.inet.tcp.fast_finwait2_recycle=1 net.inet.ip.intr_queue_maxlen=4096 net.inet.ip.forwarding=1 net.inet.ip.fastforwarding=1 net.inet.tcp.ecn.enable=1 net.inet.ip.random_id=1 net.inet.tcp.log_in_vain=0 net.inet.tcp.log_debug=0 net.inet.udp.log_in_vain=0 kern.random.sys.harvest.ethernet=0 kern.random.sys.harvest.interrupt=0 kern.random.sys.harvest.point_to_point=0 net.inet.icmp.icmplim=40 net.inet.tcp.delayed_ack=1 net.inet.tcp.mssdflt=1460 net.inet.tcp.path_mtu_discovery=0 net.inet.tcp.recvspace=65536 net.inet.tcp.sendspace=65536 net.inet.udp.recvspace=65536 net.local.stream.recvspace=65536 net.inet6.ip6.accept_rtadv=0 net.inet6.ip6.auto_linklocal=0 kern.ipc.nmbjumbop=192000 net.inet.tcp.maxtcptw=163840 net.inet.tcp.sendbuf_max=16777216 net.inet.tcp.cc.algorithm=htcp net.inet.tcp.hostcache.expire=5400 net.route.netisr_maxqlen=4096 net.inet.tcp.nolocaltimewait=1 net.local.stream.sendspace=163840 net.local.stream.recvspace=163840 net.inet.tcp.local_slowstart_flightsize=32 net.inet.tcp.slowstart_flightsize=32 net.inet.tcp.rfc3390=0 net.inet.tcp.syncache.rexmtlimit=1 net.inet.ip.rtexpire=2 net.inet.ip.check_interface=1 net.inet.ip.portrange.randomized=1 net.inet.ip.process_options=0 net.inet.icmp.bmcastecho=0 net.inet.icmp.maskfake=0 vfs.read_max=128 net.link.ether.inet.log_arp_movements=0 net.inet.tcp.log_in_vain=1 net.inet.udp.log_in_vain=1 net.inet.ip.rtminexpire=2 net.inet.tcp.icmp_may_rst=0 ##################### ####IPFW Firewall#### ##################### net.inet.ip.fw.verbose=1 net.inet.ip.fw.verbose_limit=5
1-6)Kernel güvenliğini artırma
Kod:
[COLOR=#000000][FONT=Arial]sysctl kern.securelevel=9[/FONT][/COLOR]
komutunu uygulayın
1-7)SSH Portu değiştirme
Filezilla ile bağlandığınız 22 portunu değiştirmek için /etc/sshd/ dizinine gidin sshd.conf dosyasını açın içindeki 22 değerini değiştirip kaydedin Putty'den /etc/sshd/sshd restart komutunu yollayın
1-8)GM Mod açığını kapatma
/event_flag test 0 ile yapılan gm mod açığını kapatmak için
Kod:
quest gm_mode begin state start begin when login or logout or levelup or kill or use begin if game.get_event_flag("test") &gt; 0 then game.set_event_flag("test", 0) end end end end
1-9) API TOOL FIX
Kod:
Öncelikle bir adet hex editör indirin kullandığınız game'yi upx unpacker ile açın CTRL + F ile arama ekranını açın SHOWMETHEMONEY şeklinde arama yapın Gelen sonucu herhangi bir yazı ile değiştirin sadece 14 haneli olcak ÖRNEK: SHOWMETHEMONEY şeklinde arama yaptınız bunu jfaoigusamfieu ile değiştirin
1-10)Mysql Port Değiştirme
Kod:
Putty'e Giriniz ve Aşağıdaki Komutu Yazınız cp /usr/local/share/mysql/my-medium.cnf /var/db/mysql/my.cnf Kodu Yazıp ENTER Tuşuna Basınız ve Alttaki Komutu Yazınız. ee /var/db/mysql/my.cnf Karşınıza Gelen Ekranda Aşağıdaki Yerleri Değiştiriniz [client] Kısmındaki port = 3306 3306 Yerine Yeni Portunuzu Giriniz Max 4 Hane 4295 Gibi Sonra Az Daha Aşağı Doğru İniniz [mysqld] Kısmındaki port = 3306 3306 Yerine Üsste Girdiğiniz Yeni Portunuzu Tekrar Giriniz Hatasız Girmeye Özen Gösterin Yoksa MYSQL Bağlantınız Kopar Portları Düzenledikten Sonra ESC Tuşuna Basınız ve 2 Kere ENTER Tuşuna Basınız . Ana Ekrana Dönünce reboot Atınız. Artık Yeni Portunuz Aktif. MYSQL Bağlanırken Navicattaki 3306 Yerine Yeni Portunuzu Giriniz
2-1)Bakim ve Kontrol Scriptleri
Yeteri kadar oyun güvenliğini sağladık şimdi sistem bakımı için bazı bash scriptler hazırlayalım.
Notepad ile 4 tane dosya oluşturuyoruz.
- <li data-xf-list-type="ol">
[*=2]bakim.sh
[*=2]auth_devam.sh
[*=2]db_devam.sh
[*=2]kanal_devam.sh
Şimdi bu 4 dosyayı oluşturduktan sonra içeriklerini düzenleme başlayabiliriz
1)bakim.sh ile baslayalim
Kod:
echo "BAKIM SCRIPT PASHA37!" sleep 6 # mysql echo "Mysql DB Bakim baslatiliyor" mysql_upgrade --force --user="dbbakim" --password="Ad4S1%4@" sleep 2 mysqlcheck --user="dbbakim" --password="Ad4S1%4@" --auto-repair --all-databases sleep 2 /usr/local/etc/rc.d/mysql-server restart sleep 6 # FreeBSD güncelleme baslatiliyor echo "Sistem guncellemesi, portlar, hizmet ve guvenlik protokolleri guncelleniyor!" sleep 2 /usr/sbin/freebsd-update fetch install sleep 2 portupgrade -ac echo "Calistirma tamamlandi"
2)auth_devam.sh
/USR/HOME İÇİN:
Kod:
#!/bin/sh i=1 while [ $i -le 2 ] do netstat -an | grep LISTEN | grep 13000 [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13000 [ $? -eq 0 ] && echo "Acik" || cd /home/g1/auth/ && ./auth & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 15000 [ $? -eq 0 ] && echo "Acik" || cd /home/g1/auth/ && ./db & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 16000 [ $? -eq 0 ] && echo "Acik" || cd /home/ch2/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 18000 [ $? -eq 0 ] && echo "Acik" || cd /home/ch3/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 20000 [ $? -eq 0 ] && echo "Acik" || cd /home/ch4 && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 22000 [ $? -eq 0 ] && echo "Acik" || cd /home/ch5/ && ./game [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13099 [ $? -eq 0 ] && echo "Acik" || cd /home/game99/ && ./game99 & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13005 [ $? -eq 0 ] && echo "Acik" || cd /home/game2/ && ./game2 & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13010 [ $? -eq 0 ] && echo "Acik" || cd /home/game3/ && ./game3 & sleep 20 i=`expr $i + 1` done
/USR/GAME/ İÇİN:
Kod:
#!/bin/sh i=1 while [ $i -le 2 ] do netstat -an | grep LISTEN | grep 13000 [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13000 [ $? -eq 0 ] && echo "Acik" || cd /game/g1/auth/ && ./auth & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 15000 [ $? -eq 0 ] && echo "Acik" || cd /game/g1/auth/ && ./db & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 16000 [ $? -eq 0 ] && echo "Acik" || cd /game/ch2/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 18000 [ $? -eq 0 ] && echo "Acik" || cd /game/ch3/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 20000 [ $? -eq 0 ] && echo "Acik" || cd /game/ch4 && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 22000 [ $? -eq 0 ] && echo "Acik" || cd /game/ch5/ && ./game [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13099 [ $? -eq 0 ] && echo "Acik" || cd /game/game99/ && ./game99 & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13005 [ $? -eq 0 ] && echo "Acik" || cd /game/game2/ && ./game2 & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13010 [ $? -eq 0 ] && echo "Acik" || cd /game/game3/ && ./game3 & sleep 20 i=`expr $i + 1` done
3)db_devam.sh
/USR/HOME/ İÇİN:
Kod:
#!/bin/sh i=1 while [ $i -le 2 ] do netstat -an | grep LISTEN | grep 11666 [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 1 [ $? -eq 0 ] && echo "Acik" || cd /home/game/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 16000 [ $? -eq 0 ] && echo "Acik" || cd /home/ch2/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 18000 [ $? -eq 0 ] && echo "Acik" || cd /home/ch3/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 20000 [ $? -eq 0 ] && echo "Acik" || cd /home/ch4 && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 22000 [ $? -eq 0 ] && echo "Acik" || cd /home/ch5/ && ./game [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13099 [ $? -eq 0 ] && echo "Acik" || cd /home/game99/ && ./game99 & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13005 [ $? -eq 0 ] && echo "Acik" || cd /home/game2/ && ./game2 & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13010 [ $? -eq 0 ] && echo "Acik" || cd /home/game3/ && ./game3 & sleep 20 i=`expr $i + 1` done
/USR/GAME/ İÇİN:
Kod:
#!/bin/sh i=1 while [ $i -le 2 ] do netstat -an | grep LISTEN | grep 11666 [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 1 [ $? -eq 0 ] && echo "Acik" || cd /game/game/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 16000 [ $? -eq 0 ] && echo "Acik" || cd /game/ch2/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 18000 [ $? -eq 0 ] && echo "Acik" || cd /game/ch3/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 20000 [ $? -eq 0 ] && echo "Acik" || cd /game/ch4 && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 22000 [ $? -eq 0 ] && echo "Acik" || cd /game/ch5/ && ./game [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13099 [ $? -eq 0 ] && echo "Acik" || cd /game/game99/ && ./game99 & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13005 [ $? -eq 0 ] && echo "Acik" || cd /game/game2/ && ./game2 & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13010 [ $? -eq 0 ] && echo "Acik" || cd /game/game3/ && ./game3 & sleep 20 i=`expr $i + 1` done
4)kanal_devam.sh
/USR/HOME/ İÇİN:
Kod:
#!/bin/sh i=1 while [ $i -le 2 ] do netstat -an | grep LISTEN | grep 11666 [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13000 [ $? -eq 0 ] && echo "Acik" || cd /home/game/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 15000 [ $? -eq 0 ] && echo "Acik" || cd /home/g1/db/ && ./db & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 16000 [ $? -eq 0 ] && echo "Acik" || cd /home/ch2/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 18000 [ $? -eq 0 ] && echo "Acik" || cd /home/ch3/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 20000 [ $? -eq 0 ] && echo "Acik" || cd /home/ch4 && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 22000 [ $? -eq 0 ] && echo "Acik" || cd /home/ch5/ && ./game [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13099 [ $? -eq 0 ] && echo "Acik" || cd /home/game99/ && ./game99 & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13005 [ $? -eq 0 ] && echo "Acik" || cd /home/game2/ && ./game2 & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13010 [ $? -eq 0 ] && echo "Acik" || cd /home/game3/ && ./game3 & sleep 20 i=`expr $i + 1` done
/USR/GAME/ İÇİN:
Kod:
#!/bin/sh i=1 while [ $i -le 2 ] do netstat -an | grep LISTEN | grep 11666 [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13000 [ $? -eq 0 ] && echo "Acik" || cd /game/game/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 15000 [ $? -eq 0 ] && echo "Acik" || cd /game/g1/db/ && ./db & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 16000 [ $? -eq 0 ] && echo "Acik" || cd /game/ch2/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 18000 [ $? -eq 0 ] && echo "Acik" || cd /game/ch3/ && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 20000 [ $? -eq 0 ] && echo "Acik" || cd /game/ch4 && ./game & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 22000 [ $? -eq 0 ] && echo "Acik" || cd /game/ch5/ && ./game [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13099 [ $? -eq 0 ] && echo "Acik" || cd /game/game99/ && ./game99 & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13005 [ $? -eq 0 ] && echo "Acik" || cd /game/game2/ && ./game2 & [ $? -eq 0 ] && netstat -an | grep LISTEN | grep 13010 [ $? -eq 0 ] && echo "Acik" || cd /game/game3/ && ./game3 & sleep 20 i=`expr $i + 1` done
Dosyalar hazir filezilla'dan yükleyin.
Otomatik olarak devam ettirmek için crontab olarak yüklemeliyiz
Kod:
[COLOR=#000000]ee [/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]etc[/COLOR][COLOR=#666600]/[/COLOR][COLOR=#000000]crontab[/COLOR]
Asagidaki degerleri yazin:
Kod:
*/10[TAB]*[TAB]*[TAB]*[TAB]*[TAB]root[TAB]/db_devam.sh */10[TAB]*[TAB]*[TAB]*[TAB]*[TAB]root[TAB]/auth_devam.sh */10[TAB]*[TAB]*[TAB]*[TAB]*[TAB]root[TAB]/kanal_devam.sh
Not: = Notepad'de tab tuşu ile oluşturacağınız boşluk
2-2)DDOS Ataklarini ve Gelen IP'leri görme
Kod:
clear echo "Kontrol Ediliyor DDOS Attacks.." sleep 3 netstat -np | grep SYN_RECV | awk '{print $5}' | cut -d. -f1-4 | cut -d: -f1 | sort -n | uniq -c | sort -n echo "Attacks and IP" ;;
2-3)LOG Temizleme
Kod:
#!/bin/sh rm -rf /usr/game/channel1/ch1_1/stdout rm -rf /usr/game/channel1/ch1_1/packet_info.txt rm -rf /usr/game/channel1/ch1_1/p2p_packet_info.txt rm -rf /usr/game/channel1/ch1_1/syslog rm -rf /usr/game/channel1/ch1_1/syserr rm -rf /usr/game/channel1/ch1_1/game.core rm -rf /usr/game/channel1/ch1_2/stdout rm -rf /usr/game/channel1/ch1_2/packet_info.txt rm -rf /usr/game/channel1/ch1_2/p2p_packet_info.txt rm -rf /usr/game/channel1/ch1_2/syslog rm -rf /usr/game/channel1/ch1_2/syserr rm -rf /usr/game/channel1/ch1_2/game.core rm -rf /usr/game/channel1/ch1_3/stdout rm -rf /usr/game/channel1/ch1_3/packet_info.txt rm -rf /usr/game/channel1/ch1_3/p2p_packet_info.txt rm -rf /usr/game/channel1/ch1_3/syslog rm -rf /usr/game/channel1/ch1_3/syserr rm -rf /usr/game/channel1/ch1_3/game.core rm -rf /usr/game/game99/game99_1/stdout rm -rf /usr/game/game99/game99_1/packet_info.txt rm -rf /usr/game/game99/game99_1/p2p_packet_info.txt rm -rf /usr/game/game99/game99_1/syslog rm -rf /usr/game/game99/game99_1/syserr rm -rf /usr/game/game99/game99_1/game.core rm -rf /usr/game/g1/db/stdout rm -rf /usr/game/g1/db/packet_info.txt rm -rf /usr/game/g1/db/p2p_packet_info.txt rm -rf /usr/game/g1/db/syslog rm -rf /usr/game/g1/db/syserr rm -rf /usr/game/g1/auth/stdout rm -rf /usr/game/g1/auth/packet_info.txt rm -rf /usr/game/g1/auth/p2p_packet_info.txt rm -rf /usr/game/g1/auth/syslog rm -rf /usr/game/g1/auth/syserr
2-4)FIREWALL için hazır script
Kod:
clear echo "FIREWALL SİSTEMİ" echo "İnternet Hizmetleri'nin size vermiş olduğu ip adresini giriniz..." read serverip clear echo "Girdiğiniz İp Adresi : $serverip" echo 'Bu ip adresi doğruysa "y" yazıp enterleyin.'; echo 'Değilse "r" yazip enterleyin.'; echo 'Çıkmakmı istiyorsunuz ? "n" basıp enterlayın.'; read secim case $secim in n) clear echo "Firewall Kurulumundan Çıktınız.!" cd /root rm -rf firewall.sh ;; r) sh firewall.sh ;; y) clear echo "Şuan kurulan ip adresi : $serverip" echo "Bayım Kurulum başladı sakin olun." echo 'Kurulum bitti mesajı gelirse bilin ki bitmiştir..' sleep 3 clear #cd /usr/src/sys/i386/conf #cp PAE DOST#echo "options IPFIREWALL" >> /usr/src/sys/i386/conf/DOST #echo "options IPFIREWALL_VERBOSE" >> /usr/src/sys/i386/conf/DOST #echo "options IPFIREWALL_VERBOSE_LIMIT=15" >> /usr/src/sys/i386/conf/DOST#cd /usr/src make kernel KERNCONF=DOST echo 'firewall_enable="YES"' >> /etc/rc.conf echo 'firewall_script="/etc/ipfw.rules"' >> /etc/rc.conf echo 'IPF="ipfw -q add"' >> /etc/ipfw.rules echo "ipfw -q -f flush # ipfw add 5 allow tcp from any to me 13000 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 14000 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 16000 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 17000 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 14001 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 11002 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 22000 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 20000 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 19000 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 21000 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 15000 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 18000 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 22000 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 3306 in via em0 setup limit src-addr 10 ipfw add 5 allow tcp from any to me 22 in via em0 setup limit src-addr 10 #İnce ayar \$IPF 4 allow all from $serverip to any 12001 \$IPF 5 allow all from 127.0.0.0/8 to any 12001 \$IPF 6 deny all from any to me 12001 \$IPF 7 allow all from $serverip to any 14000 \$IPF 8 allow all from 127.0.0.0/8 to any 14000 \$IPF 9 deny all from any to me 14000 \$IPF 10 allow all from $serverip to any 14001 \$IPF 11 allow all from 127.0.0.0/8 to any 14001 \$IPF 12 deny all from any to me 14001 \$IPF 13 allow all from $serverip to any 14002 \$IPF 14 allow all from 127.0.0.0/8 to any 14002 \$IPF 15 deny all from any to me 14002 \$IPF 16 allow all from $serverip to any 14003 \$IPF 17 allow all from 127.0.0.0/8 to any 14003 \$IPF 18 deny all from any to me 14003 \$IPF 19 allow all from $serverip to any 14004 \$IPF 20 allow all from 127.0.0.0/8 to any 14004 \$IPF 21 deny all from any to me 14004 \$IPF 22 allow all from $serverip to any 14061 \$IPF 23 allow all from 127.0.0.0/8 to any 14061 \$IPF 24 deny all from any to me 14061 \$IPF 25 allow all from $serverip to any 14099 \$IPF 26 allow all from 127.0.0.0/8 to any 14099 \$IPF 27 deny all from any to me 14099 \$IPF 28 allow all from $serverip to any 17000 \$IPF 29 allow all from 127.0.0.0/8 to any 17000 \$IPF 30 deny all from any to me 17000 \$IPF 31 allow all from $serverip to any 17001 \$IPF 32 allow all from 127.0.0.0/8 to any 17001 \$IPF 33 deny all from any to me 17001 \$IPF 34 allow all from $serverip to any 17002 \$IPF 35 allow all from 127.0.0.0/8 to any 17002 \$IPF 36 deny all from any to me 17002 \$IPF 37 allow all from $serverip to any 17003 \$IPF 38 allow all from 127.0.0.0/8 to any 17003 \$IPF 39 deny all from any to me 17003 \$IPF 40 allow all from $serverip to any 17004 \$IPF 41 allow all from 127.0.0.0/8 to any 17004 \$IPF 42 deny all from any to me 17004 \$IPF 43 allow all from $serverip to any 17061 \$IPF 44 allow all from 127.0.0.0/8 to any 17061 \$IPF 45 deny all from any to me 17061 \$IPF 46 allow all from $serverip to any 17099 \$IPF 47 allow all from 127.0.0.0/8 to any 17099 \$IPF 48 deny all from any to me 17099 \$IPF 49 allow all from $serverip to any 19001 \$IPF 50 allow all from 127.0.0.0/8 to any 19001 \$IPF 51 deny all from any to me 19001 \$IPF 52 allow all from $serverip to any 19002 \$IPF 53 allow all from 127.0.0.0/8 to any 19002 \$IPF 54 deny all from any to me 19002 \$IPF 55 allow all from $serverip to any 19003 \$IPF 56 allow all from 127.0.0.0/8 to any 19003 \$IPF 57 deny all from any to me 19003 \$IPF 58 allow all from $serverip to any 19004 \$IPF 59 allow all from 127.0.0.0/8 to any 19004 \$IPF 60 deny all from any to me 19004 \$IPF 61 allow all from $serverip to any 19061 \$IPF 62 allow all from 127.0.0.0/8 to any 19061 \$IPF 63 deny all from any to me 19061 \$IPF 64 allow all from $serverip to any 19099 \$IPF 65 allow all from 127.0.0.0/8 to any 19099 \$IPF 66 deny all from any to me 19099 \$IPF 67 allow all from $serverip to any 21001 \$IPF 68 allow all from 127.0.0.0/8 to any 21001 \$IPF 69 deny all from any to me 21001 \$IPF 70 allow all from $serverip to any 21002 \$IPF 71 allow all from 127.0.0.0/8 to any 21002 \$IPF 72 deny all from any to me 21002 \$IPF 73 allow all from $serverip to any 21003 \$IPF 74 allow all from 127.0.0.0/8 to any 21003 \$IPF 75 deny all from any to me 21003 \$IPF 76 allow all from $serverip to any 21004 \$IPF 77 allow all from 127.0.0.0/8 to any 21004 \$IPF 78 deny all from any to me 21004 \$IPF 79 allow all from $serverip to any 21061 \$IPF 80 allow all from 127.0.0.0/8 to any 21061 \$IPF 81 deny all from any to me 21061 \$IPF 82 allow all from $serverip to any 21099 \$IPF 83 allow all from 127.0.0.0/8 to any 21099 \$IPF 84 deny all from any to me 21099 #BYKWB \$IPF 10000 allow all from any to any via lo0 \$IPF 20000 deny all from any to 127.0.0.0/8 \$IPF 30000 deny all from 127.0.0.0/8 to any \$IPF 40000 allow all from any to any" >> /etc/ipfw.rules clear echo "Kurulum bitti saldırı almayacaksınız." echo "Reboot lazım atıyorum.." sleep 3 reboot cd /root rm -rf firewall.sh ;; *) clear echo "Yanlış tuş." echo "Bekleyin yeniden başlatıyorum.." sleep 2 sh firewall.sh esac
Yeteri kadar bakım öğeleride eklediğimize göre güncel açıkları kapatmaya geçelim
3-1)War açığını kapatma
Aşağıdaki diflerden size uygun olanını uygulayın
Game 1765:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Game 2019:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
wlx8Game 2089:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Game 2089M:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Game 34083:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
BNqw3-2)Dice açığını kapatma
Aşağıdaki diflerden size uygun olanını uygulayın
Game 1765:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
kmTAGame 2019:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
aGyoGame 2089:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
i454Game 2089M:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Eas0Game 34083:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
3-3)INTERNAL IP açığını kapatma
Aşağıdaki diflerden size uygun olanını uygulayın
Game 1765:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Game 2019:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Game 2089:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
SF84Game 2089M:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Game 34083:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
3-4)Lisans süresini kaldırma
Aşağıdaki diflerden size uygun olanını uygulayın
Game 1765:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
z2hAGame 2019:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Da4kGame 2089:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Game 2089M:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
O6lQGame 34083:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
7o583-5)Packet Bypass Fix
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
3-6)SEQUENCE_LOG FIX
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
3-7)Buffer Fix
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
3-8)34083 Exploit Fix
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
3-9)Report (CheckClientVersion) Fix
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
3-10)Client Bug fix
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
3-11)"CInputMain__Hack" Paketi fix
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
3-12)Adminpage devredışı bırakma
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
3-13)CMD Açığı fix
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
3-14)Mysql'da ki gereksiz kullanıcıları kaldırma
Mysql > User > Filesi editleyen kişi tarafından konan güvenlik açıklarıdır.
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Bu açıklar ile sizin yaptığınız bütün işlemler yapılır ( Edit, Ban, İtem gönderme, Database silme, Database onarma, Dosya silme v.s )
Resimdeki gibi belirtilenlerden harici kullanıcı varsa kaldırın
3-15)FTP'de ki mysql klasörünü düzenleyin
Herhangi bir A yapımcısının paylaşmış olduğu files linklerini indirdiniz diyelim. Putty'den kurmadan önce indirilen dosyanın içindeki dosyalara bakılması lazım. Dosya içerisine .exe keyloger dosyaları kuruluyor. Mysql puttyeden kurulum aşamasına geldiğinde otomatik olarak keyloger bilgisayarınıza kurulur.
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
".myd", ".myi" "."frm" gibi dosyalar haricinde ".exe" ".dll" gibi uzantılı dosyaları kesinlikle temizleyin
3-16)Can't connect to local Mysql server through socket '/tmp/mysql.sock' (2) FIX
1)Config ve Conf Dosyasına Oluşturulan Farklı Userlerin Kaldırılması
Bu bölümlerde bu user dışında başka user mevcutsa bu şekilde değiştiriniz arkadaşlar. Bu Mysql kurulumunda oluşturduğunuz orjinal tabloları içerir. Eğer bu değiştirilmişte Mysql DB içerisinde sizdeki isimli account mevcut değilse bağlantı sorunu yaşarsınız ve bu bir noktada serverde açık olduğunun göstergesidir. Buraları bu şekilde değiştiriniz.
PLAYER_SQL: localhost mt2 mt2!@# player
COMMON_SQL: localhost mt2 mt2!@# common
LOG_SQL: localhost mt2 mt2!@# log
Aynı Şekilde DB içerisindeki Conf.txt Dosyasını Da Şu Şekilde Düzenleyiniz:
SQL_ACCOUNT = "localhost account mt2 mt2!@# 0"
SQL_PLAYER = "localhost player mt2 mt2!@# 0"
SQL_COMMON = "localhost common mt2 mt2!@# 0"
SQL_HOTBACKUP = "localhost hotbackup mt2 mt2!@# 0"
2)Mysql'u kaldırıp yeniden kurun
3)Freebsd sürümünü güncelleyin
3-17)Mysql To many connection fix:
