[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [HS] hardware ou iptables?



Pascal Hambourg a écrit :
Salut,

Remi Suinot a écrit :
Cornichon <cornichonva@gmail.com> a écrit:

Remi Suinot a écrit :
# ping -c2 192.168.2.1 PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted

--- 192.168.2.1 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1007ms

le ping est bloqué à la source à priori.

Ça y ressemble.

donc iptables :)
bien, le problème est donc de savoir comment résoudre ce problème.
Avez vous un lien, s'il vous plait?

Un lien vers quoi ? C'est plutôt à toi d'indiquer si tu utilises un "pare-feu" (front-end d'iptables en fait) et lequel (shorewall, firestarter...), un script maison et quelles sont les règles iptables en place (à voir avec iptables-save).

Pour répondre à la question, une solution consisterait peut-être à regarder la configuration par défaut du pare-feu...

Pour en avoir le coeur net, un petit iptables -L -n -v te donnera des éléments...

Si tu remarques que tous les packets sont droppés quand tu fais ton ping, c'est bien ton pare-feu...

Avant ma config :

root@ether:~# iptables -L -n -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Je bloque tout en sortie :

root@ether:~# iptables -A OUTPUT -p icmp -j DROP
root@ether:~# iptables -L -n -v
Chain INPUT (policy ACCEPT 132 packets, 47965 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 141 packets, 19145 bytes)
pkts bytes target prot opt in out source destination 0 0 DROP icmp -- * * 0.0.0.0/0 0.0.0.0/0 root@ether:~# ping www.free.fr
PING www.free.fr (212.27.48.10) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
^C
--- www.free.fr ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1006ms

root@ether:~# iptables -L -n -v
Chain INPUT (policy ACCEPT 155 packets, 57903 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 165 packets, 22814 bytes)
pkts bytes target prot opt in out source destination 2 168 DROP icmp -- * * 0.0.0.0/0 0.0.0.0/0 Je vois que 2 packets ont été droppés et le log de mon ping ressemble au tien...

Tu ne dois pas être loin...

A++

EQ


Reply to: