LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Squid Accessing Itself (https://www.linuxquestions.org/questions/linux-networking-3/squid-accessing-itself-4175451677/)

SBS1 02-25-2013 05:23 PM

Squid Accessing Itself
 
Hi there,

At our workplace, we've recently installed a Squid proxy & firewall using iptables. It's running Debian stable. It has Apache running on itself for an HTTP interface.

When we access the web interface via the proxy, we receive;
Code:

The following error was encountered while trying to retrieve the URL: http://proxy/

    Unable to determine IP address from host name "proxy"

The DNS server returned:

    Server Failure: The name server was unable to process this query.

This makes sense as in the machine's host file, proxy points to 127.0.1.1. It's would be easy enough to get around by simply changing proxy to point its internal address instead of the loopback.

However, this seems to be breaking a standard and may introduce issues. Would anyone know of a correct to get around this issue?

Thanks to any replies.

Kustom42 02-25-2013 05:30 PM

Do you have the hostname "proxy" mapped to that loopback address in your hosts file? You didnt specify that there.

SBS1 02-25-2013 05:37 PM

Hi Kustom42,

Yes, that's right. It's pointing to a loopback address of 127.0.1.1, Debian's standard loopback address.

Kustom42 02-25-2013 05:41 PM

What is your /etc/nsswitch.conf set to for hosts? Do you have files listed before dns?

SBS1 02-25-2013 06:14 PM

I wasn't aware of that file, but I've made that adjustment. It's now obtaining a valid IP for the machine.

However, I'm getting the same message, even after restarting Squid, so it wasn't exactly as I had thought. Oddly, using the FQDN 'proxy.worknetwork.local' works fine.


All times are GMT -5. The time now is 04:31 PM.