我最近使用以下工具创建了一个 Ubuntu 16.04 VPS数字海洋。我使用以下方式安装了 OpenVPN这个脚本。但我的所有端口都没有打开。只有 22 端口可以工作。我想打开 1194 和 443 端口。请帮忙!
root@SanFrancisco-VPN:~# sudo ufw status
Status: active
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
80 ALLOW Anywhere
443 ALLOW Anywhere
443/tcp ALLOW Anywhere
53 ALLOW Anywhere
22 ALLOW Anywhere
2222 ALLOW Anywhere
4832 ALLOW Anywhere
21/tcp ALLOW Anywhere
6000:6007/tcp ALLOW Anywhere
6000:6007/udp ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
80 (v6) ALLOW Anywhere (v6)
443 (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
53 (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
2222 (v6) ALLOW Anywhere (v6)
4832 (v6) ALLOW Anywhere (v6)
21/tcp (v6) ALLOW Anywhere (v6)
6000:6007/tcp (v6) ALLOW Anywhere (v6)
6000:6007/udp (v6) ALLOW Anywhere (v6)
但是 NMAP 给出了以下结果
root@SanFrancisco-VPN:~# nmap localhost
Starting Nmap 7.01 ( https://nmap.org ) at 2016-11-04 15:25 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.0000070s latency).
Not shown: 999 closed ports
PORT STATE SERVICE
22/tcp open ssh
Nmap done: 1 IP address (1 host up) scanned in 1.59 seconds
root@SanFrancisco-VPN:~# sudo netstat -ntlp
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:22 0.0.0.0:* LISTEN 1334/sshd
tcp6 0 0 :::22 :::* LISTEN 1334/sshd