Bon, j’aimerai comprendre pourquoi aucun de ces outils ne me donne le même résultats quant aux ports ouverts, fermés, etc … PIRE, ça correspond pas du tout à ce que renvoie iptables -L
[code]nmap -T4 192.168.1.100
Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2006-11-06 01:49 CET
Interesting ports on debian.localdomain (192.168.1.100):
(The 1632 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
98/tcp open linuxconf
111/tcp open rpcbind
139/tcp open netbios-ssn
161/tcp open snmp
162/tcp open snmptrap
443/tcp open https
512/tcp open exec
513/tcp open login
514/tcp open shell
515/tcp open printer
635/tcp open unknown
1026/tcp open LSA-or-nterm
1027/tcp open IIS
1032/tcp open iad3
1433/tcp open ms-sql-s
1434/tcp open ms-sql-m
4899/tcp open radmin
5900/tcp open vnc
8888/tcp open sun-answerbook
12345/tcp open NetBus
12346/tcp open NetBus
16959/tcp open subseven
27374/tcp open subseven
31337/tcp open Elite
32771/tcp open sometimes-rpc5
32772/tcp open sometimes-rpc7
32773/tcp open sometimes-rpc9
32774/tcp open sometimes-rpc11
54320/tcp open bo2k
Nmap finished: 1 IP address (1 host up) scanned in 0.246 seconds[/code]
Déjà là, vu que :
[code]# iptables -L |grep ftp-data && iptables -L |grep ssh; \
cat /etc/services |grep ftp-data && cat /etc/services |grep ssh
ACCEPT tcp – anywhere anywhere tcp spt:ftp-data
ACCEPT tcp – anywhere anywhere tcp dpt:ftp-data
ftp-data 20/tcp
ssh 22/tcp # SSH Remote Login Protocol
ssh 22/udp[/code]
Iptables me donne le port 20 ouvert et le port 22 fermé, nmap le contraire … je continue …
[quote=“Scan Tcp”]Voici les résultats du Scan de l’adresse IP 83.201.xxx.xxx entre le port 20 et 23
Le port TCP 20 est fermé
Le port TCP 21 est ouvert
Le port TCP 22 est fermé
Le port TCP 23 est fermé
[/quote]Encore mieux …
Quant à tcp dump :
# tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
02:20:37.495361 IP 202.155.58.124.2480 > debian.localdomain.radmin-port: . 2264758945:2264758946(1) ack 2228824979 win 16616
02:20:37.553798 IP debian.localdomain.radmin-port > 202.155.58.124.2480: . ack 0 win 0
02:20:37.496225 IP debian.localdomain.32800 > 192.168.1.1.domain: 10107+ PTR? 124.58.155.202.in-addr.arpa. (45)
02:20:37.553497 IP 192.168.1.1.domain > debian.localdomain.32800: 10107 NXDomain 0/1/0 (110)
02:20:37.554025 IP debian.localdomain.32800 > 192.168.1.1.domain: 22714+ PTR? 1.1.168.192.in-addr.arpa. (42)
02:20:37.608428 IP 192.168.1.1.domain > debian.localdomain.32800: 22714 NXDomain 0/1/0 (119)
02:20:42.494326 arp who-has 192.168.1.1 tell debian.localdomain
02:20:42.494845 arp reply 192.168.1.1 is-at 00:xx:xx:xx:xx:xx
02:20:53.194091 IP 24.178.107.97.1035 > debian.localdomain.radmin-port: . 142979337:142979338(1) ack 417437647 win 16616
02:20:53.194148 IP debian.localdomain.radmin-port > 24.178.107.97.1035: . ack 0 win 0
02:20:53.194390 IP debian.localdomain.32800 > 192.168.1.1.domain: 58435+ PTR? 97.107.178.24.in-addr.arpa. (44)
02:20:53.571973 IP debian.localdomain.36645 > by1msg3145606.phx.gbl.1863: P 3307095068:3307095073(5) ack 368311994 win 243 <nop,nop,timestamp 18694023 1770207>
02:20:53.781089 IP by1msg3145606.phx.gbl.1863 > debian.localdomain.36645: P 1:9(8) ack 5 win 65013 <nop,nop,timestamp 1770808 18694023>
02:20:53.781149 IP debian.localdomain.36645 > by1msg3145606.phx.gbl.1863: . ack 9 win 243 <nop,nop,timestamp 18694232 1770808>
02:20:58.193276 IP debian.localdomain.32801 > 192.168.1.1.domain: 58435+ PTR? 97.107.178.24.in-addr.arpa. (44)
02:20:58.249486 IP 192.168.1.1.domain > debian.localdomain.32800: 58435 ServFail 0/0/0 (44)
02:20:58.250294 IP 192.168.1.1.domain > debian.localdomain.32801: 58435 ServFail 0/0/0 (44)
02:20:58.250679 IP debian.localdomain.32801 > 192.168.1.1.domain: 47557+ PTR? 17.107.46.207.in-addr.arpa. (44)
02:20:58.308690 IP 192.168.1.1.domain > debian.localdomain.32801: 47557 1/0/0 (79)
02:21:02.598419 IP 202.97.238.132.35321 > debian.localdomain.1026: UDP, length: 458
02:21:02.598674 IP debian.localdomain.32801 > 192.168.1.1.domain: 50210+ PTR? 132.238.97.202.in-addr.arpa. (45)
02:21:02.657272 IP 192.168.1.1.domain > debian.localdomain.32801: 50210 NXDomain 0/1/0 (134)
Disons que je comprend les lignes de dialogue entre mon poste et la livebox (192.168.1.1), ce que je ne comprend pas :
- pourquoi une ip entre en connexion avec moi sur radmin-port, alors qu’il n’est pas ouvert par iptables …
- idem pour tous les autres ports, qui normalement ne sont pas ouverts …
j’ai ces règles aussi pour chaque table, aprés ouverture des ports que je souhaite :
[quote]# rappel Chain INPUT (policy DROP)
ACCEPT all – anywhere anywhere state RELATED,ESTABLISHED
rappel Chain OUTPUT (policy DROP)
ACCEPT all – anywhere anywhere state NEW,ESTABLISHED[/quote]
et FORWARD, tout est ACCEPT (malgré la police par defaut qui est DROP).
Est-ce que c’est ça qui va pas ?
De plus, je comprend pas pourquoi Aucuns paquets des droppé, ça veut dire que ça drop pas, ou quoi ?
Bref, lequel dit vrai ?