Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Anyone with Port Forwarding Working in Lion Server?

<frustrated_byLion>


First, my Mac mini Server is setup with en0 and en2 as a gateway server. I have a static external IP on one and a local 192.168.x.x network on the other. The Mac mini acts as the IP Firewall, NAT router, DHCP Server, etc. I have another computer on the internal network that I want to act as the web server on port 80. I need traffic to the external IP coming in on port 80 forwarded to the internal computer's IP on port 80. This should be easily accomplished by port forwarding via terminal and the NAT interface on the Mac mini Server.


I've followed the instructions in the Advanced Documentation for 10.7 Server, adding the appropriate lines to the /etc/nat/natd.plist file to forward a port and cannot get it to work at all. Making these changes and then stopping and restarting NAT via serveradmin commands is supposed to cause the /etc/nat/natd.conf.apple file to update or be created, but I can't find that file in Lion; it doesn't seem to create it.


Can anyone verify the existence of the /etc/nat/natd.conf.apple file?


After going through this procedure, and double checking everything, I tried my_ip:80 expecting it to forward to the other computer's port 80 and it doesn't; it runs the generic Mac Server webpage running on my gateway Mac. I have the firewall configured correctly and it's running. Port 80 is not blocked at all. I'm really just looking for anyone with any success in getting that /etc/nat/natd.conf.apple file to appear or update and to know how they got that to work.


If anyone has struggled through this and had some success, could you please explain how you did it?


If not, does anyone know if this is a known issue that Apple need to address in a future 10.7.x release?


Thanks.


</frustrated_byLion>

Mac mini, Mac OS X (10.7.1), Server

Posted on Aug 28, 2011 12:16 PM

Reply
7 replies

Aug 29, 2011 3:16 AM in response to LogMeCode3

Got problems with port forwarding to. For transparent squid, the ports 80 & 8080 needs to be forwarded to port 3128. The 2 fwd rules made in ipfw.config are shown in the active firewall table and everything else is configured like i did it in Snow Leopard.


ipfw.conf

...

...

add 1001 fwd 127.0.0.1,3128 tcp from 192.168.0.0/24 to any 80 in

add 1001 fwd 127.0.0.1,3128 tcp from 192.168.0.0/24 to any 8080 in


It seems that no pakets goes trough the rules.

Jun 2, 2012 1:13 PM in response to Grant Ireland

Same behavior here, no idea why. I've been using the natd.plist file for years, looks from the documentation that the only change for 10.7 should be generation of etc/nat/natd.conf.apple.


Anyone tried using pfctl from the command line? ipfw man page says it's been deprecated in favor of pfctl. Found a blog describing it (http://www.zomo.co.uk/2011/09/pf-on-os-x-10-7/) but haven't been able to get it working yet.

Anyone with Port Forwarding Working in Lion Server?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.