Sonntag, 27. März 2011

How to set up a squid proxy in Ubuntu

This works, so here is the tutorial I promised in the comments.
In order to turn your Ubuntu PC into a proxy server, you have got to install squid at first:
sudo apt-get install squid
squid will not work out of the box, so we've got to do some changes to the config file at /etc/squid/squid.conf
sudo gedit /etc/squid/squid.conf
In order to change the name of your proxy insert the line visible_hostname *yourname* at the top.

My school blocks all ports but port 80 so I have to change squids port to 80.
You can do that by locating the line containing http_port 3128 (line 1114 in Ubuntu 10.10 with squid 2.7.STABLE9) and change it to http_port 80

To allow other computers to access your squid server, you will have to find the line containing http_access allow localhost and change it to http_access allow all (line 677)

Now tell squid to apply the changes with
sudo squid -k reconfigure
Congrats, your proxy is now set up!

port forwarding with my router
If you want to access your proxy from the internet, you will have to forward port 80 from your router to port 80 on your PC. You can find a guide for your router here.

If your IP-adress is dynamic you will have to set up dyndns (or a similair service) to guarantee your proxy server is always accessible.
I'll show you how to do that in an upcoming post!

7 Kommentare:

vteqspade hat gesagt…

Nice post, looks useful for anyone looking to set up a squid proxy!

Flames hat gesagt…

Looking forward to the upcoming posts!

Killerko hat gesagt…

this might be useful for my friend.. I'll forward it to him, thanks

triade hat gesagt…

never thouhgt this would be that easy and fast

Goregrindmadness hat gesagt…

must first google Ubuntu, to see what is this :D

Pappa Püllï hat gesagt…

squid is a awesome software to use as proxy!

Dootzkie hat gesagt…

With the new layout on my blog and about to install FF4, this is quite helpful, but keep it a bit more in English :P

Kommentar veröffentlichen