da wally » gio feb 24, 2005 18:13
Dovrei isolare un computer da una lan.
<BR>Per far cio´ ho creato un rc.iptables che viene lanciato da rc.local all´avvio.
<BR>Per essere piu´ sicuro ho cercato di bloccare tale computer riconoscendolo dal mac della scheda di rete.
<BR>Ma a quanto pare lo script non funziona.
<BR>
<BR>In sostanza vorrei che il firewall bloccasse ogni connessione dal quel computer all´host possessore del firewall. Se e´ possibile vorrei che l´host possa comunque accedere alle condivisioni del computer "isolato" e possa ricevere ping ed inviare pong ad esso.
<BR>
<BR>Aiuto, please....
<BR>
<BR>P.S. Allego lo script fallato
<BR>
<BR><!-- BBCode Quote Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Quote:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><BLOCKQUOTE>
<BR>#!/bin/sh
<BR>#
<BR># IPTABLES
<BR>#
<BR>
<BR># Create Chain
<BR>
<BR>iptables -N nemesi
<BR>
<BR># TCP
<BR>iptables -A nemesi -o eth0 -d 192.168.0.3 -p tcp -j DROP
<BR>iptables -A nemesi -i eth0 -s 192.168.0.3 -p tcp -m mac --mac-source 00:0E:E8:8A:23:A4 -j DROP
<BR>iptables -A nemesi -i eth0 -d 192.168.0.4 -p tcp -m mac --mac-source 00:0E:E8:8A:23:A4 -j DROP
<BR>
<BR># UDP
<BR>iptables -A nemesi -o eth0 -d 192.168.0.3 -p udp -j DROP
<BR>iptables -A nemesi -i eth0 -s 192.168.0.3 -p udp -m mac --mac-source 00:0E:E8:8A:23:A4 -j DROP
<BR>iptables -A nemesi -i eth0 -d 192.168.0.4 -p udp -m mac --mac-source 00:0E:E8:8A:23:A4 -j DROP
<BR>
<BR># ICMP
<BR>iptables -A nemesi -o eth0 -d 192.168.0.3 -p icmp --icmp-type ! 0 -j DROP
<BR>iptables -A nemesi -o eth0 -d 192.168.0.3 -p icmp --icmp-type ! 8 -j DROP
<BR>iptables -A nemesi -i eth0 -d 192.168.0.4 -p icmp --icmp-type ! 0 -m mac --mac-source 00:0E:E8:8A:23:A4 -j DROP
<BR>iptables -A nemesi -i eth0 -d 192.168.0.4 -p icmp --icmp-type ! 8 -m mac --mac-source 00:0E:E8:8A:23:A4 -j DROP
<BR>
<BR>iptables -A nemesi -i eth0 -s 192.168.0.3 -p icmp --icmp-type ! 0 -m mac --mac-source 00:0E:E8:8A:23:A4 -j DROP
<BR>iptables -A nemesi -i eth0 -s 192.168.0.3 -p icmp --icmp-type ! 8 -m mac --mac-source 00:0E:E8:8A:23:A4 -j DROP
<BR></BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->
<BR>
<BR>Grazie