nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

squid configuration problem

This is a discussion on squid configuration problem within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; Hi , I need to configure squid for a tranparent proxy ...i have implement this settings in my squid.conf . ...


Go Back   nixCraft Linux Forum > Linux Distribution > CentOS / RHEL / Fedora

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 04-14-2008, 01:06 PM
Junior Member
User
 
Join Date: Jun 2007
My distro: Debian
Posts: 15
Rep Power: 0
jhn_daz@yahoo.com is on a distinguished road
Unhappy squid configuration problem

Hi ,

I need to configure squid for a tranparent proxy ...i have implement this settings in my squid.conf .

/etc/squid/squid.conf

cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log

acl abc_network src 192.168.111.0/24
acl all src 0.0.0.0/0.0.0.0

http_access allow abc_network

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

also implement this in my iptables ..

iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to 192.168.111.116:3128
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128

iptables -L

[root@testnut squid]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 reference
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT esp -- anywhere anywhere
ACCEPT ah -- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT tcp -- anywhere anywhere tcp dpt:ipp
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ftp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:nfs
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-ns
ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-dgm
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:netbios-ssn
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:microsoft-ds
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:telnet
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

i have choose this configuration guid from this site

Linux: Setup a transparent proxy with Squid in three easy steps

but when i am trying to retart squid it fails ..

Stopping squid: /etc/init.d/squid: line 82: 25723 Aborted $SQUID -k check >>/var/log/squid/squid.out 2>&1
[FAILED]
init_cache_dir /var/spool/squid... /etc/init.d/squid: line 54: 25724 Aborted $SQUID -z -F -D >>/var/log/squid/squid.out 2>&1
Starting squid: /etc/init.d/squid: line 53: 25725 Aborted $SQUID $SQUID_OPTS >>/var/log/squid/squid.out 2>&1
[FAILED]

Out put for squid.out

Squid Cache (Version 2.6.STABLE6): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.008 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
2008/04/12 16:19:22| parseConfigFile: line 9 unrecognized: 'httpd port 3128'
2008/04/12 16:19:22| parseConfigFile: line 10 unrecognized: 'httpd_accel_host virtual'
2008/04/12 16:19:22| parseConfigFile: line 11 unrecognized: 'httpd_accel_port 80'
2008/04/12 16:19:22| parseConfigFile: line 12 unrecognized: 'httpd_accel_with_proxy on'
2008/04/12 16:19:22| parseConfigFile: line 13 unrecognized: 'httpd_accel_uses_host_header on '
FATAL: No port defined

can any one help me ..when the settings are wrong ...

Thanks in advance ...

John
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-16-2008, 09:32 AM
agn agn is offline
Member
User
 
Join Date: Feb 2008
My distro: OpenBSD/FreeBSD/Debian/Fedora/RHEL
Posts: 69
Rep Power: 1
agn is on a distinguished road
Default

parseConfigFile: line 9 unrecognized: 'httpd port 3128'

should be
Code:
http port 3128
Reply With Quote
  #3 (permalink)  
Old 04-24-2008, 10:10 AM
Junior Member
User
 
Join Date: Apr 2008
My distro: Centos
Posts: 3
Rep Power: 0
melvuen is on a distinguished road
Default

Check your squid version if it is squid 2.6 you need to putt http_port 3128 transparent and http_port 80 vhost. I encounter same problem as your's
Reply With Quote
  #4 (permalink)  
Old 04-24-2008, 10:19 AM
Junior Member
User
 
Join Date: Apr 2008
My distro: Centos
Posts: 3
Rep Power: 0
melvuen is on a distinguished road
Default

remove the ff:
httpd_accel_host virtual'
'httpd_accel_port 80'
ttpd_accel_with_proxy on'
'httpd_accel_uses_host_header on '

replace with
http_port 3128 transparent
http_port 80 vhost
Reply With Quote
  #5 (permalink)  
Old 05-18-2008, 09:03 AM
Junior Member
User
 
Join Date: May 2008
My distro: Debian
Posts: 1
Rep Power: 0
eyetoeye is on a distinguished road
Default transparent proxy in rhel 5

im facing so much difficulty to create a transparent proxy in my rhel server.
i have enabled the routing from my server with the following iptable rule:
iptables -t nat -A POSTROUTING -j SNAT --to-source 203.83.188.138

but i cant act squid as transparent
note that i have made changes in the following lines
http_port 3128 transparent
http_port 80 vhost
and insert a acl too.

pls help me if any?
Reply With Quote
  #6 (permalink)  
Old 05-18-2008, 03:23 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Any distro with shell
Posts: 902
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Linux: Setup a transparent proxy with Squid in three easy steps
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
squid configuration chandanperl Getting started tutorials 3 02-18-2008 09:51 PM
Squid configuration problem jhn_daz@yahoo.com Networking, Firewalls and Security 1 06-29-2007 01:58 AM
Squid Problem B!n@ry Linux software 3 04-15-2007 03:36 PM
problem with Squid puppen Linux software 4 01-04-2007 02:45 PM
SQUID ACL Problem kasimani Linux software 15 07-13-2006 05:29 PM


All times are GMT +5.5. The time now is 12:02 AM.


Powered by vBulletin® Version 3.7.2 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36