Link to home
Start Free TrialLog in
Avatar of oandosupport
oandosupport

asked on

setting up Proxy server using Debian

Just installed debian. Installed two network cards. I can hit the internet from the server. But when i try accessing the internet from a system on my network , it gives a funny message on the browser. the message is 'it works!'.

i believe there is a problem with my squid.conf file. I have tried copying the squid.conf from a red hat system. It still didn't work.

Any idea how to go about it?
Avatar of michofreiha
michofreiha
Flag of Lebanon image

are you able to ping any domain from any machine inside the network?
Message that "It Works!" provided to you by Apache server, not Squid.

First of all you have to configure SQUID just to make it:
a) listen on specific interfaces (just for security reasons)
b) to allow users from specific networks pass through your proxy.

Also you can make a transparent proxy with SQUID, but it also has to be configured properly.


So to use SQUID as standard proxy - you have to configure proxy itself and set browsers in network to use proxy.

To make transparent proxy, you have to configure clients (in the network) to use you squid-machine as gateway (it can be done with dhcp server) then configure iptables on squid-machine and set squid to act like transparent proxy.


If you can give me a topology of your networks I'll be able to help you with all necessary settings.
Avatar of oandosupport
oandosupport

ASKER

My network is a point to multi-point WAN. all systems are expected to connect to the internet through the Proxy server (which is the private leg of the Debian system).
ASKER CERTIFIED SOLUTION
Avatar of ixti
ixti
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Below is the error i got.

Debian:~# invoke-rc.d squid restart
Restarting Squid HTTP proxy: squid* Creating squid spool directory structure
FATAL: Could not determine fully qualified hostname.  Please set 'visible_hostname'

Squid Cache (Version 2.6.STABLE5): Terminated abnormally.
CPU Usage: 0.012 seconds = 0.008 user + 0.004 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
/etc/init.d/squid: line 74:  3116 Aborted                 $DAEMON -z
FATAL: Could not determine fully qualified hostname.  Please set 'visible_hostname'

Squid Cache (Version 2.6.STABLE5): Terminated abnormally.
CPU Usage: 0.012 seconds = 0.012 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
/etc/init.d/squid: line 74:  3118 Aborted                 start-stop-daemon --quiet --start --pidfile $PIDFILE --chuid $CHUID --exec $DAEMON -- $SQUID_ARGS </dev/null
 failed!
Debian:~#
I'm not sure will it help or not, but try to force visible_hostname option in squid.conf
Opent /etc/squid/squid.conf and add line "visible_hostname localhost" at about line number 2885 - after lines about this parameter (just to keep config in good view) so it will become something like:
#  TAG: visible_hostname
#       If you want to present a special hostname in error messages, etc,
#       define this.  Otherwise, the return value of gethostname()
#       will be used. If you have multiple caches in a cluster and
#       get errors about IP-forwarding you must set them to have individual
#       names with this setting.
#
#Default:
# none
 
visible_hostname localhost

Open in new window