You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

Multiple Server behind one IP Airport

Hi,

I have a 10.12 macOS server 5.3.1 server for filesharing and ProfileManager and Open Directory.

I recently bought a new macMini i7 for my Filemaker Server. They both will run behind the same static IP.

access.mydomain.com at 10.xx.xx.10 is the server. fmservermydomain.com is the filemaker server at interna ip 10.xx.xx.20.

I have DNS set up, so that once you hit my external IP 201.6.xxx.2 you come my Airport, from there internal DNS at 10.xx.xx.10 is a namesever and should send traffic for fmserver.mydomain.com to 10.xx.xx.20 and so forth.

Somehow this does not work. Where in the http.config files I have to fiddle?

Or.. How is best practice to set this up?

Help appreciated.

Pierre

Posted on Oct 26, 2019 2:53 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 28, 2019 5:16 PM

Follow the previous reverse-proxy link. I’ve not tried that on macOS as I prefer to isolate what’s exposed and to reduce the numbers of exposed systems in the DMZ, but it’s Apache underneath so it should work with mod_proxy.


Another more complex option is a web router, but that’s yet another box, more complex, and it’ll need to deal with TLS. Using the existing web server as a pass-through proxy is probably the least parts

Similar questions

9 replies
Question marked as Top-ranking reply

Oct 28, 2019 5:16 PM in response to Pierre Froelicher1

Follow the previous reverse-proxy link. I’ve not tried that on macOS as I prefer to isolate what’s exposed and to reduce the numbers of exposed systems in the DMZ, but it’s Apache underneath so it should work with mod_proxy.


Another more complex option is a web router, but that’s yet another box, more complex, and it’ll need to deal with TLS. Using the existing web server as a pass-through proxy is probably the least parts

Oct 26, 2019 8:02 PM in response to Pierre Froelicher1

The Airport as a router/firewall may give your some limitations. However, you should be able to creatively overcome matching port forwards if needed. The Airport can do port forwarding and translated port forwarding. Based on what you have defined above, you have the following (replace with your real values):


Public IP address: 201.202.203.204


Private Server 1 (access.domain.com at 10.0.0.10) running:

• Profile Manager = tcp port 80 or 443 (ideally 443 with a certificate)

• Open Directory = tcp port 389 or 636 (ideally, you would NOT allow public access to OD)

• File Sharing = tcp 548 for AFP and tcp 139 and 445 for SMB (ideally, you would NOT allow public access to file sharing protocols


Private Server 2 (fmserver.domain.com at 10.0.0.20) running:

• FileMaker Server = how are you accessing? WebPublishing? What port? 443? Perhaps 8443. 5003 for the fat client?


You want to use the Airport to map ports to private addresses. The challenge you have is that if you are trying to do port 443 to both Profile Manager and FileMaker, you can't do it with straight mapping. You will either need to alter FileMaker's port or use port translation on the Airport.


For example, let's say you run Profile Manager on 443 and FileMaker on 8443. This is the easiest and most straight forward. In at the Airport, you would create two Port Setting rules:


Rule 1: For Profile Manager running on 10.0.0.10

Description: Custom - Profile Manager

Public UDP Ports:

Public TCP Ports: 80, 443

Private IP Address: 10.0.0.10

Private UDP Ports:

Private TCP Ports: 80, 443


Rule 2: For FileMaker running on 10.0.0.20

Description: Custom - FileMaker Web Publishing

Public UDP Ports:

Public TCP Ports: 8443

Private IP Address: 10.0.0.20

Private UDP Ports:

Private TCP Ports: 8443


Do this configuration, you will be able to hit Profile Manager by using a straight URL such as https://access.domain.com. However, to reach FM, you will need https://access.domain.com:8443. Or, if you want to have two hosts as noted above, make sure you use public DNS to point both access and fmserver to the same public IP, 201.202.203.204. Then you can use https://fmserver.domain.com:8443.


Remember, your configuration is a split horizon DNS. You are hosting an internal DNS server but only internal devices have access to it. You must configure public DNS to match your private but the public must point to public IP addresses while the private points to private IP addresses.


Now, if you have already deployed FileMaker and it is already on port 443, then you can use a port translation rule. But this will still require the use of an alternate port on the public side as there is no way for the Airport to discern which 443 traffic is supposed to go where.


If this is the case, Rule 1 remains the same as above. However Rule 2 would look like this:


Rule 2: For FileMaker running on 10.0.0.20

Description: Custom - FileMaker Web Publishing

Public UDP Ports:

Public TCP Ports: 8443

Private IP Address: 10.0.0.20

Private UDP Ports:

Private TCP Ports: 443


Note that the public port is 8443 but when traffic on that port is experienced, it is translated to port 443 running on device 10.0.0.20. In this scenario, the Public TCP Port number can be just about anything you want. But what you pick will be part of your public URL. So lets say you pick port 20443, then the public address is https://fmserver.domain.com:20443. But you private URL is https://fmserver.domain.com. This can be confusing and breaks the goals of split horizon (maintaining a unified URL reference for both public and private visitors).


Hope this is helpful.


Reid








Oct 27, 2019 2:21 PM in response to Strontium90

Reid,

thank a lot for you extensive answer. However since Filemaker server 17 no longer can we change the ports the server is listening. So.. I have on my network two apache appliances access and fmserver that listen on 80/443.

I think there is a workaround with Reverse Proxy. Precursor.ca Alexey has written a tutorial which I followed in earlier years but it all assumes that we can change the ports each server is listening.

I hear your suggestion of using an external Port number xxxx that translates internally to fmserver.mydomain.com.. But I still would rather not have this, being not "elegant" as you have pointed out.

I will continue looking ..

PS

Great fan of you books.. Read them all!

Oct 27, 2019 3:21 PM in response to Strontium90

Actually,

Reading some I think I can rephrase my question.

How do I with macOS Server 5.3.1 run multiple sites on multiple machines.

I think that is the sole question.

The Server.app is somehow taking hold of all 80/443 traffic.

Or I might upgrade my Airport/Firewall.. to something that can direct fmserver.mydomain.com and access.mydomain.com to two internal IP's.. something the Server.app with DNS does not seem to be able to.

It must be in Virtual Host or Reverse Proxy..

Oct 27, 2019 3:40 PM in response to Pierre Froelicher1

What you’re looking for here is called a “reverse proxy”. This allows one host to pass through HTTP queries to other hosts accessible to the server.


From the perspective of the IP network connection, DNS gets the remote client (browser, app) from name to IP address. The DNS name does not pass over the IP connection. Not unless that happens between the client and the server application, using an application-specific protocol.


HTTP does pass the target host name within the HTTP traffic, which is how Apache implements virtual hosts.


The remote web client or web app “tells” the web server what web site is sought, and the web server then uses that to select the files to provide. That host name passes over the network connection, between the client app (browser, web app) and the server.


Pragmatically, a web server is a database, and the HTTP commands are database queries. There don’t need to be files or anything else around “behind” the web server, as all that can potentially be generated dynamically. This is how web tools such as Tomcat or Django work, too. There doesn’t need to be any HTML files around at all, if the data access is entirely data driven.


You’re not going to get the firewall to snoop this traffic as it’ll be protected by TLS, which means you’ll need to use one if your web servers as an intermediate host; as a proxy. Your AirPort won’t “know” any of this is going on, it always forwards inbound TCP port 80 and TCP 443 to the same host.


Now if this isn’t publicly-accessible network and “public” web server traffic, then a VPN would probably be a vastly better approach. With the VPN, your client host appears to be connected to the target network.

Oct 28, 2019 2:13 PM in response to Pierre Froelicher1

Thanks for the kind words regarding the books. I keep telling myself I will get another set out but... So it goes. Would love to do the ultimate guide to Apple Business/School Manager + MDM and how to manager Macs the modern way. And I still see a need for macOS Server. Spotlight is too good and workflows simply do not want to give it up. One day.


So, the question about Server.app taking ports. You can run multiple services on a single system that need the same port if you use multihoming and edit the “/Library/Server/Web/Config/Proxy/apache_serviceproxy.conf” file. Details are on pages 62 trough 66 of the latest blue book (Foundation Services).


By locking Apple's services to the primary IP address, you can run other services that need port 443 and 80 on additional interfaces. For example, FileMaker, Rumpus, etc. The 3rd party product must allow binding to an IP address or interface to work.


As always, hope this helps.


Reid


Oct 28, 2019 3:33 PM in response to Strontium90

Reid,

my problem is simpler, since I have two distinct CPUs.

However even being on another IP, Filemaker Server will use 80/443... and that insists on falling onto the macOS server.. on ip 10.0.x.10 and not on 10.0.x.20.. where Filemaker Server Http installation would wait.

How do I do this with macOS Server, custom websites and some fiddling in Reverse Proxy settings?

Oct 28, 2019 3:39 PM in response to MrHoffman

Hoffman,

Thank you for you answer.

If in macOS Server I create two sites for ports 80/443, for my Filemaker Server running on another machine inside the same LAN.. How do I Reverse Proxy, so that fmserver.mydomain.com goes to 10.0.x.20 and access.mydomain.com goest to 10.0.x.10.


VPN is not a solution since fmserver.mydomain.com must resolve for REST and external server access to work. The Filemaker Port is 5003 and that works. But REST, and Web Direct need port 80 and 443. That is the conundrum.

Thank you still for your answer.

Oct 30, 2019 12:52 PM in response to MrHoffman

Mr Hoffman, Reid,


thank you both so much for your answers, both of which where very useful.

But in the end I used Mr Hoffmans tip. Reverse Proxy IS the answer. Reids approach was not possible because Filemaker Server has to operate on 80/443, so no way I could diverge the traffic based on other port numbers.

With my restricted knowledge it seems that.... on a macOS server installation one has to do ReverseProxy with webapps. Alexey Narvey in https://www.precursor.ca/precursor/resources/rais/ describes this. I followed this manual EXACTELY and after some pitfalls, (typed once http instead of https in a config file.. took me 24h to find the typo) everything works as expected.

We have one external IP, in our DNS provider (Route53 AWS) we point fmserver.mydomain and access.mydomain to this one IP, the AirPort Extreme points all 80/443 traffic to server1 (where DNS, OD, Websites, VPN, Filesharing run) where I reverse proxy with webapps to server2 if fmserver is in the domain name where on 80/443 Filemaker Server serves Web Direct and on ports 5003 etc the whole Filemaker stuff.


Here an example web app

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<!-- See man pages for webapp.plist(5) and webappctl(8) for information about this example webapp.plist -->

<plist version="1.0">
<dict> 
	<key>includeFiles</key>
	<array>		<!-- Include files are activated in virtual host when webapp is started -->
		<string>/Library/Server/Web/Config/apache2/httpd_filemakerSSLwebapp.conf</string>
	</array>
	<key>name</key>
	<string>ca.precursor.filemakerSSLwebapp</string>
	<key>displayName</key>		<!-- Name shown in Server app -->
	<string>FilemakerSSLWebApp</string>
	<key>installationIndicatorFilePath</key>	<!-- The presence of this file indicates web app is installed -->
	<string>/Library/FileMaker Server/HTTPServer/conf/httpd.conf</string>
	<key>sslPolicy</key>	<!-- Determines webapp SSL behavior -->
	<integer>0</integer>	<!-- 0: default, UseSSLWhenEnabled -->
			<!-- 1:	UseSSLAlways -->
			<!-- 2:	UseSSLOnlyWhenCertificateIsTrustable -->
			<!-- 3:	UseSSLNever -->
			<!-- 4:	UseSSLAndNonSSL -->
</dict>
</plist>





Multiple Server behind one IP Airport

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