
Ubuntu 22.04 서버를 실행하는 Contabo VPS는 실행 중이 firewalld
아니며 설치 및 구성되었지만 현재 무슨 일이 일어나고 있는지 파악하기 위해 중지되었습니다.ufw
fail2ban
nc -4 -k -l -v 173.212.xxx.xxx 1026
포트 1026에서 실행되고 수신 대기하는 프로세스가 있습니다 173.212.xxx.xxx
. 이는 VPS의 공개 IP이며 외부에서 액세스할 수 있습니다(예를 들어 포트 22, 80 및 443은 정상적으로 작동합니다).
어떤 이유로 에 연결할 수 없으며 173.212.xxx.xxx:1026
연결 시간이 항상 초과됩니다. 하지만 SSH와 HTTP/HTTPS의 경우에는 그렇지 않습니다. 다른 포트가 수신되고 있는데 왜 연결할 수 없고 nmap
다음과 같이 표시되는지 궁금합니다.
$ sudo nmap 173.212.xxx.xxx
Starting Nmap 7.80 ( https://nmap.org ) at 2022-12-21 16:11 CET
Nmap scan report for vmdxxx.contaboserver.net (173.212.xxx.xxx)
Host is up (0.0000090s latency).
Not shown: 988 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
110/tcp open pop3
143/tcp open imap
443/tcp open https
587/tcp open submission
993/tcp open imaps
995/tcp open pop3s
1026/tcp open LSA-or-nterm # <-- not working
8088/tcp open radan-http # <-- Janus WebRTC server timing out as well (what I actually try to set up)
8089/tcp open unknown
$ sudo iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp echo-request
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere tcp dpt:submission
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s
ACCEPT tcp -- anywhere anywhere tcp dpt:imap2
ACCEPT tcp -- anywhere anywhere tcp dpt:imaps
Chain FORWARD (policy DROP)
target prot opt source destination
DOCKER-USER all -- anywhere anywhere
DOCKER-ISOLATION-STAGE-1 all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain DOCKER (1 references)
target prot opt source destination
Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target prot opt source destination
DOCKER-ISOLATION-STAGE-2 all -- anywhere anywhere
RETURN all -- anywhere anywhere
Chain DOCKER-ISOLATION-STAGE-2 (1 references)
target prot opt source destination
DROP all -- anywhere anywhere
RETURN all -- anywhere anywhere
Chain DOCKER-USER (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
$ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 988/master
tcp 0 0 173.212.xxx.xxx:1026 0.0.0.0:* LISTEN 38682/nc
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 652/dovecot
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 652/dovecot
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 652/dovecot
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 747/sshd: /usr/sbin
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 988/master
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 652/dovecot
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 913/mysqld
tcp 0 0 127.0.0.1:33060 0.0.0.0:* LISTEN 913/mysqld
tcp 0 0 127.0.0.1:24 0.0.0.0:* LISTEN 652/dovecot
tcp 0 0 127.0.0.1:4190 0.0.0.0:* LISTEN 652/dovecot
tcp 0 0 127.0.0.1:9998 0.0.0.0:* LISTEN 39690/amavisd-new (
tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN 39690/amavisd-new (
tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN 988/master
tcp 0 0 127.0.0.1:10026 0.0.0.0:* LISTEN 39690/amavisd-new (
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 623/systemd-resolve
tcp 0 0 173.212.xxx.xxx:8188 0.0.0.0:* LISTEN 36225/janus
tcp6 0 0 :::587 :::* LISTEN 988/master
tcp6 0 0 :::995 :::* LISTEN 652/dovecot
tcp6 0 0 :::993 :::* LISTEN 652/dovecot
tcp6 0 0 :::110 :::* LISTEN 652/dovecot
tcp6 0 0 :::80 :::* LISTEN 940/apache2
tcp6 0 0 :::22 :::* LISTEN 747/sshd: /usr/sbin
tcp6 0 0 :::25 :::* LISTEN 988/master
tcp6 0 0 :::143 :::* LISTEN 652/dovecot
tcp6 0 0 :::443 :::* LISTEN 940/apache2
tcp6 0 0 :::8089 :::* LISTEN 36225/janus
tcp6 0 0 :::8088 :::* LISTEN 36225/janus
udp 0 0 127.0.0.53:53 0.0.0.0:* 623/systemd-resolve
udp6 0 0 :::5002 :::* 36225/janus
udp6 0 0 :::5004 :::* 36225/janus
udp6 0 0 :::5102 :::* 36225/janus
udp6 0 0 :::5104 :::* 36225/janus
udp6 0 0 :::5106 :::* 36225/janus
원격 호스트에서는 1026
포트 에 연결할 수 있지만 연결할 수 는 없습니다. localhost
그런데 왜? 나는 분명히 뭔가를 놓치고 있습니다. 모든 포트가 외부(예: 구성할 수 있는 곳)에서 차단되는 이유를 아는 사람이 있습니까? fail2ban
몇 년 전에 설정한 것 외에는 아무것도 기억나지 않습니다 . 나는 네트워크 멍청한 놈이야, btw. 시간을 내주셔서 감사합니다! 귀하의 도움에 크게 감사드립니다.