You need to have "Remote Desktop Service" - "Remote Desktop Gateway" server role installed.
- Launch the "Server Manager"
- Select "Manage", then "Add Roles and Features".
- Click "Next"
- Select "Role-based or feature-based installation", then click "Next".
- Select the server machine, then click "Next".
- In the Server Roles list, select "Remote Desktop Service" page. Click "Next".
- Click "Next".
- Click "Next"
- In the Role Services list, select "Remote Desktop Gateway". Click "Add Features" to install the required features for Remote Desktop Gateway.
- Click "Next"
- Click "Next"
- Click "Next"
- Click "Next"
- Click "Install" to install the role services.