Eu quero configurar um banco de dados de teste em um vm para fins de desenvolvimento, mas não consigo me conectar ao servidor através da rede.
Eu tenho o Ubuntu 12.04vm instalado no host 12.04 no VirtualBox 4.2.4 configurado para
- Modo de rede em ponte
- Promíscuo Permitir Todos
Quando tento pingar o convidado virtual de qualquer cliente de rede, recebo o resultado esperado.
PING 192.168.1.209 (192.168.1.209) 56(84) bytes of data.
64 bytes from 192.168.1.209: icmp_req=1 ttl=64 time=0.427 ms
...
O acesso à Internet dentro da vm é normal
Mas quando eu nmap não recebo nada!
jeremy@bangkok:~$ nmap -sV -p 1-65535 192.168.1.209
Starting Nmap 5.21 ( http://nmap.org ) at 2012-11-15 18:39 CST
Nmap scan report for jeremy (192.168.1.209)
Host is up (0.0032s latency).
All 65535 scanned ports on jeremy (192.168.1.209) are closed
Service detection performed. Please report any incorrect results at http://nmap.org/submit/
Nmap done: 1 IP address (1 host up) scanned in 0.88 seconds
ufw e iptables na VM ...
jeremy@jeremy:~$ sudo service ufw stop
[sudo] password for jeremy:
ufw stop/waiting
jeremy@jeremy:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Eu fiz a varredura e não tenho motivos para acreditar que meu roteador está bloqueando as portas internas.
jeremy@bangkok:~$ nmap -v 192.168.1.2
Starting Nmap 5.21 ( http://nmap.org ) at 2012-11-15 18:44 CST
Initiating Ping Scan at 18:44
Scanning 192.168.1.2 [2 ports]
Completed Ping Scan at 18:44, 0.00s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 18:44
Completed Parallel DNS resolution of 1 host. at 18:44, 0.03s elapsed
Initiating Connect Scan at 18:44
Scanning 192.168.1.2 [1000 ports]
Discovered open port 445/tcp on 192.168.1.2
Discovered open port 139/tcp on 192.168.1.2
Discovered open port 3306/tcp on 192.168.1.2
Discovered open port 80/tcp on 192.168.1.2
Discovered open port 111/tcp on 192.168.1.2
Discovered open port 53/tcp on 192.168.1.2
Discovered open port 5902/tcp on 192.168.1.2
Discovered open port 8090/tcp on 192.168.1.2
Discovered open port 6881/tcp on 192.168.1.2
Completed Connect Scan at 18:44, 0.02s elapsed (1000 total ports)
Nmap scan report for 192.168.1.2
Host is up (0.0017s latency).
Not shown: 991 closed ports
PORT STATE SERVICE
53/tcp open domain
80/tcp open http
111/tcp open rpcbind
139/tcp open netbios-ssn
445/tcp open microsoft-ds
3306/tcp open mysql
5902/tcp open vnc-2
6881/tcp open bittorrent-tracker
8090/tcp open unknown
Read data files from: /usr/share/nmap
Nmap done: 1 IP address (1 host up) scanned in 0.08 seconds
Responder ...
Acontece que todas as portas estavam abertas para a rede. Eu instalei o ssh aberto e confirmei. Então eu editei meu banco de dados para ouvir IPs externos e tudo estava bem.