TCP-Wrapper에 관하여

익명 사용자의 이미지

안녕하세여^^ 리눅스를 배운지 얼마 안되는 학생입니다.

TCP-Wrapper에 관하여 질문이 있어서 글을 올립니다.

TCP-Wrapper을 할려면 /etc/hosts.allow /etc/hosts.deny 파일을

손보면 되는거로 알고 있습니다. 그리고 /etc/hosts.denyck에 막는 스크립을
사용

했습니다.

vi /etc/hosts.allow

in.telnetd LOCAL 203.230.158.211 이렇게 했고여

vi /etc/hosts.deny

in.telnetd ALL twist ( /etc/hosts.denyck Y Y %a %c %d %h %n %p %s %u )
&
ipop3d ALL twist ( /etc/hosts.denyck Y Y %a %c %d %h %n %p %s %u ) &

vi /etc/hosts.denyck

------------------------- start
#!/bin/sh

################################# 변수 정의 부분

# 메일 수신자
mailto=root

# 화면출력 여부, 메일전송 여부
dsp=${1}; msg=${2}

# 접속자 정보 등
a=${3}; c=${4}; d=${5}; h=${6}; n=${7}; p=${8}; s=${9}; u=${10}

# 현재 시간
time=`date`

# 접속시도자 소속 서버의 finger 정보
finger=`/usr/bin/finger -l @$h 2> /dev/null`

################################ 화면 출력부문

if [ "$dsp" = Y ]; then

/bin/echo "
===================================
접속이 허용되지 않습니다.
===================================

Access Time $time
Client host address $a
Client information $c
Client host name(or IP) $h
Client host name $n
Client user name $u

"

fi

################################ 메일 송신부문

if [ "$msg" = Y ]; then

/bin/echo "
===============================
접속 거부자 상세정보
===============================

Access Time $time
Access client host address $a
Access client information $c
The daemon process name $d
Access client host name(or IP) $h
Access client host name $n
The daemon process id $p
Server information $s
Access client user name $u

-------------------------------------------------------------------------
-
Access client finger
information
-------------------------------------------------------------------------
-
$finger
-------------------------------------------------------------------------
-

" | \
/bin/mail -s "tcp_wrapper report [$d]" $mailto

fi
------------------------- end

접속 허용과 불허용은 잘 되는데여 스크립트의 내용이 아니 나옵니다. 메일도 오는데 메일에도

스크립트 내용은 아니 나옵니다. 스크립트 퍼미션도 755로 바꾸었습니다.

하나더 있는데여 접근은 불허용한데서 접속으로하면 슈퍼데몬에서 펠이 나는데 그것은 왜그럴까여?

에러는 아니 나오는데 내용을 확인 할 수 없으니 답답합니다.

부탁드립니다.....

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.