安装了redis但在nmap的扫描中看不到它

安装了redis但在nmap的扫描中看不到它

Redis 已安装并且看起来正在运行:

[me@hsredistest01 ~]$ sudo systemctl status redis
● redis.service - Redis persistent key-value database
   Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/redis.service.d
           └─limit.conf
   Active: active (running) since Mon 2019-04-22 19:03:35 +03; 34min ago
 Main PID: 8780 (redis-server)
   CGroup: /system.slice/redis.service
           └─8780 /usr/bin/redis-server 127.0.0.1:6379

这里说正在运行端口 6379,但是当我扫描正在运行的服务端口时,我看不到它。

[me@hsredistest01 ~]$ sudo nmap -sT -O localhost

Starting Nmap 6.40 ( http://nmap.org ) at 2019-04-22 19:40 +03
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000078s latency).
Other addresses for localhost (not scanned): 127.0.0.1
Not shown: 996 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
25/tcp  open  smtp
111/tcp open  rpcbind
199/tcp open  smux
Device type: general purpose
Running: Linux 3.X
OS CPE: cpe:/o:linux:linux_kernel:3
OS details: Linux 3.7 - 3.9
Network Distance: 0 hops

OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 1.73 seconds

我只想在浏览器中输入 192.168.0.23:6370 并看到类似Redis is fine消息的内容。

答案1

您没有运行nmap到达端口 6379 的扫描,默认仅扫描 1000 个最常见的开放端口

您可以将单个端口传递给 nmap:nmap -p 6379 -sT -O localhost

或者您可以传递一系列端口:nmap -p 1-65535 -sT -O localhost

扫描的端口越多,花费的时间就越长。

另外,请确保您的防火墙允许连接到该端口,否则nmap将看不到它。

相关内容