[Linux] 사설아이피 사용시 telnet, ssh , dns 등등 느리게 접속되는 현상.






퍼온곳 : http://coffeenix.net/board_view.php?cata_code=5&bd_code=91&bpage=
출처 : sec-info 메일링 리스트

---------------------------------------------------------------------
Re: ping, arp, dns관련하여
날짜: Thu, 24 Jul 2003 16:20:59 +0900
보낸이: "Sukbum Hong" <antihong@tt.co.kr>
받는이: "i" <imalcol@mail.affis.or.kr>, <sec-info@cert.certcc.or.kr>

안녕하십니까?

오늘과내일의 홍석범입니다.

#### ping 과 DNS 에 대해

시스템에 따라 ping 은 Reverse lookup 을 실행합니다.
(참고로 Reverse lookup(역질의) 이란 IP 를 호스트이름으로 변경하는 것을 뜻합니다.)
따라서 10.10.10.6 으로 ping 을 하였을 경우 이 IP 를 호스트 이름으로 변경하려는
시도를 하게 되고, 결국 최상위 root DNS 서버로부터 결과를 찾아가게 됩니다.  
그러나 10.10.10.6 은 사설 IP 이므로 어떤 DNS 서버도 이 IP 에 대한
위임 권한을 갖고 있지 않기 때문에 결국은 timeout 이 될 때까지 대기한 후에야
Reverse lookup 을 포기하고 역질의 없이 해당 IP 로 ping 을 시도하게 되는 것입니다.
말씀하신 57초가 바로 DNS 의 timeout 시간이라 할 수 있습니다.

이를 위해서는 다음과 같이 할 수 있습니다.

* -n 옵션 이용
ping -n 10.10.10.6 와 같이 -n 옵션을 이용하면 reverse lookup 을 시행하지 않습니다.

* /etc/hosts 이용
/etc/hosts 는 일종의 소형 DNS 라고 생각하시면 됩니다.
/etc/hosts 에 해당 IP 를 정의해 주면 역질의를 하지 않습니다.

* /etc/named.conf 이용
/etc/named.conf 에 10.10.10.0/8 대역에 대해 위임 권한을 지정해 주면
최상위 root DNS 서버까지 reverse lookup 을 하지 않게 됩니다.


#### arp 와 DNS 에 대해

arp -a 를 실행하였을 때의 결과를 보면 쉽게 이해할 수 있습니다.

# arp -a
? (192.168.1.246) at 00:D0:B7:9A:25:20 [ether] on eth0
? (192.168.1.191) at 00:D0:B7:88:E8:0D [ether] on eth0
webserver (192.168.1.45) at 00:01:02:54:C2:E7 [ether] on eth0
? (192.168.1.102) at <incomplete> on eth0

여기에서 eth0 인터페이스를 통해 192.168.1.246 의 MAC 주소는 00:D0:B7:9A:25:20,
192.168.1.191의 MAC 주소는 00:D0:B7:88:E8:0D 라는 것을 알 수 있습니다.
그런데, 제일 앞 부분이 다른 3줄은  ? 으로 되어 있는데, 세 번째줄만 ? 대신
webserver 라고 되어 있습니다.  
이 차이점은 ? 은 각각의 IP 주소에 대해 역질의(reverse lookup)를 했는데,
해당하는 호스트 이름이 존재하지 않아 ? 로 표시된 것이고 192.168.1.45의 경우
역질의한 값이  webserver 로 존재하여 위와 같이 표현된 것입니다.

참고가 되셨기를 바랍니다.


감사합니다.
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 삐꾸강아쥐

2009/07/02 09:52 2009/07/02 09:52
이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색, 이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색, 이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색, 이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색, 이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색, 이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색
Response
No Trackback , No Comment
RSS :
http://blog.seabow.pe.kr/rss/response/660

[Linux]Telnet 유저별로 제한하기

출처 : n-kkamagi@nate.com
작성자의 요청이 있을경우 자삭 합니다.

telnet 특정유저 접속제한 하기.

1. telnet-server 패키지가 설치되어 있어야 합니다.

2. /etc/pam.d/remote 수정.

/etc/pam.d/remote

#%PAM-1.0
auth       required     pam_securetty.so
auth       include      system-auth
account    required     pam_nologin.so
account    required     pam_access.so   <============추가
account    include      system-auth
password   include      system-auth

3. /etc/securitty/access.conf 계정 등록.

- : userid : ALL

ex)

- : kkamagi : ALL
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 삐꾸강아쥐

2009/02/16 10:16 2009/02/16 10:16
이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색, 이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색
Response
No Trackback , No Comment
RSS :
http://blog.seabow.pe.kr/rss/response/603

Configuring Telnet/FTP to login as root (Linux)

copyleft by http://www.idevelopment.info/data/Unix/Linux/LINUX_TelnetFTPAsRoot.shtml


Configuring Telnet/FTP to login as root (Linux)

by Jeff Hunter, Sr. Database Administrator

Contents

   1. Red Hat Enterprise Linux: RHEL3 / RHEL4
   2. Red Hat (Fedora Core 1 / Core 2)
   3. Red Hat (Release 7.x - 8.x)

Red Hat Enterprise Linux: RHEL3 / RHEL4

    Enabling Telnet and FTP Services

        Linux is configured to run the Telnet and FTP server, but by default, these services are not enabled. To enable the telnet service, login to the server as the root user account and run the following commands:

        # chkconfig telnet on
        # service xinetd reload
        Reloading configuration: [  OK  ]

        Starting with the Red Hat Enterprise Linux 3.0 release (and in CentOS Enterprise Linux), the FTP server (wu-ftpd) is no longer available with xinetd. It has been replaced with vsftp and can be started from /etc/init.d/vsftpd as in the following:

        # /etc/init.d/vsftpd start
        Starting vsftpd for vsftpd:         [ OK ]

        If you want the vsftpd service to start and stop when recycling (rebooting) the machine, you can create the following symbolic links:

        # ln -s /etc/init.d/vsftpd /etc/rc3.d/S56vsftpd
        # ln -s /etc/init.d/vsftpd /etc/rc4.d/S56vsftpd
        # ln -s /etc/init.d/vsftpd /etc/rc5.d/S56vsftpd


    Allowing Root Logins to Telnet and FTP Services

        Now before getting into the details of how to configure Red Hat Linux for root logins, keep in mind that this is VERY BAD security. Make sure that you NEVER configure your production servers for this type of login.

        Configure Telnet for root logins

        Simply edit the file /etc/securetty and add the following to the end of the file:

        pts/0
        pts/1
        pts/2
        pts/3
        pts/4
        pts/5
        pts/6
        pts/7
        pts/8
        pts/9

        This will allow up to 10 telnet sessions to the server as root.

        Configure FTP for root logins

        Edit the files /etc/vsftpd.ftpusers and /etc/vsftpd.user_list and remove the 'root' line from each file.


Red Hat (Fedora Core 1 / Core 2)

    Enabling Telnet and FTP Services

        Linux is configured to run the Telnet and FTP server, but by default, these services are not enabled. To enable the telnet these service, login to the server as the root userid and edit the files:

            * /etc/xinetd.d/telnet

        In this file, find the line for disable and change it from the value "yes" to "no".

        After changing the above value(s), you will need to restart the xinetd deamon. As the root userid, type the following command:

          % /etc/init.d/xinetd reload

        Starting with the Fedora Core 1 release, the FTP server (wu-ftpd) is no longer available with xinetd. It has been replaced with vsftp and can be started from /etc/init.d/vsftpd as in the following:

        # /etc/init.d/vsftpd start

        If you want the vsftpd service to start and stop when recycling the machine, you can create the following symbolic links:

        # ln -s /etc/init.d/vsftpd /etc/rc3.d/S56vsftpd
        # ln -s /etc/init.d/vsftpd /etc/rc4.d/S56vsftpd
        # ln -s /etc/init.d/vsftpd /etc/rc5.d/S56vsftpd

    Allowing Root Logins to Telnet and FTP Services

        Now before getting into the details of how to configure Red Hat Linux for root logins, keep in mind that this is VERY BAD security. Make sure that you NEVER configure your production servers for this type of login.

        Configure Telnet for root logins

        Simply edit the file /etc/securetty and add the following to the end of the file:

        pts/0
        pts/1
        pts/2
        pts/3
        pts/4
        pts/5
        pts/6
        pts/7
        pts/8
        pts/9

        This will allow up to 10 telnet sessions to the server as root.

        Configure FTP for root logins

        Edit the files /etc/vsftpd.ftpusers and /etc/vsftpd.user_list and remove the 'root' line from each file.


Red Hat (Release 7.x - 8.x)

    Enabling Telnet and FTP Services

        Linux is configured to run the Telnet and FTP server, but by default, these services are not enabled. To enable these services, login to the server as the root userid and edit the files:

            * /etc/xinetd.d/telnet
            * /etc/xinetd.d/wu-ftpd

        In both files, find the line for disable and change it from the value "yes" to "no".

        After changing the above values, you will need to restart the xinetd deamon. As the root userid, type the following command:

          % /etc/init.d/xinetd reload

    Allowing Root Logins to Telnet and FTP Services

        Now before getting into the details of how to configure Red Hat Linux for root logins, keep in mind that this is VERY BAD security. Make sure that you NEVER configure your production servers for this type of login.

        Configure Telnet for root logins

        Simply edit the file /etc/securetty and add the following to the end of the file:

        pts/0
        pts/1
        pts/2
        pts/3
        pts/4
        pts/5
        pts/6
        pts/7
        pts/8
        pts/9

        This will allow up to 10 telnet sessions to the server as root.

        Configure FTP for root logins

        First edit the file /etc/ftpaccess and comment out the 'deny-uid' and 'deny-gid' lines.

        Also, don't forget to remove the 'root' line from /etc/ftpusers


크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 삐꾸강아쥐

2007/12/27 11:34 2007/12/27 11:34
이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색, 이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색, 이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색, 이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색, 이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색, 이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색
Response
No Trackback , No Comment
RSS :
http://blog.seabow.pe.kr/rss/response/487

RHEL5 Telnet 접속시 /etc/resolv.conf 또는 /etc/hosts 등록해야만 접속되는 문제

출처 : http://rhn.redhat.com (errata)

RHBA-2007:1012 - Bug Fix Advisory
정보
 패키지
 영향을 받은 시스템
 
개요
telnet-server bug fix update


발행된 날짜: 07. 11. 15
업데이트된 날짜: 07. 11. 15


주제
Updated telnet-server packages that fixe a bug are now available.


설명
Telnet is a popular protocol for logging in to remote systems over the
Internet. The telnet-server package includes a telnet daemon that
supports remote logins into the host machine. The telnet daemon is
disabled by default.


The telnet daemon refused connections when the reverse records for the
host you were connecting to did not exist, for example, when configured
nameservers were unavailable, and the host you were connecting to was not
in "/etc/hosts". Telnet sessions would terminate with a "Temporary failure
in name resolution: Illegal seek" error.


Users of the telnet-server packages are advised to upgrade to these
updated packages, which resolve this issue.


해결책
Before applying this update, make sure that all previously-released
errata relevant to your system have been applied.


This update is available via Red Hat Network. Details on how to use
the Red Hat Network to apply this update are available at
http://kbase.redhat.com/faq/FAQ_58_10188



영향을 받은 채널
Red Hat Enterprise Linux (v. 5 64-bit IBM System z)
Red Hat Enterprise Linux (v. 5 for 32-bit x86)
Red Hat Enterprise Linux (v. 5 for 64-bit IBM POWER)
Red Hat Enterprise Linux (v. 5 for 64-bit Itanium)
Red Hat Enterprise Linux (v. 5 for 64-bit x86_64)
Red Hat Enterprise Linux Desktop (v. 5 for 32-bit x86)
Red Hat Enterprise Linux Desktop (v. 5 for 64-bit x86_64)


해결방안 :

https://bugzilla.redhat.com/show_bug.cgi?id=253392


수정
telnetd refuses connections if nameserver(s) down


키워드
dns, host


CVEs
(없음)


OVAL
(없음)


참조 정보
(없음)


알림
(없음)

에레타 내용
추가 : http://rhn.redhat.com/errata/RHBA-2007-1012.html

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 삐꾸강아쥐

2007/12/19 08:34 2007/12/19 08:34
이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색, 이올린 태그검색올블로그 태그검색테크노라티 태그검색태그스토리 태그검색티스토리 태그검색
Response
No Trackback , No Comment
RSS :
http://blog.seabow.pe.kr/rss/response/483


Calendar

«   2010/09   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    

Site Stats

Total hits:
81125
Today:
33
Yesterday:
87
qrcode
QrooQroo code generator