본문 바로가기
Programming/Linux

[우분투 16.04.4]ubuntu telnet server install (우분투 텔넷 서버 설치)

by guru_k 2018. 12. 10.
728x90
반응형

ubuntu telnet server install (우분투 텔넷 서버 설치)


install telnet server (텔넷 서버 설치)


1
$ sudo apt-get install xinetd telnetd

cs



Configure telnet server (텔넷 서버 설정)

add below script on /etc/xinetd.d/telnet 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$ vi /etc/xinetd.d/telnet
 
-----------------------
 
# default: off
service telnet
{
 disable = no
 flags = REUSE
 socket_type = stream
 wait = no
 user = root
 server = /usr/sbin/in.telnetd
 log_on_failure += USERID
}

cs



Start telnet server (텔넷 서버 실행)

1
$ sudo /etc/init.d/xinetd restart
cs

Check telnet server (텔넷 서버 테스트)

1
$ telnet < IP or HostName >
cs

or

1
2
3
$ telnet
telnet> open
(to) < IP or HostName
cs

if this error occurs, you should check ACL.

1
2
3
$ telnet 192.88.19.11 23
Trying 192.88.19.11...
telnet: connect to address 192.88.19.11: Connection refused
cs


scan port


1
$ nmap -A <from IP>/32 -p 23
cs


23 port is closed 


1
2
3
4
5
6
7
$ nmap -192.88.19.23/32 -23
 
Starting Nmap 7.01 ( https://nmap.org ) at 2018-12-10 13:08 KST
Nmap scan report for aaa.com (192.88.19.23)
Host is up (0.0014s latency).
PORT   STATE  SERVICE VERSION
23/tcp closed telnet
cs



open 23 ports . be careful of openning ACL

1
$ sudo iptables -A IN_public_allow -p tcp -m tcp --dport 23 -m conntrack --ctstate NEW -j ACCEP
cs


connect telnet


1
2
3
4
5
$ telnet 192.88.19.11 23
Trying 192.88.19.11...
Connected to aaa.com.
Escape character is '^]'.
Password:
cs

done.


728x90
반응형

댓글