Applications use the "wrong" IP address
Hello,
I have a weird problem. My system has two network adapters, one with a 192.x address and one with a 10.x address. I connect to the Internet over a proxy that also has one 192.x address and one 10.x address. The name of this proxy is added to /etc/hosts with the 10.x address. Additionally, the network settings for the 10.x adapter include the proxy as gateway. The 192.x adapter has no gateway. If I ping the proxy, it is correctly resolved over the 10.x address. All my applications are set to "directly connect to the Internet". Some apps (the "good" ones) use the 10.x address to connect to the proxy, while some others (e.g. Firefox, the "bad" ones) use the 192.x address. The latter fail to connect to the Internet because the proxy is configured to let traffic through the 10.x adapter only. Any ideas why some apps try the 192.x-way? I don't see any reason they should do this, see network config above. Thanks, Hobbes P.S.: system is RHEL 5.5 |
Show your "route -n" output. That the 192.x adapter has no gateway, does not mean that this interface cannot be used by applications. It only means that through this interface you can not reach other networks.
|
Some apps use local files to direct network while others allow use of a global proxy.
|
@eSelix: this is my routing table:
Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 seth1 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 seth1 10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 seth0 0.0.0.0 10.0.0.100 0.0.0.0 UG 0 0 0 seth0 @jefro: the global proxy is also set to "direct connect" (KDE control center). |
In firefox did you use a proxy setting in it's options?
|
Quote:
I've also set the 10.0.0.100 in Firefox as proxy, but even then there came a pop-up window from the proxy asking for credentials and the pop-up shows the address 192.168.0.100!! This is very strange. Maybe the initial connection to the proxy is correctly done with 10.x, but the proxy itself answers with 192.x?? That would also be strange because the client is added to the proxy's hosts file with the 10.x address. |
When you are connecting to proxy by Firefox, check with netstat which address is used or use some sniffer. Popup information from your proxy server can be misleading. You can also check it on the proxy/router if you have access to shell.
|
Is is possible that names are being resolved to the 10 net?
|
With netstat I get a long list, but I can't find anything firefox-related. Is it possible to filter the output so that only FF connections will be displayed?
I found out another weird thing: When I use FF as root with the same settings - it works! |
Quote:
An application can either let the kernel bind the socket to all local addresses (INADDR_ANY), or the application can use gethostbyname() or getnameinfo() to find out the IP addresses of the workstation, and bind the socket explicitly. I suspect you have the 192.x.y.z address named first in /etc/hosts, so applications that bind to a specific IP address get that address (instead of the 10.a.b.c address) when they look for the address of the host. Making sure the 10.a.b.c address is named first should solve your problem. |
Code:
sudo netstat --tcp -c -n -p | grep firefox |
All times are GMT -5. The time now is 02:59 PM. |