Forum

Fedora 9 üzeri...
 
Bildirimler
Hepsini Temizle

Fedora 9 üzerinde Squid 3 Transparent calismiyor

3 Yazılar
3 Üyeler
0 Likes
411 Görüntüleme
(@anonim)
Gönderiler: 1779
Famed Member
Konu başlatıcı
 

Squid PC


Internet --->   eth1 : 192.168.0.249 


Local Net -----> eth2 : 10.21.27.254


 


Squid Configurasyonu :


http_port 3128 transparent
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
access_log /var/log/squid/access.log squid
hosts_file /etc/hosts
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern .               0       20%     4320
acl allnetwork 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 563      # https, snews
acl SSL_ports port 873          # rsync
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443 563     # https, snews
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 Safe_ports port 631         # cups
acl Safe_ports port 873         # rsync
acl Safe_ports port 901         # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
acl lan src 192.168.0.0/24
http_access allow localhost
http_access allow lan
http_access deny allnetwork
http_reply_access allow allnetwork
icp_port 3130
icp_access allow allnetwork
cache_dir ufs /var/spool/squid 200 32 256
access_log /var/log/squid/access.log squid
error_directory /usr/share/squid/errors/English
visible_hostname proxyfw.fox.com.tr
always_direct allow allnetwork
coredump_dir /var/spool/squid


 


 


iptables yapilandirması :


modprobe iptable_nat
modprobe ip_conntrack_ftp
modprobe ip_nat_ftp
iptables -F
iptables -t nat -F
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT


iptables -F
iptables -t nat -F
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT


iptables -t nat -A POSTROUTING -o eth1 -s 10.21.27.0/24 -j SNAT --to-source 192.168.0.249


iptables -t nat -A PREROUTING -i eth2 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -A INPUT -j ACCEPT -m state --state NEW,ESTABLISHED,RELATED -i eth2 -p tcp --dport 3128
iptables -A OUTPUT -j ACCEPT -m state --state NEW,ESTABLISHED,RELATED -o eth1 -p tcp --dport 80
iptables -A INPUT -j ACCEPT -m state --state ESTABLISHED,RELATED -i eth1 -p tcp --sport 80
iptables -A OUTPUT -j ACCEPT -m state --state ESTABLISHED,RELATED -o eth2 -p tcp --sport 80



ip forward açık.


10.21.27.0/24 networkunden gateway olarak bilinen squid makinası transparent olarak işlev görmüyor.


INVALID URL hatası veriyor. 


 


 

 
Gönderildi : 28/11/2008 22:19

(@alikemalturker)
Gönderiler: 1016
Noble Member
 

Merhabalar

NAT yapmışsınız ama 

acl lan src 192.168.0.0/24 adresi satırına 10.x.x.x adresini de eklemeniz gerekmez mi? Bu satırla siz sadece 192.168.0.0/24 network ünden gelenlere izin veriyorsunuz.

Şöyle yapalım 

acl lan src 192.168.0.249 10.21.27.0/24

yada hiç uğraşmadan eth1 = 192.168.1.1 eth2=192.168.2.1

acl lan src 192.168.1.1 192.168.2.0/24

Kolay gelsin

 

 
Gönderildi : 29/11/2008 01:46

(@eroldursun)
Gönderiler: 2171
Famed Member
 

http://www.cozumpark.com/forums/thread/50606.aspx  


iptables -t nat -A POSTROUTING -o "ppp+" -j MASQUERADE  bunu kendi kapına göre ayarlayacaksın nete çıkan interface zi yazacaksın eth+ yap gitsin bu kısmı 🙂


bu satır eksik gibi geldi bana

 
Gönderildi : 29/11/2008 01:51

Paylaş: