[linux-network] Re: Tranparent Proxy

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Abdullah GÜNEY (abdullah.guney@emo.org.tr)
Date: Wed 07 Jul 2004 - 11:33:58 EEST


Biraz once bir arkadasim soyle bir sey yazmis. Squid conf icindeki acl
kismina gidin.
acl all src 0.0.0.0/0.0.0.0 yazan yeri bulun bunun altına
acl hepsi src 192.168.0.1/32

sonra da biraz alt tarafa
http_access deny all satirini bulun bu satirin ustune de

http_access allow hepsi

kolay gelsin

----- Original Message -----
From: "Hakan Ünuz" <hakan@akgunuz.com>
To: <linux-network@liste.linux.org.tr>
Sent: Wednesday, July 07, 2004 10:07 AM
Subject: [linux-network] Tranparent Proxy

> Selam,
>
> Benim problemim squid'i transparent proxy olarak kullanamamak ...
>
>
> Sistem özellikleri:
> suse linux 9.1 pro. 256 Ram / çift celeron 533 cpu / ve birkaç hdd /
> iki
> ethernet
> eth0 iç network'e bakan ethernet
> eth1 dışarıya adsl modem'e bakan ethernet
> adsl modem üzerinden nat yaptım ve tüm paketlerin eth1'e gelmesini
> sağladım problemsiz çalışıyorum herşey gayet iyi....
> squid kurdum o da problemsiz gayet iyi...
>
> fakat iki haftadır tranparent proxy olayını bir türlü
> çözemedim
>
> aşağıdaki girişlerin sonuna şunu ekliyorum
>
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT
> --to-port 3128
>
> paketleri squid yakalıyor ama bu seferde kullanıcılara Invalid URL
> diye
> mesaj yolluyor
>
> squid access log ise
> -------------------------------------
> 1 192.168.0.99 TCP_DENIED/400 1789 GET
> /search?client=navclient-auto&googleip=E;0&ch=63738105014&ie=UTF-
> 8&oe=UT
> F-8&features=Rank&q=info:http%3A%2F%2Fwww%2Epro2000%2Ecom%2Etr%2F -
> NONE/- text/html
> --------------------------------
> logunu üretiyor ... ama adres doğru ve prerouting i kaldırınca
> herşey
> düzgün çalışıyor
>
> bir türlü çözüm üretemedim
>
>
>
>
>
> iptables girişleri ve routing table şöyle
>
> ---------------- cut here -------------------------------
> my_ipint=192.168.0.100 #eth0
> my_ipext=192.168.1.100 #eth1
>
> # flush default chains
> iptables -F
> iptables -F -t nat
> # for forwarding
> for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
> echo 1 > $f
> done
> ################## INPUT #################
> #FTP DATA#
> iptables -A INPUT -p tcp -s 0/0 -d $my_ipext/32 --dport 20 -j ACCEPT
> #FTP
> iptables -A INPUT -p tcp -s 0/0 -d $my_ipext/32 --dport 21 -j ACCEPT
> #SSH
> iptables -A INPUT -p tcp -s 0/0 -d $my_ipext/32 --dport 22 -j ACCEPT
> #SMTP
> iptables -A INPUT -p tcp -s 0/0 -d $my_ipext/32 --dport 25 -j ACCEPT
> #TIME-XNTP
> iptables -A INPUT -p udp -s 0/0 -d $my_ipext/32 --dport 37 -j ACCEPT
> #BIND
> iptables -A INPUT -p tcp -s 0/0 -d $my_ipext/32 --dport 53 -j ACCEPT
> iptables -A INPUT -p udp -s 0/0 -d $my_ipext/32 --dport 53 -j ACCEPT
> #POP3
> iptables -A INPUT -p tcp -s 0/0 -d $my_ipext/32 --dport 110 -j ACCEPT
> iptables -A INPUT -p udp -s 0/0 -d $my_ipext/32 --dport 110 -j ACCEPT
> #WWW
> iptables -A INPUT -p tcp -s 0/0 -d $my_ipext/32 --dport 80 -j ACCEPT
> #IDENT
> iptables -A INPUT -p tcp -s 0/0 -d $my_ipext/32 --dport 113 -j ACCEPT
> #SNMP
> iptables -A INPUT -p udp -s 0/0 -d $my_ipext/32 --dport 162 -j ACCEPT
> iptables -A INPUT -p udp -s 0/0 -d $my_ipext/32 --dport 161 -j ACCEPT
>
> #input reject
> iptables -A INPUT -p tcp -s 0/0 -d $my_ipext/32 --dport 0:1023 -j DROP
> iptables -A INPUT -p udp -s 0/0 -d $my_ipext/32 --dport 0:1023 -j DROP
> #input reject end
>
> #MASQ
> # eth1 disa bakan ethernet olarak ongorerek yazdim bunu
> iptables -t nat -I POSTROUTING -o eth1 -s 192.168.0.0/24 -j MASQUERADE
> ----------------------------- cut here
> ----------------------------------------
>
> routing table ...
>
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth1
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0
> lo
> 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0
> eth1
>
>
>


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.