hostdeny를 이용하시면 됩니다.
/etc/ 안에 기본적인 화일이 3개있습니다.
* hosts.allow 화일 내용(접속 허가할 사용자 입력)
-------------------------------------------------------------------
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
in.telnetd: 접속허용할 아이피
in.telnetd: 접속허용할 아이피
.
.
.
-------------------------------------------------------------------
* hosts.deny 화일내용(모든 접근 거부 - 옵션은 다양합니다.)
-------------------------------------------------------------------
#in.telnetd: ALL: twist ( /etc/hosts.denyck Y Y %a %c %d %h %n %p %s %u ) &
-------------------------------------------------------------------
* hosts.denyck 화일내용 (다른사람 접속시 안내 및 관리자 메일보내기)
-------------------------------------------------------------------
#!/bin/sh
################################ 변수정의부문
# 메일 수신자
mailto= deny at aaa.co.kr # 화면출력 여부, 메일전송 여부
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 "거부자상세정보 [$d]" $mailto
fi
-------------------------------------------------------------------
검색을 해보시면 좀더 많은 정보를 얻을 수 있습니다.
<font color=ff00ff size=5>재발 검색좀 하자구요 ㅡ.ㅡ"</font>
:
: 텔넷에 관한 질문입니다. 특정한 계정을 지정한 컴퓨터 이외에서는
: 접속하지 못하게 설정을 해야 할 필요가 생겼습니다. 즉, 일반적인
: 텔넷 서비스는 제공을 하되, 특정한 계정은 정해진 컴퓨터에서만
: 로그인이 허용되고, 다른 컴퓨터에서는 로그인을 할 수 없어야 하
: 는 것이지요. 아시는 분 답변 부탁드립니다. ^^;;
--
리눅스 영원한 초짜 ㅡ.ㅡ"