Linux/Squid
De GeRgOsNet
Distribution : Debian 5 64bits
- Installation Squid :
apt-get install squid
- Autoriser qu'une certaine plage d'ip :
Ajouter :
acl wifidog src 192.168.21.0/24 #Trafic wifidog http_access allow wifidog
- Rendre le proxy transparent :
http_port 3128 transparent
- Regles iptables à ajouter en cas de proxy transparent :
echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A PREROUTING -s 192.168.21.0 -p tcp --dport 80 -j ACCEPT iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3128 iptables -t nat -A POSTROUTING -j MASQUERADE