Squid+DNS

Dear All

I have Squid 2.6 running on RHEL4. Actually we have our companys portal and Sun communication suit for Mail Service. Squid uses live DNS for resolving sites. I want to resolve Intranet address without by passing the proxy in the browser. I mean every user have to by pass proxy in the browser to open the company's e.g mail.abc.com. I need to know how our users can resolve local address with out by passing the proxy. Is it possible with Squid or Linux IPtables. Any assistance will by highly appreciable.

Regards
Iftikhar

Hi,
Here's what i would do, not sure if it will do the trick though :D:

  • in your /etc/nsswitch.conf at the line beginning with hosts: put "files" before the word dns if its not already there
  • add all your intranet addresses in /etc/hosts
    You may need to restart squid, hope this helps ...

Why don't you add the internal domain to your dns. Seems the easiest solution.

You could just use a proxy auto configuration file then the browser would just load the configuration once on load and use the proxy for external and you could use direct connection for internal stuff.

Dear andryk
this trick didnt work my problem is still there. Actually we have a windows based DNS. Squid uses DNS of ISP from where we r getting internet service. Can it be done through IPtables bcz our mail service uses port 8843. I ill b waiting for ur reply

Regards

Dear All

my problem is solved the trick told by andryk worked very well. i changed "nsswitch.conf" file, entered local addresses in the /etc/hosts file and also uncommented "hosts_file /etc/hosts" entry in the Squid.

Thnx all of u for ur cooperation

Glad to hear that.

Dear friend
u need to setup squid 3 because squid 2.6 did not suport transparent proxy

in squid 3 its very simple just enable transparent in squid.conf and config the clients as squid server as getway and you need dns
and you need to config iptables to redirect connections to the squid port

Moamar Ishtayyeh
computer center
An Najah National Unversity

Home : An-Najah National University : Palestine