Est-il normal d'avoir la ligne en gras ci-dessous ?
$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT udp -- anywhere anywhere state NEW udp dpt:ipp
ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-ns
ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-dgm
ACCEPT ah -- anywhere anywhere
ACCEPT esp -- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 state NEW udp dpt:mdns
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:00000
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:00000
ACCEPT udp -- anywhere anywhere state NEW udp dpt:00000
ACCEPT tcp -- anywhere anywhere state NEW tcp dpts:00000:00000
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:00000
ACCEPT all -- 192.168.1.252 anywhere
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Un petit iptables-save pourrait donner un coup de main...
Je demande si il est normal d'avoir cette ligne que j'ai mise moi-même en gras...

Je ne vois pas ce que va m'apporter un iptables-save...



Edit: par acquis de conscience :
$ sudo iptables-save

# Generated by iptables-save v1.4.5 on Mon Mar 22 22:54:53 2010
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
😮UTPUT ACCEPT [12615:1913641]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 631 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 137 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 138 -j ACCEPT
-A INPUT -p ah -j ACCEPT
-A INPUT -p esp -j ACCEPT
-A INPUT -d 224.0.0.251/32 -p udp -m state --state NEW -m udp --dport 5353 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport xxxxx -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport xxxxx -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport xxxxx -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport xxxxx:xxxxx -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport xxxxx -j ACCEPT
-A INPUT -s 192.168.1.252/32 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Mon Mar 22 22:54:53 2010

$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT udp -- anywhere anywhere state NEW udp dpt:ipp
ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-ns
ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-dgm
ACCEPT ah -- anywhere anywhere
ACCEPT esp -- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 state NEW udp dpt:mdns
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:xxxxx
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:xxxxx
ACCEPT udp -- anywhere anywhere state NEW udp dpt:xxxxx
ACCEPT tcp -- anywhere anywhere state NEW tcp dpts:xxxxx:xxxxx
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:xxxxx
ACCEPT all -- 192.168.1.252 anywhere
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Moi aussi j' ai cette ligne, je me demande si ce n' est pas en rapport avec le state RELATED,ESTABLISHED .
Je ne suis pas un spécialiste d'iptables mais ma compréhension est que les 3 lignes
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT udp -- anywhere anywhere state NEW udp dpt:ipp
sont le résultat des 3 lignes
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 631 -j ACCEPT
Dans ce cas la ligne qui me préoccupe est le résultat de
-A INPUT -i lo -j ACCEPT
qui est sensé s'appliquer à l'interface loopback (lo)

Ma compréhension est que la ligne
ACCEPT all -- anywhere anywhere
signifie tout accepter de n'importe où vers n'importe où d'où ma question...
Si tu n'as pas cette ligne "-A INPUT -i lo -j ACCEPT " les connexions locales ne fonctionneront pas.

Il y a plein de composants qui se cause localement ...
Il n'y aura pas / plus grand choses qui fonctionnera.

Fait un netstat -an pour voir toutes tes connexions.

D'autres part :
il vaut mieux faire un iptables -v -L ça te donne plus d'infos et tu aurais vu tout de suite que ça concerne localhost.
Heldwin wrote:J'ai la même chose et je trouve ça bizarre aussi.

En passant, si je ping ma machine depuis une autre, je reçois ça:
icmp_seq=0 Dest Unreachable, Bad Code: 10
Ce qui est encore plus étrange lol

Pourquoi répondre que les ping sont interdits, si la machine répond que les ping sont interdits ??
Ne rien répondre ne serait pas mieux ?

J'ai pas touché au firewall depuis mon installation, il y a 2 semaines environ, mais je sens qu'il va falloir que je change ça 🙂
Si tu veux remplacer REJECT par DROP tu peux ...
philippe_PMA wrote:D'autres part :
il vaut mieux faire un iptables -v -L ça te donne plus d'infos et tu aurais vu tout de suite que ça concerne localhost.
C'est juste l'élément qui me manquait........ Avec le -v on voit qu'effectivement ça ne concerne que le loopback.

Merci pour ton aide.