LinuxQuestions.org
Visit Jeremy's Blog.
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 06-13-2012, 05:48 AM   #1
papampi
Member
 
Registered: Jan 2011
Posts: 37

Rep: Reputation: 0
can not access server:port from squid


I installed squid and works perfect BUT ....

I can not access any thing that is in format of serverort !!!!
I can not use ssh , mail , webmin , http://serverort .....
also disable iptables : no good

here is my conf :
Code:
http_port 3128 
visible_hostname some.secure.domain
cache_effective_user squid squid
acl all src 0.0.0.0/0.0.0.0
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
auth_param negotiate children 5 startup=0 idle=1
auth_param basic realm My Proxy Server
auth_param basic credentialsttl 2 hour
auth_param basic casesensitive on
acl users proxy_auth REQUIRED
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
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
http_access deny !users
http_access allow users
http_access deny !Safe_ports
forwarded_for transparent
header_access Allow allow all
header_access Authorization allow all
header_access Cache-Control allow all
header_access Content-Encoding allow all
header_access Content-Length allow all
header_access Content-Type allow all
header_access Date allow all
header_access Expires allow all
header_access Host allow all
header_access If-Modified-Since allow all
header_access Last-Modified allow all
header_access Location allow all
header_access Pragma allow all
header_access Accept allow all
header_access Accept-Enncoding allow all
header_access Accept-Language allow all
header_access Content-Language allow all
header_access Mime-Version allow all
header_access Cookie allow all
header_access Set_Cookie allow all
header_access Retry-After allow all
header_access Title allow all
header_access Connection allow all
header_access Proxy-Connection allow all
header_access All deny all
header_replace User-Agent anonymous
any idea hot to solve it ?
 
Old 06-13-2012, 05:55 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
squid is an http / ftp proxy, not ssh, not smtp, not imap. for anything non web related, you need to bypass squid.

if you want to access a web service on a different port, then you need to add that port number into the Safe_ports acl as with those other common ports listed.
 
Old 06-13-2012, 06:09 AM   #3
papampi
Member
 
Registered: Jan 2011
Posts: 37

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
if you want to access a web service on a different port, then you need to add that port number into the Safe_ports acl as with those other common ports listed.
as you can see I just opened port 1024-65535 and my webmin port 10000 so it should be open !
but i get this in log when i try to access webmin :

Quote:
1339589478.540 5 xxx.xxx.xxx.xxx TCP_MISS/503 0 CONNECT yyy.yyy.yyy.yyy:10000 user DIRECT/- -
 
Old 06-13-2012, 06:14 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
Sorry, missed that line. So then squid is working fine. it's nothing to do with squid. That's a CONNECT command, so you're doing this on HTTPS? Can you reach that destination from the squid box with a curl or telnet?
 
Old 06-13-2012, 06:27 AM   #5
papampi
Member
 
Registered: Jan 2011
Posts: 37

Original Poster
Rep: Reputation: 0
I just installed ss5 on same server as squid on another port and I access all those that I can not access when squid is added to my local proxy machine .
so it seems the problem is some where in my squid settings .
 
Old 06-13-2012, 06:34 AM   #6
papampi
Member
 
Registered: Jan 2011
Posts: 37

Original Poster
Rep: Reputation: 0
here is another part of log when i try to send receive email from outlook and open webmin
first 2 lines are when i open facebook !

1339590817.077 9240 188.158.28.12 TCP_MISS/200 39 CONNECT 199.59.150.10:80 user DIRECT/199.59.150.10 -
1339590817.150 6283 188.158.28.12 TCP_MISS/200 39 CONNECT 199.59.150.41:80 user DIRECT/199.59.150.41 -
1339590822.157 3 188.158.28.12 TCP_MISS/503 0 CONNECT 64.130.209.27:110 user DIRECT/- -
1339590822.191 4 188.158.28.12 TCP_MISS/503 0 CONNECT 65.54.62.215:995 user DIRECT/- -
1339590822.220 5 188.158.28.12 TCP_MISS/503 0 CONNECT 173.194.70.108:995 user DIRECT/- -
1339590822.284 3 188.158.28.12 TCP_MISS/503 0 CONNECT 17.172.116.63:993 user DIRECT/- -
1339590732.476 5 188.158.28.12 TCP_MISS/503 0 CONNECT myserver.com:10000 user DIRECT/- -
 
Old 06-13-2012, 06:58 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
as per above...
Quote:
Originally Posted by acid_kewpie View Post
Can you reach that destination from the squid box with a curl or telnet?
 
Old 06-13-2012, 07:06 AM   #8
papampi
Member
 
Registered: Jan 2011
Posts: 37

Original Poster
Rep: Reputation: 0
when machine is under squids proxy no !
I can not access any server: port when I set to squid proxy
it gives me error :
1339590732.476 5 188.158.28.12 TCP_MISS/503 0 CONNECT myserver.com:10000 user DIRECT/- -
but with default port 80 it shows :
1339590732.476 5 188.158.28.12 TCP_MISS/200 CONNECT myserver.com:80 user DIRECT/ myserver.com -
and it opens the page !

Last edited by papampi; 06-13-2012 at 07:08 AM.
 
Old 06-13-2012, 07:09 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
Can you actually read what I said instead of repeating the same thing?
 
Old 06-13-2012, 07:20 AM   #10
papampi
Member
 
Registered: Jan 2011
Posts: 37

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
Can you actually read what I said instead of repeating the same thing?
I told you that when the internet of my local machine is set under my squid proxy server : no I can not telnet ! but when I disable the proxy yes I can telnet !

Quote:
06.13 16:51:37] putty.exe - myserver:10000 open directly
[06.13 16:51:38] putty.exe - myserver:10000 close, 21 bytes sent, 16 bytes received, lifetime 00:01
[06.13 16:53:09] putty.exe - myserver:10000 close error : Could not connect through proxy 176.227.201.59:3128 - Proxy server cannot establish a connection with the target, status code 503
access.log :
Quote:
1339593992.971 5 188.158.28.99 TCP_MISS/503 0 CONNECT myserver:10000 user DIRECT/- -
I can not even reach webmin of squid box when I'm under its own squid !!!
and yes I tried lynx and I can reach every destination with non-standard ports !

from squidbox :
Quote:
# curl -k https://someserver:10000
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<link rel='stylesheet' type='text/css' href='/unauthenticated/style.css' />
<script type='text/javascript' src='/unauthenticated/toggleview.js'></script>
<script>
var rowsel = new Array();
</script>
.....

Last edited by papampi; 06-13-2012 at 07:31 AM.
 
Old 06-13-2012, 07:40 AM   #11
papampi
Member
 
Registered: Jan 2011
Posts: 37

Original Poster
Rep: Reputation: 0
so the problem solved by running this command :
Quote:
setsebool -P squid_connect_any on
which I found here :
http://docs.redhat.com/docs/en-US/Re..._Examples.html

thanx for your helps ...

Last edited by papampi; 06-13-2012 at 07:55 AM.
 
Old 06-13-2012, 07:45 AM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
Certainly a good fit!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cannot Access the port 19345 & 20345 through squid ashwin_think Linux - Server 2 01-13-2008 11:40 PM
not allowing users to access internet using port 80 through squid proxy dolreich_c Linux - Security 1 08-02-2007 02:28 AM
access 8080 web server port through squid running on 8080 sunethj Linux - Networking 11 05-18-2007 02:38 AM
Squid url port 81 access-denied error steve@korehicom.com Linux - Networking 0 10-13-2005 09:55 AM
How to open ports 25 and port 110 on proxy server SQUID? fdavid Linux - Newbie 1 03-16-2005 11:31 PM

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

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