LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-13-2008, 07:43 PM   #1
darthtimeus
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Rep: Reputation: 0
Cool SQUID 2.6 location_rewrite_program problem


Good day I'm using squid+iptables to give access to a web server located in my Intranet the squid server has two interfaces one to connect to the dmz 192.168.101.30 and one to connect to the intranet 10.74.4.203. When I try to reach a web page located in the server and this web page got redirected (302. Moved Temporarily) I can get throug the server because this message answer with the IP for the server inside the intranet. I used Squidguard to rewrite the location message inside the http response but i can't make this work. I have readed and look for information but i can't find any.

Can any one please give a hand on this. This is my squid.conf

http_port 3128 defaultsite=10.74.4.201
cache_peer 10.74.4.201 parent 80 0 no-query originserver name=RBT_WEB
#cache_peer 10.74.4.201 parent 80 0 no-query proxy-only forceddomain=10.74.4.203 name=RBT_WEB
acl port80 port 80
http_access allow port80
cache_peer_access RBT_WEB allow port80
location_rewrite_program /usr/local/bin/squidGuard -c /usr/local/squidGuard/squidGuard.conf

And this is the squidGuard file

#
# CONFIG FILE FOR SQUIDGUARD
#

dbhome /usr/local/squidGuard/db
logdir /usr/local/squidGuard/log

# REWRITE RULES:
#

rewrite viva_corp {
s@^//10.74.4.201/@//192.168.101.30/\1@i
s@^http://10.74.4.201/(.*)$@http://192.168.101.30/\1@i
s@^(.*)10.74.4.201(.*)$@\1192.168.101.30\2@i
log viva_corp.log
}

#
# SOURCE ADDRESSES:
#
src viva-corp-net {
ip 10.20.0.0/16
}
src viva-dmz {
ip 192.168.101.0/24
ip 10.74.4.0/24
}
#
# DESTINATION CLASSES:
#

acl {
viva-corp-net {
pass any
rewrite viva_corp
}
viva-dmz {
pass any
rewrite viva_corp
}
default {
pass none
rewrite viva_corp
}
}

I'm using iptables with masquerading and DNAT. Any help will be apreciated.

Thank you very much
 
Old 11-19-2008, 09:42 AM   #2
darthtimeus
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Never Mind I just solved the problem.

Thanks anyway
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in squid DrTuN Linux - Networking 5 09-01-2008 12:27 PM
squid problem linuxjamil Linux - Networking 2 05-18-2007 10:40 PM
Squid Problem Peter_APIIT Linux - Server 11 03-28-2007 01:56 AM
Squid problem John Micheal Linux - Software 1 05-07-2005 05:26 PM
SQUID Problem gbg Linux - Software 0 02-06-2004 12:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration