기본 콘텐츠로 건너뛰기

패킷양으로 제한 하기

This will reject connections above 15 from one source IP.
iptables -A INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above 15 --connlimit-mask 32 -j REJECT --reject-with tcp-reset

In this 160 new connections (packets really) are allowed before the limit of 150 NEW connections (packets) per second is applied.

iptables -A INPUT -m state --state RELATED,ESTABLISHED -m limit --limit 150/second --limit-burst 160 -j ACCEPT

?? 이거는 뭔지 해석을..
# iptables -A INPUT -i eth0 -m string —algo bm —string "facebook.com" -j DROP
# iptables -A OUTPUT -m string —algo bm —string "facebook.com" -j DROP
# iptables -A FORWARD -i eth0 -m string —algo bm —string "facebook.com" -j DROP


iptables -I FORWARD  -m string --string "facebook.com" --algo bm --from 1 --to 600 -j REJECT
참고로, l7-filter는 세션 첫 10개 패캣 또는 2kB(최대64kB)만 검색합니다. 그 이후는 매칭이 안되죠.

댓글

이 블로그의 인기 게시물

dmesg 메시지 실시간으로 보기

참조사이트 http://imitator.kr/Linux/556 # tail -f /var/log/messages # tail -f |dmesg //기본 2초 단위로 갱신 된다. # watch "dmesg | tail -f" //1초 단위로 갱신하면서 보여준다. # watch -n 1 "dmesg | tail -f" // 보여주는 줄을 20으로 늘린다. (기본 10줄) # watch -n 1 "dmesg | tail -f -n 20"

java 특정 디렉토리에 있는 파일 목록을 읽어내기, 정렬해서 가져오기

폴더 리스트 가져오기 String path="C:\"; File dirFile=new File(path); File []fileList=dirFile.listFiles(); for(File tempFile : fileList) {   if(tempFile.isFile()) {     String tempPath=tempFile.getParent();     String tempFileName=tempFile.getName();     System.out.println("Path="+tempPath);     System.out.println("FileName="+tempFileName);     /*** Do something withd tempPath and temp FileName ^^; ***/   } } 정렬해서 가져오기 import java.io.FileFilter; import java.io.IOException; import java.util.Arrays; import java.util.Date; import org.apache.commons.io.comparator.LastModifiedFileComparator; import org.apache.commons.io.filefilter.FileFileFilter; public class LastModifiedFileComparatorTest { public static void main(String[] args) throws IOException { File directory = new File("."); // get just files, not directories File[] files = directory.listFiles((FileFilter) FileFileFilter.FILE); System.out.println("Defaul...