Travar Acesso WEB [RESOLVIDO]

1. Travar Acesso WEB [RESOLVIDO]

Luis Eduardo Vilella
luivilella

(usa Debian)

Enviado em 01/11/2010 - 18:43h

Pessoal boa noite tem como dar uma Ajuda, tenho que travar o seguinte dhcp + proxy, sendo assim somente pessoas que recebem ip entram na net.
Tenho meu DHCP:

#Subnet StarCopy
subnet 192.168.0.0 netmask 255.255.255.0 {
#range 192.168.0.10 192.168.0.254;
option routers 192.168.0.1; #gateway
option domain-name-servers 192.168.0.1; #MeuDNS
option domain-name "StarCopy";
deny unknown-clients;
}

host sergio { hardware ethernet 00:15:AF:D4:75:70; fixed-address 192.168.0.100; }
host anaMaria { hardware ethernet 70:F1:A1:59:4C:39; fixed-address 192.168.0.104; }
host elton { hardware ethernet 00:1F:E2:A6:3A:29; fixed-address 192.168.0.101; }
host luis { hardware ethernet 00:17:C4:E8:FD:FD; fixed-address 192.168.0.110; }
host pauliane { hardware ethernet 00:1B:B9:E9:37:8A; fixed-address 192.168.0.55; }
host diego { hardware ethernet 00:1D:7D:8A:23:8C; fixed-address 192.168.0.50; }
host luciane { hardware ethernet 00:1D:92:F9:F5:52; fixed-address 192.168.0.88; }
host pedro { hardware ethernet 00:E0:12:34:56:78; fixed-address 192.168.0.3; }

no meu squid:


acl password proxy_auth REQUIRED
acl PEDRO src 192.168.0.3
acl SERGIO src 192.168.0.100
acl ELTON src 192.168.0.101
acl LUI src 192.168.0.110
acl PAULIANE src 192.168.0.55
acl DIEGO src 192.168.0.50
acl LUCIANE src 192.168.0.88
acl ANACLAUDIA src 192.168.0.102
acl ANAMARIA src 192.168.0.104

acl REDE_STARCOPY src 192.168.0.0/24
acl SITES_BLOQUEADOS url_regex "/etc/squid3/url_proibidas"

acl LIBERADOS url_regex "/etc/squid3/permitidos"
acl MSN url_regex -i /gateway/gateway.dll
acl SITES_FORA_DO_CACHE url_regex -i "/etc/squid3/sitesnocache"

acl download_proibidos urlpath_regex .asfv1 .wmv .mp3 .avi .mid .midi .wav .torrent

acl skype_80 url_regex ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:80
acl skype_443 url_regex ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:443
acl skype_ua browser ^skype^

no_cache deny SITES_FORA_DO_CACHE

http_access allow LUI
http_access allow SERGIO
http_access allow ANAMARIA
http_access allow ELTON
http_access allow PEDRO

http_access deny SITES_BLOQUEADOS !LIBERADOS
http_access deny download_proibidos
http_access deny MSN

http_access allow LUCIANE

http_access deny skype_ua
http_access deny skype_80
http_access deny skype_443

http_access allow PAULIANE
http_access allow DIEGO
http_access allow ANACLAUDIA

http_access deny all

Mesmo com estas configuracoes, se coloca um cliente no range da rede, funciona..!!
Nao sei o porque alguem pode ajudar-me???

A nao tenho proxy transparent.


  


2. Re: Travar Acesso WEB [RESOLVIDO]

Luis Eduardo Vilella
luivilella

(usa Debian)

Enviado em 02/11/2010 - 16:02h

Adicionei:


#SERGIO
iptables -A INPUT -s 192.168.0.100 -j ACCEPT

#ANA MARIA
iptables -A INPUT -s 192.168.0.104 -j ACCEPT

#ELTON
iptables -A INPUT -s 192.168.0.101 -j ACCEPT

#LUIS
iptables -A INPUT -s 192.168.0.110 -j ACCEPT

#DIEGO
iptables -A INPUT -s 192.168.0.55 -j ACCEPT

#PAULIANE
iptables -A INPUT -s 192.168.0.50 -j ACCEPT

#LUCIANE
iptables -A INPUT -s 192.168.0.88 -j ACCEPT

#PEDRO
iptables -A INPUT -s 192.168.0.3 -j ACCEPT

iptables -A INPUT -s 192.168.0.0/24 -j DROP

Agora tudo Certo.






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts