Posts mit dem Label Zensur werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Zensur werden angezeigt. Alle Posts anzeigen

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!

Ubuntu als Proxy Server mit squid // Internetzensur an Schulen umgehen

Kennt ihr das?
Ihr seid in der Schule/Uni/Arbeit/woauchimmeraußerhaltzuhause und wollt schnell mal die Seite XY (z.B. gulli.com) checken. Und dann taucht sie auf, die Zensurseite.

"Der Zugriff auf die Seite http://www.gulli.com mit folgender Begründung verweigert:

Extremist Content, Illegal or Unethical, Verbreitung von Weltübernahmemodellen, etc

Bei Fragen oder Beschwerden wenden Sie sich bitte an zensor@Schule/Uni/Arbeitgeber.de"

Weil das an unserer Schule wirklich sehr exzessiv praktiziert wird, wollte ich mal probieren, ob ich meinen Ubuntu-PC nicht als Proxy einrichten kann, um diese Sperre so zu umgehen.

Nach ein bisschen googlen bin ich dann auf squid und polipo gestoßen, habe mich aber für squid entschieden, weil die Wikipedia-Seite zu squid länger ist und ich das Tintenfisch-Maskottchen cool finde (no shit).

Es hat geklappt!!

Siehe Screenshot vom Remote-PC mit Windows 7 und Firefox:
Wenn das morgen wirklich die Zensurmaßnahmen der Schule aushebelt, dann poste ich mein Tutorial dazu :)
Das Setup zum Screenshot