Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

FredAkbar

macrumors 6502a
Original poster
Jan 18, 2003
660
0
San Francisco, CA
So what I want to do is, if I'm at school or somewhere, I want to be able to use my home computer's web server (which I have up and running with Apache) as a forward proxy, meaning access websites through my home computer rather than directly. It would serve the same purpose as sites like MegaProxy(.com) and ProxyWeb(.net), so that I can get around the school's filter (no p0rn, I promise ;)).

I've edited my httpd.conf file to turn forward proxy on, and in my Network pref pane I told it to use a proxy server for HTTP, with my IP (external or internal, doesn't matter) as the server. But when I test this in Safari, e.g. by going to adiumx.com, it just shows me the default Apache page that you get when you go to http://localhost. I'm guessing that what is happening is, Safari is accessing the web server (which happens to be on the same computer I'm using) but the server isn't fetching the websites; instead it just displays its homepage.

Keep in mind that I'm very new to Apache and the concept of web servers and all that stuff. Is there a simple way to make this work or is it really complicated?

By the way, I've read all the warnings and stuff about making a publicly accessible proxy like that, and I'll take that into account, perhaps by password-protecting it (if possible) or only allowing traffic from my school's IP or something, but for now I'd just like to get it working.

Thanks, all.
 

baummer

macrumors 65816
Jan 18, 2005
1,235
292
Southern California
Alright sounds like you need to forward INCOMING connections to the local internal IP. Which port have you assigned for the proxy? Is it open to outside connections? You might also want to configure port forwarding from your router; assuming you have a router.
 

FredAkbar

macrumors 6502a
Original poster
Jan 18, 2003
660
0
San Francisco, CA
Well, I did set up my router to forward incoming traffic to my computer. So when I have my web server on, I (or anyone else) can go to 68.x.x.x (my external IP) and see my site (whatever page is in the ~/Sites folder or whatever).
 

baummer

macrumors 65816
Jan 18, 2005
1,235
292
Southern California
FredAkbar said:
Well, I did set up my router to forward incoming traffic to my computer. So when I have my web server on, I (or anyone else) can go to 68.x.x.x (my external IP) and see my site (whatever page is in the ~/Sites folder or whatever).

Ok, but did you forward traffic for the specific proxy port?
 

FredAkbar

macrumors 6502a
Original poster
Jan 18, 2003
660
0
San Francisco, CA
Yeah, I think it's like ports 80 and 347 (dunno about the last one, could be anything). The router is definitely routing incoming requests to my computer correctly; otherwise I wouldn't be able to see the Apache page or anything...right? Before I got the router to forward to my computer, it wouldn't connect to my server at all if I tried to access it with a browser.
 

baummer

macrumors 65816
Jan 18, 2005
1,235
292
Southern California
FredAkbar said:
Yeah, I think it's like ports 80 and 347 (dunno about the last one, could be anything). The router is definitely routing incoming requests to my computer correctly; otherwise I wouldn't be able to see the Apache page or anything...right? Before I got the router to forward to my computer, it wouldn't connect to my server at all if I tried to access it with a browser.

Which browser are you using and what is the input?

Also, you do have the firewall set to accept proxy connections, right?
 

FredAkbar

macrumors 6502a
Original poster
Jan 18, 2003
660
0
San Francisco, CA
I usually try in Safari, though I've tried Firefox as well. In the Proxies tab of the Network pane of System Preferences (this applies only to Safari; Firefox has its own proxy prefs), I check the Web Proxy checkbox and set it to 68.x.x.x, my external IP, and port 80. When I then enter http://apple.com in Safari (with my web server turned on), it just takes me to my Apache page.

As for firewall, I turned the firewall completely off in System Prefs (just for testing), and did all I did in my router's firewall settings. My firewall rules list now looks like this:

firewallrules.png


(Virtual Server is just the port-forwarding that allows Internet users to view my site.)

edit: also, unless you underclocked your Mac mini by 10 MHz or 180 MHz, there's a typo in your sig.
 

crazzyeddie

macrumors 68030
Dec 7, 2002
2,792
1
Florida, USA
kingjr3 said:
You can also use SSH....

Yeah, I've done this and it works fine. I had to do it for IRC, so i used the following command:

ssh -D 6667 bob@99.999.99.99

That forwards port 6667 from your computer to port 6667 on the proxy. Then you just point whatever app to localhost (or 127.0.0.1) and you're good.
 

FredAkbar

macrumors 6502a
Original poster
Jan 18, 2003
660
0
San Francisco, CA
Wait, so I would run SSH on my computer, or the computer at school? The school computers are running Win2k or WinXP and give you pretty much no privileges; all I could do from there is things in Firefox like telling it to connect to the Internet through a proxy server, e.g. my home computer's server.
 

jeremy.king

macrumors 603
Jul 23, 2002
5,479
1
Holly Springs, NC
FredAkbar said:
Wait, so I would run SSH on my computer, or the computer at school? The school computers are running Win2k or WinXP and give you pretty much no privileges; all I could do from there is things in Firefox like telling it to connect to the Internet through a proxy server, e.g. my home computer's server.

Well you may be able to get away with using a USB thumb drive with Putty on it.

Heres how to setup SOCKS over ssh using Putty in Windows.

First type in your home IP to connect to
ssh.PNG


Then click on tunnels in the left pane and you can then setup a dynamic tunnel to your home machine. It should look something like this. Don't forget to click Add.
socks.PNG


Finally, once you are connected to your home machine. Change FF prefs to look like this.

ff_socks.PNG


If successful, ALL of your web traffic will be encrypted over SSH. ***HOWEVER, DNS lookups will still be made on your schools network, so they will have a record of the DNS name lookups. Since it is a school, I doubt they even review their DNS logs...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.