0

It is obvious that local /etc/hosts file is ignored when using a proxy while browsing. How can I use hosts file when using a proxy? I've access to the proxy server. I changed /etc/hosts file on the proxy server itself, it did work when I use a browser from the the proxy itself, although it didn't work at all for all the clients connecting through it. It is totally ignored.

from the proxy server (running proxidize.com)

/etc/nsswitch.conf

passwd:         files
group:          files
shadow:         files
gshadow:        files

hosts:          files mymachines dns myhostname
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

/etc/resolv.conf

nameserver 1.1.1.1
nameserver 1.0.0.1

/etc/hosts

ip_address www.website.com

when opening www.website.com from a browser from the same proxy box, it is resolving using /etc/hosts file, but this hosts file is ignored for all connections using the proxy server

How can I force all proxy users to use the hosts file of the proxy?

Ashraf
  • 101
  • 1
  • 1

1 Answers1

0

In the common Squid proxy for example you can enable/disable the system default and/or select an alternative hosts file with the hosts_file option. You will also need to restart Squid to pick up any changes in that hosts file as it is only processed during Squid startup.

See: http://www.squid-cache.org/Doc/config/hosts_file/

In other proxy servers things may work differently or similar.

Rob
  • 1,175
  • 1
  • 7