Procura
Posts: 13
Joined: Sat Nov 26, 2011 1:31 am

Pi as a proxy server

Mon Nov 19, 2012 11:58 pm

I was looking to turn my raspberry pi into a proxy server to avoid restricted internet. I don't know much on the subject and any links to how proxy servers work or any arm software for the pi that could help. I plan on hosting it on my home connection and being able to use it during the day.

rickseiden
Posts: 411
Joined: Thu Aug 02, 2012 12:21 pm
Location: Buffalo, NY, USA

Re: Pi as a proxy server

Tue Nov 20, 2012 3:10 am

I run Dan's Guardian and Squid on an old Pentium 4 computer. Unfortunately, I don't remember how to set it up, otherwise I'd give you some detailed instructions. But it's a place to start.
There are 10 types of people in this world. Those that understand binary, and those that don't.

gospaz
Posts: 5
Joined: Mon Nov 19, 2012 10:53 am

Re: Pi as a proxy server

Tue Nov 20, 2012 4:38 am

Are you after a web proxy such as http://gospaz.info/zelune/ ( my site, its safe) or asystem wide proxy?

Baldrick1
Posts: 29
Joined: Thu Aug 02, 2012 3:37 pm

Re: Pi as a proxy server

Tue Nov 20, 2012 1:12 pm

Do you have SSH set up?

If so then that's all you need from the Pi side of things.

On the machine that you want to use a web browser on while proxying traffic through your Pi, install Putty.
Open Putty
Expand Connection > SSH > Tunnels
Click the "Dynamic" Radio button
Enter a port into "Source port", I use 1234
Click "Add"
You will now see "D1234" under forwarded ports
Now use SSH as normal to connect to your Pi from a remote connection (save the setup to save having to set this config each time)

Now open your web browser and go to your network settings, I use Firefox.
Under SOCKS Host, type in the IP of 127.0.0.1 and the port of 1234 (or whatever you chose above).

Traffic in Firefox will now go via an encrypted SSH session to your Pi and then onwards to the internet.


I think this is what you were after, sorry if it wasn't but it may still prove to be useful for someone else :)

Procura
Posts: 13
Joined: Sat Nov 26, 2011 1:31 am

Re: Pi as a proxy server

Wed Nov 21, 2012 2:43 am

gospaz wrote:Are you after a web proxy such as http://gospaz.info/zelune/ ( my site, its safe) or asystem wide proxy?
A web based proxy would be optimal, I assume that all traffic coming in and out from my school would have to go through their proxy but I am uniformed and I don't know much about how these things work.

gospaz
Posts: 5
Joined: Mon Nov 19, 2012 10:53 am

Re: Pi as a proxy server

Wed Nov 21, 2012 2:46 am

I use mine for school, as you can not normally change system settings. All the web proxy is is an apache server with php and a script that you can download.

Procura
Posts: 13
Joined: Sat Nov 26, 2011 1:31 am

Re: Pi as a proxy server

Wed Nov 21, 2012 3:42 am

gospaz wrote:I use mine for school, as you can not normally change system settings. All the web proxy is is an apache server with php and a script that you can download.
So I could just run an Apache server and use some php scripts?

Edit: I found this project: http://phproxy-plus.sourceforge.net/
So now I will just look how to make a web server on the pi and use that script.
Last edited by Procura on Wed Nov 21, 2012 4:01 am, edited 1 time in total.

gospaz
Posts: 5
Joined: Mon Nov 19, 2012 10:53 am

Re: Pi as a proxy server

Wed Nov 21, 2012 3:49 am

Yeah, or you could use something like lighttpd as it is more resource friendly. Here is a well know script that I used to use http://sourceforge.net/projects/php-proxy/ . The one I currentley use requires a mysql database.

mcgyver83
Posts: 358
Joined: Fri Oct 05, 2012 11:49 am

Re: Pi as a proxy server

Tue Nov 05, 2013 8:10 pm

In my school I cannot ssh (22) to my raspberry at home (I set port fwd right, from other less protected network I can connect fine to my rasp).
My idea is to use the rasp as proxy (using port 80 that is free) to tunnel all my http request (and also I'll be able to ssh to my rasp).
How can I do this?

john564
Posts: 80
Joined: Tue Oct 30, 2012 7:05 am

Re: Pi as a proxy server

Tue Nov 05, 2013 10:49 pm

As said above, SSH is the easiest.
if the school block port 22, use port 80 for SSH
you can set up ssh over any port you like

And there are many other ways of setting up a proxy besides SSH
http://tryapi.wordpress.com/

phproxy, a webpage based proxy
openvpn,

Virutas
Posts: 26
Joined: Wed Sep 12, 2012 6:51 am

Re: Pi as a proxy server

Tue Dec 10, 2013 4:49 pm

Thanks Baldrick1 for your explanation. Works perfectly!!!

mcgyver83
Posts: 358
Joined: Fri Oct 05, 2012 11:49 am

Re: Pi as a proxy server

Fri Feb 14, 2014 7:41 am

I'm a newbie, I'm using ubuntu and I'm now able to ssh into my rasp at home using sslh, how can I create a tunnel to use the rasp as proxy?

User avatar
DougieLawson
Posts: 29337
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Pi as a proxy server

Fri Feb 14, 2014 7:59 am

OpenVPN is the server of choice. You need to port forward port 1194 and set-up the OpenVPN server listening for remote clients.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

Hexark
Posts: 12
Joined: Sat Jul 28, 2012 4:03 pm

Re: Pi as a proxy server

Sat Dec 06, 2014 4:35 am

My Pi is connected to openvpn.

I am trying to route my firefox web browser from my PC to use the encrypted traffic on my Pi to access blocked websites.
How can I get it to work?

SSH using putty, setting dynamic port does not seem to be working.

txt3rob
Posts: 365
Joined: Sat Aug 11, 2012 3:45 pm
Contact: Website

Re: Pi as a proxy server

Tue Dec 09, 2014 11:49 am

how about squid?
The Raspberry Pi Hell Guy - Random Ramblings to assist me and others.
http://raspberrypihell.blogspot.com
My Github - http:/www.github.com/random-robbie/
http://www.smspi.co.uk - send free uk sms via your raspberry pi from here

Josheh
Posts: 1
Joined: Sun Dec 21, 2014 5:52 pm

Re: Pi as a proxy server

Sun Dec 21, 2014 5:53 pm

Can someone help me Code a Pi into a Proxy? I'm a complete Noob never even booted a Pi Video tutorial is preferred Thank you -Josheh

nigeldodd
Posts: 10
Joined: Fri Jan 02, 2015 8:23 pm

Re: Pi as a proxy server

Sun Jul 31, 2016 2:34 pm

righty oh

Sydiom
Posts: 9
Joined: Mon Aug 25, 2014 1:15 pm
Contact: Website

Re: Pi as a proxy server

Mon Aug 01, 2016 7:29 pm

A few options I have had success with:

SSH Tunnel
Squid3 (Bit awkward to set up but works)
Shadowsocks (Easiest one for clients)

Return to “Networking and servers”

Who is online

Users browsing this forum: No registered users and 17 guests