linux.los.ro


Linux Operating System

Limitare conexiuni per IP

Postati aici intrebarile legate de antivirus, firewall, criptari, vulnerabilitati, etc.

Limitare conexiuni per IP

Postby CrackerX » Mon Jul 01, 2013 2:33 pm

Salutare. Am un server linux pe care tin cateva site-uri. Din cand in cand am atacuri pe http si site-urile nu mai sunt disponibile.
Cum pot limita din iptables conexiunile facute de catre acelasi ip?
CrackerX
 
Posts: 3
Joined: Mon Jul 01, 2013 2:31 pm

Re: Limitare conexiuni per IP

Postby inferno » Mon Jul 01, 2013 2:35 pm

Code: Select all
iptables -A INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above 10 -j REJECT --reject-with tcp-reset

pentru a limita conexiunile la 10...
inferno
Site Admin
 
Posts: 7
Joined: Fri Jun 14, 2013 4:13 pm

Re: Limitare conexiuni per IP

Postby CrackerX » Wed Jul 10, 2013 5:11 pm

Merge, mersi frumos.
Si ca sa vad cate conexiuni am in apache?
CrackerX
 
Posts: 3
Joined: Mon Jul 01, 2013 2:31 pm

Re: Limitare conexiuni per IP

Postby inferno » Wed Jul 10, 2013 5:13 pm

numarul de conexiuni pe portul 80

Code: Select all
netstat -plan | grep :80 | wc -l

eventual daca vrei sa vezi si o lista sortata de IP-uri si cate conexiuni face fiecare

Code: Select all
netstat -plan |grep :80|awk '{print $5}' |cut -d: -f1 |sort |uniq -c |sort -n
inferno
Site Admin
 
Posts: 7
Joined: Fri Jun 14, 2013 4:13 pm

Re: Limitare conexiuni per IP

Postby vaiybora » Thu Oct 19, 2017 8:18 am

I really like you post good topic,Thanks for your sharing.

ทองดีฟันขาว

Image
vaiybora
 
Posts: 25
Joined: Tue Oct 17, 2017 11:31 am


Return to Securitate

Who is online

Users browsing this forum: No registered users and 1 guest

cron