Bonjour
Voilà, je cherche à faire un firewall avec iptables sur mon debian (émulation VB).
Problème : Tous marche bien, mais quand je fais un scan nmap avec un autre pc, il me dit que mes ports sont fermer.
Voici mon script :
[code] GNU nano 2.2.4 Fichier : /etc/init.d/firewall Modifié
#!/bin/sh
#réinitialisation des tables
iptables -t filter -F
iptables -t filter -X
#on bloquer tt les ports
iptables -t filter -P INPUT DROP
iptables -t filter -P FORWARD DROP
iptables -t filter -P OUTPUT DROP
#pour ne pas fermer les conctions deja etablie
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
#ne pas se bloquer ns meme
iptables -t filter -A INPUT -i lo -j ACCEPT
iptables -t filter -A OUTPUT -o lo -j ACCEPT
#port 80 http
iptables -t filter -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 80 -j ACCEPT
#port fttp
iptables -t filter -A INPUT -p tcp -m tcp --dport 20 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp -m tcp --dport 20 -j ACCEPT
[/code]
Ce que me donne iptables -L[code]Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all – anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all – anywhere anywhere
ACCEPT tcp – anywhere anywhere tcp dpt:www
ACCEPT tcp – anywhere anywhere tcp dpt:ftp-data
Chain FORWARD (policy DROP)
target prot opt source destination
Chain OUTPUT (policy DROP)
target prot opt source destination
ACCEPT all – anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all – anywhere anywhere
ACCEPT tcp – anywhere anywhere tcp dpt:www
ACCEPT tcp – anywhere anywhere tcp dpt:ftp-data [/code]
Voici se que me donne nmap
Nmap scan report for 10.0.0.17
Host is up (0.00073s latency).
Not shown: 998 filtered ports
PORT STATE SERVICE
20/tcp closed ftp-data
80/tcp closed http
MAC Address: 08:00:27:14:54:67 (Cadmus Computer Systems)
Nmap done: 1 IP address (1 host up) scanned in 4.53 seconds
Pouvez-vous m’aider?
Coordialement Freeride