LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-05-2015, 03:22 PM   #1
GlowingApple
LQ Newbie
 
Registered: Mar 2008
Posts: 9

Rep: Reputation: 0
Error with squid as transparent proxy: "commBind: Cannot bind socket FD X to X.X.X.X"


I have squid set up on my router (asus-rt-ac68u running asus-merlin) as a transparent proxy. Squid starts up without error and everything seems to be work well from the client side, but my squid debug logs are peppered with error messages:

Code:
commBind: Cannot bind socket FD XX to X.X.X.X: (99) Cannot assign requested address
The socket number changes, but the IP address always seems to be whatever external IP I am accessing through the transparent proxy. Every web page I visit I get about 15 to 20 of these error messages.

If I set up squid as a regular proxy I don't see them, so I assume it has something to do with the way iptables is set up?

In my squid (version 3.4.11) conf I'm using:

Code:
http_port 10.0.0.1:3129 intercept
http_port 10.0.0.1:80 accel
and for iptables, to the existing tables my router generates I'm adding:

Code:
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 80 -j REDIRECT --to-port 3129
Any idea what I need to change to stop these error messages?

Thanks!
 
Old 04-05-2015, 04:12 PM   #2
GlowingApple
LQ Newbie
 
Registered: Mar 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Well looks like the issue is something with my squid.conf... I had copied parts of conf files from a few sources when I was setting up my proxy and must have had some settings that didn't play well.

I commented out the lines that I don't think I need and it seems to be working fine now. I'll have to look into my conf file more carefully and make sure I don't have anything else amiss. Here's my file now, with lines commented out:

Code:
cache_effective_user nobody
cache_mgr email@domain.com
visible_hostname hostname

#ipcache_size 2048
#cache_swap_low 90
#cache_swap_high 95
#maximum_object_size_in_memory 100 KB
#cache_mem 16 MB

cache_dir ufs /opt/var/squid/cache 400 16 256

logfile_rotate 10
#fqdncache_size 2048
#memory_pools off
#maximum_object_size 16384 KB
#quick_abort_min 0 KB
#quick_abort_max 0 KB
log_icp_queries off
#client_db off
buffered_logs on
#half_closed_clients off
#negative_dns_ttl 10 second
#connect_timeout 60 second
#read_timeout 80 second
#request_timeout 80 second

logfile_daemon /sbin/syslogd
access_log stdio:/opt/var/log/squid/access
cache_log /opt/var/log/squid/debug

#hierarchy_stoplist on

http_port 10.0.0.1:3129 intercept
http_port 10.0.0.1:80 accel

acl idents ident REQUIRED
acl intern dst 10.0.0.0/24
acl FTP proto FTP
always_direct allow FTP

#acl yourLAN src 10.0.0.0/24

#http_access allow idents
http_access allow all
#http_access allow intern
#http_access deny manager all
#http_access allow yourLAN
#http_access deny all
#icp_access deny all
#miss_access allow all
#always_direct allow intern
Commenting out some of the http_access lines toward the bottom seemed to have fixed things. Not sure what the problem was, but thought I'd follow-up in case anyone else runs into a similar issue!
 
  


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 with squid as transparent proxy: "Invalid request" only on certain pages dtinazzi Linux - Networking 3 08-10-2011 03:41 AM
xinetd 2.3.14 "could not bind listening IPv4 socket" to vsftpd 2.2.0 on Deb5.0.3 traylorre Linux - Networking 9 09-29-2009 10:47 PM
Mesh networking issue "Can't bind send socket: address already in use" WhiskeyTangoFoxtrot Linux - Networking 4 02-24-2009 10:38 AM
Squid: "Socket error... (55) no buffer space available J_Szucs Linux - Networking 1 08-30-2004 08:10 AM
Quagga "Can't bind socket: Invalid argument" JJX Linux - Networking 0 04-29-2004 10:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:03 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