2014년 2월 24일 월요일

HP-UX 서비스 포트 수정하기(exchange a service port)

telnet 접속자 확인하기
root@vm180   [/root]
# ps -ef | grep telnetd
    root 28823 27151  0 14:35:34 pts/ta    0:00 grep telnetd
    root 27150  1226  0 10:20:33 pts/ta    0:00 telnetd -b /etc/issue
    root 28805  1226  0 14:35:29 pts/tb    0:00 telnetd -b /etc/issue

root@vm180   [/root]
# ps -ef | grep ftpd
    root 28829 27151  1 14:36:01 pts/ta    0:00 grep ftpd
    root 28825  1226  0 14:35:46 ?         0:00 ftpd: vm181: root: IDLE

root@vm180   [/root]
# netstat -an |grep 59.29.225.180
tcp        0      0  59.29.225.180.1712     59.29.225.180.49208     ESTABLISHED
tcp        0      0  59.29.225.180.21       59.29.225.181.62304     ESTABLISHED
tcp        0      2  59.29.225.180.23       59.29.224.55.51161      ESTABLISHED
tcp        0      0  59.29.225.180.49208    59.29.225.180.1712      ESTABLISHED
tcp        0      0  59.29.225.180.23       59.29.225.181.62305     ESTABLISHED

서비스 포트 정보 수정하기
root@vm180   [/root]
# vi /etc/services
"/etc/services" [Read only] 224 lines, 12666 characters
# @(#)B.11.31_LRservices $Revision: 1.32.214.7 $ $Date: 97/09/10 14:50:42 $
#
# This file associates official service names and aliases with
# the port number and protocol the services use.
#
# Some of the services represented below are not supported on HP-UX.
# They are provided solely as a reference.
#
# The form for each entry is:
# <official service name>  <port number/protocol name>  <aliases>
#
# See the services(4) manual page for more information.
# Note: The entries cannot be preceded by a blank space.
#
tcpmux         1/tcp                 # TCP port multiplexer (RFC 1078)
echo           7/tcp                 # Echo
echo           7/udp                 #
discard        9/tcp  sink null      # Discard
discard        9/udp  sink null      #
systat        11/tcp  users          # Active Users
daytime       13/tcp                 # Daytime
daytime       13/udp                 #
qotd          17/tcp  quote          # Quote of the Day
chargen       19/tcp  ttytst source  # Character Generator
chargen       19/udp  ttytst source  #
ftp-data      20/tcp                 # File Transfer Protocol (Data)
ftp           21/tcp                 # File Transfer Protocol (Control)
telnet        230/tcp                 # Virtual Terminal Protocol

저장후에 적용하려면
root@vm180   [/]
# inetd –c

댓글 없음:

댓글 쓰기