Dear all,
I am shamed to tell you that I have same old problem with transparent
proxying. Please help me out with this.
I have created a squid 2.6 stable 21 proxy on RHEL 5.4 (Default rhel
squid package). A caching DNS Server on the same machine. IPTABLES for
packet filtering and for maing proxy transparent. I have Freeradius in
WPA2-Enterprise mode with LDAP and SAMBA for user autentication.
Internet interface 192.168.10.69 - eth0 :- connected to Wireless
AP/ROUTER where NATing to our PUBLIC IP is taking place vis some
switches in between.
LAN Interface 10.10.10.1 - eth1 :- where my wired clients and wireless
AP is connected using an L2 Swich.
Everything is working fine but transparent proxying is not working for
https ftp traffic. However there is no point in having a transparent
proxy with out https support. Is there any thing to do if nating is
taking place in my WIRELESS ACCESS POINT/ROUTER.
Please refer to my squid and iptables configuration below and kindly
advice me to make my proxy transparent.
Squid.conf:
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443
acl Safe_ports port 80 � � � �# http
acl Safe_ports port 21 � � � �# ftp
acl Safe_ports port 443 � � � �# https
acl Safe_ports port 70 � � � �# gopher
acl Safe_ports port 210 � � � �# wais
acl Safe_ports port 1025-65535 � �# unregistered ports
acl Safe_ports port 280 � � � �# http-mgmt
acl Safe_ports port 488 � � � �# gss-http
acl Safe_ports port 591 � � � �# filemaker
acl Safe_ports port 777 � � � �# multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
acl wifi_users src 10.10.10.0/24
acl internal_users src 192.168.0.0/24
acl trc_users src 192.168.1.0/24
acl net src 192.168.10.69
acl blocked_sites dstdomain "/etc/squid/blocked_sites"
acl blocked_words url_regex -i "/etc/squid/blocked_words
acl blocked_files urlpath_regex "/etc/squid/blocked_files
acl officetime time MTWHF 9:00-18:00
acl FTP proto FTP
http_access deny blocked_sites officetime
http_access deny blocked_words
http_access deny blocked_files officetime
http_access allow net
http_access allow wifi_users
http_access allow internal_users
http_access allow trc_users
always_direct allow FTP
http_access allow localhost
http_access deny all
icp_access allow all
http_port 10.10.10.1:3128 transparent
hierarchy_stoplist cgi-bin ?
cache_mem 52 MB
maximum_object_size_in_memory 256 KB
cache_dir aufs /var/spool/squid 5000 16 256
cache_swap_low 90
cache_swap_high 95
access_log /var/log/squid/access.log squid
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
refresh_pattern ^ftp: � � � �1440 � �20% � �10080
refresh_pattern ^gopher: � �1440 � �0% � �1440
refresh_pattern . � � � �0 � �20% � �4320
quick_abort_min 0 KB
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
half_closed_clients off
visible_hostname proxy.hclproxy.int
hosts_file /etc/hosts
memory_pools off
client_db off
coredump_dir /var/spool/squid
IPTables Rules:
# Generated by iptables-save v1.3.5 on Wed Feb �2 18:17:47 2011
*nat
:PREROUTING ACCEPT [504:35119]
:POSTROUTING ACCEPT [809:64589]
:OUTPUT ACCEPT [812:65874]
-A PREROUTING -s 10.10.10.0/255.255.255.0 -i eth1 -p tcp -m tcp
--dport 80 -j REDIRECT --to-ports 3128
-A POSTROUTING -o eth0 -p tcp -m tcp --dport 443 -j MASQUERADE
COMMIT
# Completed on Wed Feb �2 18:17:47 2011
# Generated by iptables-save v1.3.5 on Wed Feb �2 18:17:47 2011
*filter
:INPUT ACCEPT [187:19660]
:FORWARD ACCEPT [188:10461]
:OUTPUT ACCEPT [10599:3070662]
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i eth0 -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -i eth2 -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 3128 -m state --state NEW -j ACCEPT
-A INPUT -p tcp -m multiport --dports 389,636 -m state --state NEW -j ACCEPT
-A INPUT -p tcp -m multiport --dports 445,139 -m state --state NEW -j ACCEPT
-A INPUT -p udp -m multiport --dports 137,138 -m state --state NEW -j ACCEPT
-A INPUT -p udp -m multiport --dports 1812,1813,1814 -m state --state
NEW -j ACCEPT
-A INPUT -p udp -m udp --dport 53 -m state --state NEW -j ACCEPT
-A INPUT -p tcp -m tcp --dport 53 -m state --state NEW -j ACCEPT
-A INPUT -p tcp -m multiport --dports 25,465 -m state --state NEW -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m multiport --dports 110,995 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m multiport --dports 143,993 -j ACCEPT
-A INPUT -p udp -m udp --dport 123 -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
COMMIT
# Completed on Wed Feb �2 18:17:47 2011
# Generated by iptables-save v1.3.5 on Wed Feb �2 18:17:47 2011
*mangle
:PREROUTING ACCEPT [11619:2765966]
:INPUT ACCEPT [11345:2750861]
:FORWARD ACCEPT [206:11535]
:OUTPUT ACCEPT [11078:3148652]
:POSTROUTING ACCEPT [11423:3195498]
COMMIT
-- Regards, Jayakrishnan. L Visit: www.foralllinux.blogspot.com www.jayakrishnan.bravehost.comReceived on Thu Feb 03 2011 - 11:51:00 MST
This archive was generated by hypermail 2.2.0 : Thu Feb 03 2011 - 12:00:02 MST