Le ven 09/08/2002 � 23:01, Gr�goire Cachet a �crit :
> bonsoir
> 
> si qqun a un peu de temps pour m'aider (et m'expliquer ...) :
> 
> j'essaye de me servir d'iptables pour empecher un ordinateur d'acceder a
> certains sites.
> 
> j'ai deja les regles suivantes pour la masquerade:
> 
> serveur:~# iptables -L -t nat
> Chain PREROUTING (policy ACCEPT)
> target     prot opt source               destination
> 
> Chain POSTROUTING (policy ACCEPT)
> target     prot opt source               destination
> MASQUERADE  all  --  192.168.1.0/24       anywhere
> 
> Chain OUTPUT (policy ACCEPT)
> target     prot opt source               destination
> serveur:~# iptables -L
> Chain INPUT (policy ACCEPT)
> target     prot opt source               destination
> 
> Chain FORWARD (policy ACCEPT)
> target     prot opt source               destination
> ACCEPT     all  --  192.168.1.0/24       anywhere
> 
> Chain OUTPUT (policy ACCEPT)
> target     prot opt source               destination
> serveur:~#
> 
> je voudrais empecher 192.168.1.2 d'acceder au r�seau 213.193.13.0/24
> 
> j'ai essay� :
> iptables -A  OUTPUT -d 213.193.13.0/24 -s 192.168.1.2 -j DROP
> 
> mais ca ne fonctionne pas
> 
> qu'est-ce qui ne va pas ?

Si cette r�gle est sur le r�seau lui-m�me, �a m'a l'air bon.

Si cette r�gle est sur la gateway, c'est pas OUTPUT mais FORWARD.

R�gis.

Répondre à