[Macpartners] mapping ports on http requests

Allan Doyle afdoyle at MIT.EDU
Tue Apr 7 09:08:06 EDT 2009


One solution is to run an httpd on port 80 and then use mod_rewrite  
rules to proxy from port 80 to port 8000. Depending on what's  
happening on the port 8000 server, this can range from easy to a bit  
tricky.

Another thing you might try is to run a shell script (as root) using  
ssh to tunnel port 80 to port 8000. Usually tunneling is used to go  
between machines but there's no reason it would not work locally.

	Allan

On Apr 7, 2009, at 8:42 AM, Mark Klein wrote:

>
> I am running an HTTP server (cl-http) on a Mac under OS 10.5. The  
> server listens only to port 8000, and there is apparently no easy  
> way to change that. This means, however, that some people are unable  
> to access my server because their firewalls block ports above 1000.  
> So, what I'd like to do is find a way to re-direct http requests  
> sent to port 80 on my Mac so they go to port 8000. I've heard there  
> are several ways this can be done, including:
>
>   - use NATD (the Network Address Translation daemon)
>   - use forwarding rules on my Mac's firewall
>
> I've tried several ways to configure this, including:
>
>  - using ipfw from the command line
>  - using portmap (which I believe configures the network address  
> translation)
>  - using waterroof (which can configure firewall rules, as well as  
> the NATD)
>
> None have worked for me. I suspect that I'm missing some simple  
> piece to the configuration process, but I have no idea what.
>
> Is there a Mac OS guru out there whom could help set up the http  
> port mapping properly on my Mac? I would greatly appreciate it, this  
> has held me up for several weeks.
>
>   Thanks very much,
>
> 	  Mark
>
> -----------------
> Mark Klein
> Principal Research Scientist
> MIT Center for Collective Intelligence
> http://cci.mit.edu/klein/
>
>
>
>
>
> -----------------
> Mark Klein
> Principal Research Scientist
> MIT Center for Collective Intelligence
> http://cci.mit.edu/klein/
>
>
>
>

-- 
Allan Doyle
Director of Technology
MIT Museum | http://web.mit.edu/museum | +1.617.452.2111






More information about the Macpartners mailing list