I am a newbie with the mac server, so i dont know if the following is possible or not.
I have a mac Xserve as my main computer which distributes inernet traffic in my office. I have a single IP Address through which i connect my network. My question is if there is a way I can distribute incoming requests to different computers based on a port. For example
www.mydomain.com points to my xserve but i would like
www.mydomain.com:8080 to point to another server in my network.
Can i route traffic in this manner with the mac?
Dinesh,
Yes you can.
First, you need to activate Firewall and NAT services on OS X Server.
Server Admin GUI doesn't let you forward a port, but only activate NAT service.
We can't modify the natd.conf because Server Admin will erase it as soon as we touch Server Admin.
Log on "root" on your server and go into /etc/nat folder.
You will find three files : natd.conf.apple, natd.plist, natd.plist.default
Server Admin use natd.plist to generate nat.conf.apple.
We will edit natd.plist.
Just before the two last lines ( and ), add the following block with your favorite editor pico or vi :
redirect_port
proto
TCP or UDP
targetIP
LAN_ip
targetPortRange
LAN_ip_range
aliasIP
WAN_ip
aliasPortRange
WAN_port_range
For example, my WAN adress is 12.12.12.12 and I want to redirect the port 80 to 192.168.1.100 : my block would be :
redirect_port
proto
TCP
targetIP
192.168.1.100
targetPortRange
80
aliasIP
12.12.12.12
aliasPortRange
80
Reload NAT with Server Admin or the command line :
SystemStarter start NAT
--------
Scott - MacOSX.com Tech Support