[Previo por Fecha] [Siguiente por Fecha] [Previo por Hilo] [Siguiente por Hilo]
[Hilos de Discusión] [Fecha] [Tema] [Autor]rmerino dijo [Thu, Jun 23, 2005 at 12:10:46PM -0500]: > > Hola lista: > > Tengo el siguiente problema y le he dado vueltas y no. le encuentro. > > Tengo varias maquinas Linux que son compartidas, pero hay usuarios a los > cuales no quiero darles servicio de internet (pero si de red interna), como > le hago para que de acuerdo a su login se active o no la salida a internet. Iptables soporta un módulo 'owner'. Te cito un cachito del manual: owner This module attempts to match various characteristics of the packet creator, for locally-generated packets. It is valid in the INPUT, OUT- PUT and POSTROUTING chains, however in the INPUT chain only TCP and UDP packets can be matched. Also note that some packets (such as ICMP ping responses) may have no owner, and hence never match. --uid-owner userid Matches if the packet was created by a process with the given effective user id. --gid-owner groupid Matches if the packet was created by a process with the given effective group id. --pid-owner processid Matches if the packet was created by a process with the given process id. --sid-owner sessionid Matches if the packet was created by a process in the given ses- sion group. No estoy seguro de la sintaxis, porque nunca lo he utilizado, pero supongamos que pones a todos tus usuarios sin derecho de internet en el grupo 2000 - Supongo que será algo así: iptables -A OUTPUT -m owner --gid 2000 -j REJECT iptables -A INPUT -m owner --gid 2000 -j REJECT Esto, nota, no va sobre el firewall, sino sobre cada una de las máquinas. Si pueden convertirse en root, ya bailaste. Salduos, -- Gunnar Wolf - gwolf en gwolf org - (+52-55)1451-2244 / 5623-0154 PGP key 1024D/8BB527AF 2001-10-23 Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF