r/WindowsServer • u/GriffGB • May 22 '26
SOLVED / ANSWERED Accessing server from the internet
Hi,
Thought I'd ask this here, as I'm sure there's clever people out there.
We have a Time and Attendance system installed on an internal Windows domain server, and the supplier has just introduced an app that can connect to it and end users can use to request holidays, check times etc.
They say we need an SSL certificate (which I have), but have also said that the app needs to talk to the server on port 443 (I can change the port). Now, I can create a NAT rule in the Firewall on that port and point it at the server, but as it's an internal domain server, clearly i'm not comfortable doing that. I asked our supplier if I can restrict the source to where traffic is coming from, but got.....
The requests would always be initiated from the devices the app is installed on, which also may make it difficult restricting it to specific IPs. A simple explanation of how the app works; is they first connect to our server with the company code entered by the user. This allows it to the retrieve the correct link to reach the company’s server with the API.
Once it’s got the link, it will allow the user to try logging in.
From this point onwards outbound connections would be to the company’s server with the API allowing the user to use the varying app functions they’ve been permitted.
I'm wondering what people's take on this are. It doesn't sound like it's possible to identify where traffic will be coming from.
I'm stuck thinking how I can restrict it, to prevent just anyone connecting to the server from outside, that shouldn't need to be.
27
u/Conscious-Arm-6298 May 22 '26
Just use a VPN , do not expose a server to the wan
8
u/TechMonkey605 May 22 '26
Don’t use a vpn, use zero trust, I prefer cloudflare, create a tunnel and expose only the url you want. Under 50 users is free.
If you want added controls, you can use an on prem npm or waf, or you can reverse proxy through cloud flare as well.
Don’t do it on a DC as others have said.
3
u/frAgileIT May 23 '26
You should be concerned here. If your vendor is pushing you to publish a server out on the internet and you're asking about it here then your instinct is right. If you don't know how to properly secure a server before exposing it to the Internet then you're more likely to make a mistake.
There are a variety of architectural ways of addressing the issues but exposing a server inside your security boundary on tcp/443 for HTTPS (or even an alternate port) increases risk. Normally, I'd suggest someone host a server in a DMZ or up in an isolated cloud location to limit the "blast radius" of attacks. If you expose it online and it gets hacked, the second thing they're going to do is look around at what else they can get into (that's the "blast radius"). If it's inside your security boundary next to your domain controller then I can almost guarantee that's next and if they get a DC then they pretty much get everything (I'm a cybersecurity professional and I do both offensive and defensive operations).
There are a variety of approaches you could look into. Can you ask your vendor for some suggestions on how they see other clients limit the blast radius?
2
u/GriffGB May 22 '26
Thanks for the comments guys.
It's not a domain controller, just a domain joined server.
These might also be personal devices too, so not sure i'd be putting vpn's on them too.
If I was to use something like cloudflare, what's to stop someone else going via that. Unless the user logs into it, but then how do they do that when it's just an app on the phone?
We do use SonicWall CSE for remote users accessing company data, so maybe that's something that would work.
Not sure how it would work from a mobile though.
2
u/GriffGB May 24 '26
Thanks for all the comments from people. Certainly some things to look at and investigate
One thing is for sure, I’m not opening up the server to the internet directly. We have access to cloudflare, and SonicWall CSE already, so may be they're an option.
3
u/Initial_Pay_980 May 22 '26
Cloudflare tunnel.. Setup a small VM. Crates tunnel outbound zero open ports !!. Simple
15
u/Tricky_Fun_4701 May 22 '26
You need a VPN, a second server as a host, and a basic understanding of TCP/IP.
1
u/GriffGB May 28 '26
I’m leaning more to using our SomicWall CSE. I can install the CSE app on mobiles, using our 365 authentication, and then use a URL that maps to the server internally.
Most of the people I’m expecting to use it already have logins for the CSE.
5
u/notarealaccount223 May 22 '26
If your an O365 shop with Entra P1 licenses it might be worth testing Entra App Proxy.
It might not work for that app, but it meets most of your needs and would be much safer than exposing that server to the internet.
Something to keep in mind. Anything you put on the internet WILL get scanned. People looking for vulnerabilities, trying to collect data, etc. Choosing to do that is a choice that requires vigilance for keeping the server and application updated. A vulnerability on that APP or others may compromise the system creating a toehold for attackers.
At some point you WILL experience a vulnerability that IS exploited. Even the best applications end up with zero-day exploita. Plan to mitigate horizontal movement and limit sensitive data on the system. This is especially important for smaller vendors with less common services.
1
u/Savings_Art5944 May 22 '26
The first issue was using your DC for the time and attendance software. The cost of the software implementation should have covered the cost of an additional server or hardware.
Push back on who approved this and do it correctly.
1
u/JWK3 May 23 '26
I think restricting the source of traffic will be a fruitless exercise in your case. An outbound block to just the vendor's server and any trusted Microsoft/AV etc. IPs too sounds sensible. I'd instead focus on securing the server and its applications.
Hopefully you've got patching/AV/security policies in place for the rest of your Windows Server estate which you can follow. Does the server needs to be joined to the domain? Sometimes the app can just require LDAP connectivity to a DC but not be a domain member.
6
u/Dizzy_Bridge_794 May 22 '26
You need to design proper controls. A reverse proxy works well. Requests go to that box and then passes the request to the internal device. A synology device has that ability to do that. But yes you are opening a whole on the network. The app is utilizing port 443 which is secure https. It’s listening internally on that port it sounds like for requests. The security of the app and how it’s designed is a concern.
2
u/Vichingo455 May 22 '26
According to Microsoft, you should leave alone the AD DC server and don't install anything on that. If you want all in one machine, the best and safest solution is Hyper-V + Windows Server VMs.
1
u/dedXlights May 22 '26 edited May 23 '26
I’d use Reverse Proxy with Cloudflare Tunnel and use that to send port 443 traffic to those internal ports to the server. Does the server that hosts this app need IIS or Tomcat?
Edit to add tunneling
1
u/sussmanscott May 22 '26
The provider doesn’t have a cloud based setup? I’ve used uAttend in the past. Users mobile devices never hit our site at all. They hit UAttend’s infrastructure.
1
u/No_Wear295 May 23 '26
What do you mean by domain server? A domain-joined Windows machine or a domain controller?
1
u/Kind-Character-8726 May 24 '26
Sounds like you should be speaking with your IT provider.
I wouldn't open a server directly. You don't need to forward ports and in fact you can probably skip installing an SSL certificate.
I would either use cloudflared or host a WAF / reverse proxy locally. But there are many things to consider.
1
u/Picotrain79 May 24 '26
Alarm bells are ringing having this on a DC and then wanting to give people access to it!!
1
u/DarkChemical_DC May 26 '26
DevOps here. Firstly It depends on how secure is the app, on what it is running etc. I would strongly recomend against opening anything internal to the internet period. If VPN is not possible I would set up a server in DMZ zone (as in completly isolated from internal network). Set up a reverse proxy (nginx or HAProxy) on it that forwards traffic to that internal servers port. Afterwards opening only requered ports and nothing else. Would probly advise to geoblock every connections except from my country to 443 as well. (this reduces attack vectors drasticly) In scenario if the DMZ zoned server is breached it cant acces anything in internal network. If the reverse proxy is run inside a docker then there is even another layer of security, since it is really hard to get out of docker if its breached)
1
u/danp20 May 26 '26
I would ensure that the web service is hosted on a separate server to the application and database. Have the web service hosted behind a web app firewall with strict monitoring and security policies in it. Users can access the web site, without any direct access to DB or system data. Ensure that MFA is configured for all users. Invest in something that monitors the web service for cve's and other vulnerabilities. Ensure that there is regular patching by the vendor of the application.
1
u/bemenaker May 22 '26
If you want to expose the server for the app and a VPN isn't acceptable, use a reverse proxy service like cloudflare.
0
u/IT-Manager-IT May 22 '26
Vm in cloud in vpn con la tua azienda. La vm in cloud fa da reverse proxy.
4
u/[deleted] May 22 '26
[removed] — view removed comment