Name resolution behind a proxy
Add the VM's name to the no_proxy
variable.
no_proxy=localhost,192.168.122.0/24,vmname
And this should get you fixed. Your problem is that all the browsers are sending the HTTP request to your ISA proxy.
Related videos on Youtube
Comments
-
Andy Ruddock almost 2 years
Using Linux (Debian)
At my current place of employment I'm behind an ISA proxy server, I'm not in a position to make any changes on this machine.
I'm developing software and have set up a virtual machine using kvm, almost everything works fine. The VM is on a virtual network 192.168.122.0
In /etc/profile I have the following environment variables:
http_proxy=http://x.x.x.x:8080/ no_proxy=localhost,192.168.122.0/24
I have the VM's name in /etc/hosts.
From the host I can ping the VM and connect via ssh by name.
I can't use a browser to connect to an apache server running on the VM, name resolution is passed to the ISA server and I get a failure displayed that the hostname could not be found (not surprised that corporate DNS doesn't know about my VM)..
I get the same in all browsers, so
elinks http://vmname
fails, even though
elinks -lookup vmname
returns the correct IP address for the VM.
However, "getent hosts vmname" returns the correct local IP for the VM.
If I do :
http_proxy="" elinks http://vmname
then I can connect via http fine.
Is there a configuration somewhere that I've missed? I've looked in /etc/nsswitch.conf & /etc/host.conf & /etc/resolv.conf
I notice that "host vmname" returns 2(SERVFAIL) rather than 3(NXDOMAIN). Is it possible to configure this such that I can connect both to external servers & my internal VM without re-configuring the browser for each?
-
mgorven over 11 yearsDo you want traffic to the VM to bypass the proxy, or go through the proxy but fix the DNS issue?
-
Andy Ruddock over 11 yearsI want the traffic to the VM to bypass the proxy. The subnet the VM is on is in the no_proxy environment variable. Why do the browsers not get the address from /etc/hosts?
-
-
Andy Ruddock over 11 years> I have the VM's name in /etc/hosts
-
Diego Woitasen over 11 yearsWhen there is a proxy enabled, DNS resolution is done in the proxy not in the local machine.