İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

bu hata nasıl gıderılır

rosende

0
İyinet Üyesi
Katılım
30 Ekim 2005
Mesajlar
479
Reaction score
2
scriptı yaptım ama

[root@www bin]# /usr/bin/ip_banla.sh
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
Bad argument `DROP'
Try `iptables -h' or 'iptables --help' for more information.
[root@www bin]#


bu sekılde hata alıyorum nedendır

scriptte bu

#!/bin/bash
#
netstat -ntu|awk '{print $5}'|cut -d: -f1| \
sort|uniq -c|sort -n|grep -v 127.0.0.1| \
awk '{if ($1 > 9) print $2;}' > /tmp/IPLER

while read ipler; do iptables -A INPUT -s $ipler \
-j DROP ; done < /tmp/IPLER
 

okan23

0
İyinet Üyesi
Katılım
29 Eylül 2005
Mesajlar
499
Reaction score
0
while read ipler; do iptables -A INPUT -s $ipler \
-j DROP ; done < /tmp/IPLER
Alıntı Yaparak Cevapla
bunu tek satırda yaz \ kaldırıp
while read ipler; do iptables -A INPUT -s $ipler -j DROP ; done < /tmp/IPLER
 

elmasgunes

0
İyinet Üyesi
Katılım
27 Ocak 2004
Mesajlar
1,443
Reaction score
0
netstat -ntu|awk '{print $5}'|cut -d: -f1|sort|uniq -c|sort -n|grep -v 127.0.0.1|grep -v warning|awk '{if ($1 > 9) print $2;}' > /tmp/IPLER

while read ipler; do iptables -A INPUT -s $ipler -j DROP ; done < /tmp/IPLER

2 satır var, bu satırlar aşağıya geçmeden yazmanız gerekiyor.

Bu şekilde daha sağlıklı çalışacaktır.
 

rosende

0
İyinet Üyesi
Katılım
30 Ekim 2005
Mesajlar
479
Reaction score
2
tek satırda yazmam ıse yaramadı dıger turlude hata verdı tek satırda
 

elmasgunes

0
İyinet Üyesi
Katılım
27 Ocak 2004
Mesajlar
1,443
Reaction score
0
Benim yazdığım şekilde denediniz mi? 1. satırdaki değişikliği yapmanız gerekiyor.
 

okan23

0
İyinet Üyesi
Katılım
29 Eylül 2005
Mesajlar
499
Reaction score
0
bu haliyle gayet güzel çalıştıu bende
Kod:
#!/bin/bash
# 
netstat -ntu|awk '{print $5}'|cut -d: -f1|sort|uniq -c|sort -n|grep -v 127.0.0.1|awk '{if ($1 > 9)  print  $2;}' > /tmp/IPLER

while read ipler; do iptables  -A INPUT -s $ipler  -j DROP ; done < /tmp/IPLER
 

rosende

0
İyinet Üyesi
Katılım
30 Ekim 2005
Mesajlar
479
Reaction score
2
bu halıyle verdıgı hata elmagunesnet bende anlamadım bıryerde hata var
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
/usr/bin/ip_banla.sh: line 4: 127.0.0.1: command not found
/usr/bin/ip_banla.sh: line 6: syntax error near unexpected token `newline'
/usr/bin/ip_banla.sh: line 6: `while read ipler; do iptables -A INPUT -s $ipler -j DROP ; done <


elmagunes net senındekınde verdıgı hata:
 

okan23

0
İyinet Üyesi
Katılım
29 Eylül 2005
Mesajlar
499
Reaction score
0
tek satırda yazmıyorsun işte ya

127.0.0.1: command not found
alt satıra inmiş
nano -w ile aç
 

rosende

0
İyinet Üyesi
Katılım
30 Ekim 2005
Mesajlar
479
Reaction score
2
tek satırda yazılmıs halı

[root@www ~]# /usr/bin/ip_banla.sh
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
Bad argument `DROP'
Try `iptables -h' or 'iptables --help' for more information.
[root@www ~]#



netstat -ntu|awk '{print $5}'|cut -d: -f1|sort|uniq -c|sort -n|grep -v 127.0.0.$

while read ipler; do iptables -A INPUT -s $ipler -j DROP ; done < /tmp/IPLER

yazdıgımda bu sekılde bence baska bıryerlerde sorun var
 

elmasgunes

0
İyinet Üyesi
Katılım
27 Ocak 2004
Mesajlar
1,443
Reaction score
0
Neden en son dediğim şekilde yapmamakta ısrar ediyorsunuz?
 

rosende

0
İyinet Üyesi
Katılım
30 Ekim 2005
Mesajlar
479
Reaction score
2
tamanlıaymadım sanırım dedıgınız sekıl bu degılmı


netstat -ntu|awk '{print $5}'|cut -d: -f1|sort|uniq -c|sort -n|grep -v 127.0.0.1|grep -v warning|awk '{if ($1 > 9) print $2;}' > /tmp/IPLER

while read ipler; do iptables -A INPUT -s $ipler -j DROP ; done < /tmp/IPLER
 

elmasgunes

0
İyinet Üyesi
Katılım
27 Ocak 2004
Mesajlar
1,443
Reaction score
0
netstat -ntu|grep -v 127.0.0.1|grep -v warning|awk '{print $5}'|cut -d: -f1|sort|uniq -c|sort -n|awk '{if ($1 > 9) print $2;}' > /tmp/IPLER

while read ipler; do iptables -A INPUT -s $ipler -j DROP ; done < /tmp/IPLER
Bu şekilde deneyin lütfen.
 

rosende

0
İyinet Üyesi
Katılım
30 Ekim 2005
Mesajlar
479
Reaction score
2
denedım yazdıgınız sekılde aldıgım hata su:

[root@www ~]# /usr/bin/ip_banla.sh
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
warning, got duplicate tcp line.
Bad argument `DROP'
Try `iptables -h' or 'iptables --help' for more information.
[root@www ~]#
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Backlink ve Tanıtım Yazısı için iletişime geçmek için Skype Adresimiz: .cid.1580508955483fe5

seo ajansı , sosyal medya yönetimi
Üst