Re: [aide] iptables
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.
Reply to: