[Macpartners] mapping ports on http requests

Allan Doyle afdoyle at MIT.EDU
Tue Apr 7 09:49:40 EDT 2009


Try this:

sudo ssh 127.0.0.1 -L 80:127.0.0.1:8000

Use your Mac password when it asks for one. There are some ways to get  
this to run at boot time, but I've never tried that.

But in googling around, it looks like maybe you can start it on port  
80 - see this:
http://github.com/tomoyuki28jp/cl-http-server/blob/19e698e859041ed173c6bac5134e697559d93a53/tests/run.lisp

	Allan


On Apr 7, 2009, at 9:36 AM, Mark Klein wrote:

>
> Thanks for the ideas. I tried the ssh trick too, couldn't make it  
> work. The problem is that I'm not an IT guy, and don't have  
> experience with all these features, so I need detailed instructions,  
> or else someone willing to make the changes for me.
>
> 	Mark
>
>> 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
>>
>>
>>
>
> -----------------
> 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