This article describes how to configure RDGateway Server. You need to have "Remote Desktop Service" - "Remote Desktop Gateway" server role installed.
In this article, we set the Public Gateway name as: rdgateway.deepnetsecurity.com. But, the gateway machine internal domain is called: rdg.opensid.net. You need to make sure gateway server is a domain member machine.