{result = SELECT inet_ntoa( nodes.ipaddr ) as ip, nodes.name FROM nodes, networks WHERE networks.address = ( nodes.ipaddr & inet_aton( networks.mask ) ) AND (networks.name = "NAZWA_SIECI")}
Z tego skorzystalem. Calosc dla potomnych:
{if (fileexists("/etc/lms/scripts/warn.daemon")) deletefile("/etc/lms/scripts/warn.daemon"); /if;}
/usr/local/sbin/iptables -t nat -F WARNING
{result = SELECT inet_ntoa( nodes.ipaddr ) as ip, nodes.name, nodes.warning
FROM nodes,
networks WHERE networks.address = ( nodes.ipaddr & inet_aton( networks.mask ) ) AND (networks.name = "NAZWA_SIECI")}
{if (number(result)) for (i=0; i<number(result); i++) if (number(result[i].warning)) }/usr/local/sbin/iptables -t nat -A WARNING -s {result[i].ip} -p tcp -j REDIRECT --to-port 80\n{ /if; /for; /if}\n /usr/local/sbin/iptables -t nat -A WARNING -j RETURN\n
-- Pozdrawiam Krzysztof A. Michalski
_______________________________________________ lms mailing list lms@lists.lms.org.pl http://lists.lms.org.pl/mailman/listinfo/lms