ricardo oliveira
(usa Debian)
Enviado em 27/07/2012 - 16:58h
andrecanhadas escreveu:
Instale o nmap :
apt-get update
apt-get install nmap
Uso:
nmap 127.0.0.1
nmap ip apache
Vai te falar se as portas estão abertas ou fechadas.
A saida do comando : (Vai mostrar se o INPUT esta liberado)
iptables -L
Basicamente seria isso:
## Estabelece relação de confiança entre maquinas da rede local eth0(rede local)
iptables -A INPUT -i eth0 -s 192.168.0.0/255.255.255.0 -j ACCEPT
iptables -A INPUT -i eth0 -m state --state NEW -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
André, tentei os dois primeiros passos o 1º funcionou certinho e diz que a porta 80 esta aberta para o http, mas o segundo nao funcionou, segue abaixo as linhas se puder me ajudar, obrigado.
++++++++++++++++++++++++++++++++++++++++++++++++
root@pc-ricardo:/home/ricardo# nmap 127.0.0.1
Starting Nmap 5.00 (
http://nmap.org ) at 2012-07-27 16:49 BRT
Interesting ports on localhost (127.0.0.1):
Not shown: 989 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
23/tcp open telnet
25/tcp open smtp
53/tcp open domain
80/tcp open http
111/tcp open rpcbind
139/tcp open netbios-ssn
445/tcp open microsoft-ds
631/tcp open ipp
3128/tcp open squid-http
Nmap done: 1 IP address (1 host up) scanned in 0.29 seconds
root@pc-ricardo:/home/ricardo# nmap ip apache
Starting Nmap 5.00 (
http://nmap.org ) at 2012-07-27 16:50 BRT
Failed to resolve given hostname/IP: ip. Note that you can't use '/mask' AND '1-4,7,100-' style IP ranges
Failed to resolve given hostname/IP: apache. Note that you can't use '/mask' AND '1-4,7,100-' style IP ranges
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.59 seconds