해당 파일이 경로의 맞지 않는 부분만 변경 하였습니다
http://ttongfly.net/zbxe/?document_srl=43190&mid=linuxsys
http://hgh73.blog.me/90104844643
참조한 싸이트
Portsentry
sudo apt-get install portsentry
설치
http://sentrytools.sourceforge.net/
다행이 싸이트가 살아 있다 ㅎㅎ 위의 링크에는 죽어 있는 링크고 여기가 살아 있는 링크..
sudo gedit /etc/rc.local
아래 내용을 추가
# Port Sentry Setting
portsentry -tcp
portsentry -udp
portsentry -stcp
portsentry -sudp
portsentry -atcp
portsentry -audp
ㅎㅎ 경로를 못찾겠네요.. 그냥 커맨드 상에서는 되내요..
sudo gedit /etc/portsentry/portsentry.ignore
자꾸 초기화 되고 나의 아이피가 등록 안되는 버그 발생 하여 -_-;; 아래 처럼.. 해주는
chattr +i /etc/portsentry/portsentry.ignore
chattr +i /etc/portsentry/portsentry.ignore.static
(변경 불가)
chattr -i /etc/portsentry/portsentry.ignore
(변경 할때) 아래 글(링크) 참조
http://hgh73.blog.me/90104844643
신뢰 할수 있는 ip 허용 해주기
허용 해주는 건 필히 자신의 아이피 만 허용 해주면 되는 군요 상황에 따라 더 추가 해주면 되것네요
필히 적어 놓으세요.. 부팅 해야 적용 되더라고요.. ㅎㅎ;;
아래 처럼 인터넷 마크에 우클릭 하면 정보가 나오는대 그걸 클릭 하면
아래 아이피들이 나온다.. 이걸 클릭 해서 활성화 해주면 된다..

gedit /etc/portsentry/portsentry.conf
아래 내용을 추가 해준다고 한다.. 허용 또는 거부 ip 등록
/etc/portsentry/
# Un-comment these if you are really anal:
TCP_PORTS="1,7,9,11,15,70,79,80,109,110,111,119,138,139,143,512,513,514,515,54
UDP_PORTS="1,7,9,66,67,68,69,111,137,138,161,162,474,513,517,518,635,640,641,6
# Use these if you just want to be aware:
#TCP_PORTS="1,11,15,79,111,119,143,540,635,1080,1524,2000,5742,6667,12345,12346,
#UDP_PORTS="1,7,9,69,161,162,513,635,640,641,700,37444,34555,31335,32770,32771,3
# Use these for just bare-bones
#TCP_PORTS="1,11,15,110,111,143,540,635,1080,1524,2000,12345,12346,20034,32771,
#UDP_PORTS="1,7,9,69,161,162,513,640,700,32770,32771,32772,32773,32774,31337,54
본문 내용중..
#KILL_HOSTS_DENY="ALL: $TARGET$" <=== 이것을 주석처리 하구(저의 경우 주석이 되어 있더군요..)
# iptables support for Linux <=== 끝부분에 있을것임
KILL_ROUTE="/sbin/iptables -A INPUT -s $TARGET$ -j DROP" <=== 이것을 주석 처리를 풀어준다.
iptables 의 기본 옵션으로 -I 로 되어 있을것이다.. 그대로 사용해도 사용이 없으나, iptables를 사용할 사용이라면 -A 를 쓰도록 하자.
(-I 는 최상위로 올라가기에, 즉 최상우선적으로 적용을 시키는 옵션으로 개인적으로 iptables에 허가 ip를 등록시켜둔 상태라서 저는 이렇게 사용합니다..
-A 를 쓰면 -I 으로 적용한것보다 밑에 있게 되어 보기가 편하거든요..)
이건 tcp-wrappers 설치 어려워서 아래 처럼 해보았는대 정상 작동 될지는 모르것다 ㅠㅠ..
python-tcpwrap
libwrap
모두 주석 처리 하였는대도 ㅎㅎ 그냥 작동 안하는 듯 하다 ㅠㅠ.. 에휴 아쉽다..
#TCP_PORTS 이렇게 하는대도 인터넷 하는댄 문제 없다 정상 작동 안하는듯 ㅠㅠ..
http://www.certcc.or.kr/tools/Psionic_Portsentry.html /tools/Psionic_Portsentry.html
http://list.kldp.org/pipermail/tip/2001Sep/0292.html /pipermail/tip/2001Sep/0292.html
첫댓글 http://ubuntuforums.org/showthread.php?t=740442
chattr +i http://blog.ui2.co.kr/kevin/3
http://slog2.egloos.com/3493248