Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Creating a proxy server in OS X

Creating a proxy server in OS X
Thread Tools
macintologist
Professional Poster
Join Date: Apr 2002
Location: Smallish town in Ohio
Status: Offline
Reply With Quote
Aug 29, 2006, 02:49 AM
 
Is it possible to create a proxy server, so that on another Mac somewhere else in the world, I can go to the network system prefs and enter my ip address and connect to the internet through that proxy located on the first Mac?
     
Tuoder
Mac Elite
Join Date: Mar 2006
Location: Here
Status: Offline
Reply With Quote
Aug 29, 2006, 11:12 AM
 
I really don't see why not, though I wouldn't know how, and I would like to know.
     
Camelot
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status: Offline
Reply With Quote
Aug 30, 2006, 02:29 AM
 
Sure. You need to run a proxy server. Squid is one of the most popular open-source proxies you can download and install.

Be aware, though, that you need to give some great care to authentication. Unless you validate yourself on the proxy (via Proxy Authentication) you'll be running an open proxy server that is going to be abused by other users on the internet.

If you know the IP address you'll be coming from, it's easy enough. Alternatively you could open a SSH tunnel to your home system and tunnel the proxy traffic through that, or implement ProxyAuthentication.
Gods don't kill people - people with Gods kill people.
     
rjt1000
Senior User
Join Date: Jul 2003
Location: Asia
Status: Offline
Reply With Quote
Aug 30, 2006, 09:16 AM
 
Hi,

You can use SSH to set up a socks proxy on a remote Mac where you have an account.

First setup the remote Mac:

1. Make sure you set up a user account on the remote Mac, and that all user accounts have a strong password
2. turn on "remote access".
3. If the remote Mac is behind a router, you will also need to give it a manual internal IP address and to set up port forwarding on your router to forward port 22 to that manual internal IP address.
4. You will need to leave the remote Mac running (turn off sleep and set it to restart if there is a power failure).
5. You will need to know the external address of the remote Mac, so note it, and if your isp regularly changes it, you will need to purchase a service that regularly informs you of the remote Macs current IP address.

Once set up as above, you start up the proxy from your local Mac using the terminal application and the command:

ssh [email protected] -D 2001

where username is your short username and xx.xx.xx.xx is the remote Macs external ip address. You will need to enter your password.

Now set Firefox on your local Mac to use a socks 4 proxy on 127.0.0.1 (localhost) port 2001, and you can use www.showmyip.com to verify your proxying through the remote Mac.

Now your web traffic will be proxied and encrypted between your local and remote Mac. This should also work with other application that allows you to set a socks 4 proxy.

There is some risk in having remote access setup on a computer which is constantly on the internet. Strong passwords can help deter hackers, but for further security, there are ways to change the port that remote access uses, or to disable passwords and use only encryption keys for access. Others in this forum can give you the details.

Enjoy,

rjt1000
( Last edited by rjt1000; Aug 30, 2006 at 09:22 AM. )
     
doctorsplotchy
Fresh-Faced Recruit
Join Date: Mar 2007
Status: Offline
Reply With Quote
Mar 27, 2007, 09:06 AM
 
I stumbled on this thread, and the reply immediately preceding mine was extremely helpful and concise.

However, if you happen to be running Little Snitch on the remote mac, make sure you create a new rule for sshd (usually located at /usr/sbin/sshd) to allow it to access the outside world.

I was able to set up the tunnel, the proxy, etc, then for whatever reason firefox would error out. It turns out that Little Snitch was holding up the requests, and then firefox would eventually give up.

Hope this helps
     
mgarciap
Fresh-Faced Recruit
Join Date: Aug 2007
Status: Offline
Reply With Quote
Aug 13, 2007, 12:12 PM
 
Hey Guys,

Is it possible to set up a proxy server from a MAC, and for me to connect to it through a Windows XP PC? I'm trying to access my home internet connection from my work computer (Windows based). Is it possible, have you guys have a shot at this before?

Any information will be greatly appreciate it

Thanks,


Mario


Originally Posted by rjt1000 View Post
Hi,

You can use SSH to set up a socks proxy on a remote Mac where you have an account.

First setup the remote Mac:

1. Make sure you set up a user account on the remote Mac, and that all user accounts have a strong password
2. turn on "remote access".
3. If the remote Mac is behind a router, you will also need to give it a manual internal IP address and to set up port forwarding on your router to forward port 22 to that manual internal IP address.
4. You will need to leave the remote Mac running (turn off sleep and set it to restart if there is a power failure).
5. You will need to know the external address of the remote Mac, so note it, and if your isp regularly changes it, you will need to purchase a service that regularly informs you of the remote Macs current IP address.

Once set up as above, you start up the proxy from your local Mac using the terminal application and the command:

ssh [email protected] -D 2001

where username is your short username and xx.xx.xx.xx is the remote Macs external ip address. You will need to enter your password.

Now set Firefox on your local Mac to use a socks 4 proxy on 127.0.0.1 (localhost) port 2001, and you can use IP Address properties of your Internet Connection 207.58.150.163 --> showmyip.com <-- to verify your proxying through the remote Mac.

Now your web traffic will be proxied and encrypted between your local and remote Mac. This should also work with other application that allows you to set a socks 4 proxy.

There is some risk in having remote access setup on a computer which is constantly on the internet. Strong passwords can help deter hackers, but for further security, there are ways to change the port that remote access uses, or to disable passwords and use only encryption keys for access. Others in this forum can give you the details.

Enjoy,

rjt1000
     
rjt1000
Senior User
Join Date: Jul 2003
Location: Asia
Status: Offline
Reply With Quote
Aug 14, 2007, 10:12 AM
 
Originally Posted by mgarciap View Post
Hey Guys,

Is it possible to set up a proxy server from a MAC, and for me to connect to it through a Windows XP PC? I'm trying to access my home internet connection from my work computer (Windows based). Is it possible, have you guys have a shot at this before?

Any information will be greatly appreciate it

Thanks,


Mario
You should be able to set up a socks 4 proxy using SSH, although I have no experience doing this from a windoze based computer. (This is assuming, of course, that your office firewall doesn't block the SSH port 22)

The setup of the remote computer (your home Mac) would be the same as detailed above.

The SSH login from your work computer will require an SSH client for windoze. I believe that PuTTY can accomplish this, although I can't give you the specifics.

The SSH syntax should be the same and would be entered into the SSH client on the windoze computer:

ssh [email protected] -D 2001

where username is your short username and xx.xx.xx.xx is the remote Macs external ip address.

Then you would set Firefox on your work PC to use a socks 4 proxy on 127.0.0.1 port 2001.
( Last edited by rjt1000; Aug 14, 2007 at 10:35 AM. )
     
Slugboy
Fresh-Faced Recruit
Join Date: Aug 2007
Status: Offline
Reply With Quote
Aug 18, 2007, 01:08 AM
 
cygwin has a working SSH client (using OpenSSH) that allows XP computers to use SSH tunnels to attach to the Mac. Make sure that under internet options during install you select the OpenSSH package as well.
     
Mr.StevenFeldman
Fresh-Faced Recruit
Join Date: Mar 2008
Status: Offline
Reply With Quote
Mar 27, 2008, 10:39 AM
 
My school's filter requires the following proxys to be used to connect to the network
FTP,Secure, WEB, and of course Socks
so is there another way??
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 02:59 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,