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

nigels0

macrumors member
Original poster
Feb 23, 2008
59
2
Hi,

I'm often away from the UK, but does anyone know a procedure to allow me to set up my Mac (which is always connected to the internet and I can get the IP address with Dyndns) to act as a proxy server so I can connect into the machine from my (remote) macbook and download from the UK?

I'm not particularly keen on using a public proxy as they seem to disappear on quite a regular basis.
 
download from the BBC iPlayer?
Hi,
I'm not familiar with BBC iPlayer so I need to know 1st how it works. Is it a web based player ?

A solution is to use ssh sock proxy:

Basically what you have to do is the following
- start SSH server on your UK Mac
- check that the ssh port accessible from the internet
Then when you want to connect from your (remote) macbook

- connect with the ssh client to the ssh server
Code:
ssh  -D 7777 your_login@your_uk_mac_ip

This will open a port (here 7777) on your (remote) macbook.

Then you can setup your browser to connect via this port (localhost:7777) to the internet. This can be done in Firefox in the advanced settings.

If you need more details about any of the steps just ask.

cheers,
Tex
 
I must admit I was stumped at your first line - start SSH server on your UK Mac - how do I do that?
 
Thanks.

On the remote mac, I've set up the Squid proxy so it is listening on 8080 and changed my proxy settings to go through squid - and that works fine.

On the local machine though it doesn't seem to connect to squid.

Now, I can remotely access the remote computer using Terminal and the remote router confirms that it routes any access on port 22 to the remote mac. I've set up FireFox on the local computer to Socks V4 and set all the proxies to 127.0.0.1:2001 (which is the port I'm using on the ssh command).

Trying to access a web page on the local machine doesn't work though - it just hangs - so I think the request which is going through port 2001 isn't reaching the remote mac. Any thoughts?
 
Thanks.

On the remote mac, I've set up the Squid proxy so it is listening on 8080 and changed my proxy settings to go through squid - and that works fine.

On the local machine though it doesn't seem to connect to squid.

Now, I can remotely access the remote computer using Terminal and the remote router confirms that it routes any access on port 22 to the remote mac. I've set up FireFox on the local computer to Socks V4 and set all the proxies to 127.0.0.1:2001 (which is the port I'm using on the ssh command).

Trying to access a web page on the local machine doesn't work though - it just hangs - so I think the request which is going through port 2001 isn't reaching the remote mac. Any thoughts?

It looks like you are mixing both method. If you use the Squid proxy, just set up your firefox to connect via the proxy by typing the public IP of your mac and port 8080. That's all.
 
Ah, now it's a bit clearer - but still haven't got it working.

Setting the remote IP address with port 8080 in FireFox on the local machine, and having the remote router forward port 8080 to the mac, I do get the request hitting the proxy, but I get the error:

1260041159.898 0 192.168.0.1 TCP_DENIED/403 3084 GET http://uk.finance.yahoo.com/currencies/converter/? - NONE/- text/html

in Squid on the remote machine, and Access Denied in Firefox on the local machine.

If I do get this working though, how can I put a password on the proxy - Squidman doesn't seem to have the option.
 
Ah, now it's a bit clearer - but still haven't got it working.

Setting the remote IP address with port 8080 in FireFox on the local machine, and having the remote router forward port 8080 to the mac, I do get the request hitting the proxy, but I get the error:

1260041159.898 0 192.168.0.1 TCP_DENIED/403 3084 GET http://uk.finance.yahoo.com/currencies/converter/? - NONE/- text/html
Did you check the box "Use this proxy for all protocols" in Firefox ?

If I do get this working though, how can I put a password on the proxy - Squidman doesn't seem to have the option.
Im not sure if Squidman supports authentication.
 
Yes, all protocols - it was getting through to Squid, but squid had the error.

As I can't protect the proxy though, I would prefer the SSH approach. Can't get that working either!
 
Yes, all protocols - it was getting through to Squid, but squid had the error.

As I can't protect the proxy though, I would prefer the SSH approach. Can't get that working either!
ok let's try the ssh approach.

Enable the "remote access" as shown in this screenshot and forward the port 22 on your uk router to your uk mac so that it is open to the internet.


Then have a look again at my 1st post and tell me where are you stuck.

Cheers,
TEx
 
Yes, did that - on the local machine, I ran the ssh command (ssh -D 7777 <login>@machine) and got a login into the remote machine and could view the home directory etc. leaving Terminal open, so the connection stayed open, I then started Firefox - adding localhost:7777 in Firefox as a proxy (for all connections) and switching to SOCKS v4.


But Firefox seems do nothing - just responds with a blank screen and done in the bottom left. It seems that Firefox believes that it has retrieved the page.
 
I think the fact that firefox thinks it has got the page may indicate that the remote machine returns an error - but I don't know where to see that error.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.