Limit RDP connections for certain user groups to IP


Recommended Posts

I have a win 2003 standard edition server running as a web server, with Remote Desktop to admin it. I also have a static IP address at this end.

I know I can IPSec ALL Remote Desktop connections to a set IP address, but can I somehow limit administrator groups to my static IP address, but allow a standard user to connect from any IP address?

Thanks in advance.

huh?

You can control who has access to remote desktop by group or user account. The builtin administrators group has permissions by default, but you can add other groups or users that you want to be able to remote desktop.

As to IPSec all remote desktop connections?? :blink:

You can modify your IP security policies with secpol.msc, you can create IP filters there as well -- is this what your asking?

Edited by BudMan
  tiddlie said:
No - I want to limit the access to remote desktop via remote IP address. I want only my static IP to be allowed to login via a user in the administrator group, but a 'standard' user to have access from any IP address.
This makes NO sense.. So your allowing users from any IP access.. Then all IPs have access.

Sorry but that tool controls access to the PORT 3389, it does not say oh your from IP address X you can login as a USER, but not as an Admin User.

Oh your from IP Y, you can login as Admin.

"Logon screen is only displayed if the connection is established from particular IPs or machines. Computers that do not meet the filter restrictions don't see the logon screen & won't get to try a brute force logon!"

Since your allowing any IP to use remote desktop.. Then any IP will get the login screen -- an if they have a valid user account that can remote desktop, then they can log in.

Here are the filters you can use from that tool;

--

This is the main SecureRDP page. It includes several filters that can be combined to create very complex conditions that must be met in order to be able to logon to your Terminal Server. These filters include:

IP Address: restricts the connection by checking the client IP Address.

Computer Name: restricts the connection by checking the client computer name.

MAC address: restricts the connection by checking the client PC MAC address. Note that this filter works only for computers on the same subnet as your Terminal Server.

Client Version: restricts the connection by checking the Terminal Services Client version. To make this filter more effective you should be using a customized Terminal Services Client with your own version number. This service is available in our website at http://www.terminal-services.NET.

Time Restriction: restricts the connection by checking the logon date and time.

--

What he is asking does not even make any sense to do anyway.. Users that are NOT admin should really not even have remote desktop access to a server. But since your going to allow them access -- yes if they knew the admin password, they would be able to login as an admin. Even if you blocked their remote desktop login - they could just login as a user, then run whatever they wanted as the admin account.

Edited by BudMan

Agreed -- an than can be done with a simple IP security filter using secpol, or your firewall, etc.

No need for the tool -- its pretty much just a gui that puts some settings all in the same place for people that do not now how to use their own OS ;)

Well, I have no direct access to the server. Obviously, leaving RDP open to all IP addresses is a real problem - goes without saying. Hence why I want to limit the admin access to my static IP address.

I do however, work away from time to time, and only have access to the internet via a laptop on a public or hotel lan. Should I need to access the server whilst away to do a simple task such as edit the php.ini file, or reboot IIS, it would be handy to have a somewhat locked down account that allows me these limited functions. Obviously, this needs to be accessed from a public IP addess.

If this is a roundabout way to do it - hey - we all learn, and advice is always appreciated.

And surely Windows 2003 fits into your description of that tool Budman....a 'gui that puts some settings all in the same place' - 2003 seems to be entierly made up of wizards.....

They have had wizards since the first version of windows -- does not mean you have to use them ;)

An I agree -- I would never open up RDP to the public NET.

You should access it thru a VPN or SSH/SSL tunnel, etc. This allows you to move around, just setup TLS auth to the server -- just keep your cert with you. Be it auth to the VPN/SSL or Remote Desktop or private key access to the SSH server.

This prevents bruteforce attacks, an allows you access from anywhere on the planet.

http://technet2.microsoft.com/windowsserve...3.mspx?mfr=true

Configuring authentication and encryption

http://support.microsoft.com/kb/895433

How to configure a Windows Server 2003 terminal server to use TLS for server authentication

For example -- you can only access my home network with OPENVPN or SSH, I keep my keys on my thumbdrive -- so I can access all of my machines from anywhere on the planet either with just putty an tunnel anything I need or with the openvpn client -- an again all services are open to me just as if I was on the local lan -- just a bit slower ;)

Putting up any type of service that only requires a password to access is just asking for trouble!

edit: BTW the IP an or fqdn to access my server along with the cert/key passwords are in my head -- so even if I loose the thumb drive -- the finder does not have access to anything.

Edited by BudMan
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Because Win7 was beautiful, much faster and more functional. Win10 (glossing over 8 as many do) was slightly faster in some cases, more functional in some cases, but some people such as myself hated how it looked and decided it wasn't worth the upgrade. Some people liked (or were ok with) the look, and thus it is a good upgrade. Win11 is like 10, but is less functional. It literally has nothing going for it, and I use it every day at work so I'm quite familiar with it.
    • I switched my mom from Chrome to Firefox and she had a serious meltdown. She even managed to figure out how to reinstall Chrome, which really surprised me. What finally got her to switch was Chrome no longer being supported on Win7 and me putting a Chrome skin on FF, and setting it up identically.
    • Feels very much like most other gnome based Linux distros. There is minimal amounts that are influenced by Windows 11, maybe just enough to make people who are switching comfortable enough with the idea. As far as I can tell its mainly just turning the 'taskbar' panel as a 100% sized static panel, rather than the default dynamic sized. Turning it from the Mac OS Dock into the Windows taskbar. The Arc Menu - that I assume you're taking not with from the screenshots, is indeed the Windows 11 style one, but it has lots of other options too, from the more traditional gnome, Windows 7 etc. Still free to install what ever Window Manager you want once you're comfortable enough with Linux though.
    • Wow, and here I'm still happily using 1080p...
    • Added an extra filter to Fail2Ban.  I thought about just adding this to my existing aibots filter, but for the time being I'm keeping it separate because it's "possible" real humans may trigger this one so as long as it doesn't start filling my inbox I'd like to get notified about these so I can adjust it as necessary in the future. I'm still holding close to 10k unique IP addresses at any given time that have been banned via the "aibots" filter that looks for certain user agent strings of known AI scrapers.  However, I've been getting an increasing amount of traffic trying to scrape the site with sanitized user agent strings that just look like normal web browsers, however... Because I enabled authentication I can now see that they're racking up lots of 401 (unauthorized) responses in the Apache "access.log" file, but they're not triggering anything in the Apache "error.log" file, which is where failed attempts to log in would appear.  Basically, if an actual human tried to log in with an invalid username and password they don't immediately go into "access.log" as a 401, they go into "error.log" with a status message such as "user FOO not found".  The only way to trigger a 401 simply by visiting the site, as far as I'm aware, is to hit "Cancel" on the login prompt, or otherwise try to access files directly without properly authenticating. So, given the fact I'm getting a few thousand 401 errors a day from sanitized user agent strings that don't show up in "error.log", which means no attempt at logging in properly, I added another jail/filter set to Fail2Ban to immediately ban anybody who triggers a 401.  This feels a bit nuclear so I may need to adjust it in the future, but as far as I'm aware so far no real humans are being inconvenienced so all I'm doing is wasting the time of some AI scraper bots. Example log entry 61.170.149.70 - - [25/Jun/2025:20:01:04 -0400] "GET /content/mdwiki_en_all_maxi_2024-06/A/Neuroregeneration HTTP/1.1" 401 3287 "https://kiwix.marcusadams.me/content/mdwiki_en_all_maxi_2024-06/A/Neuroregeneration" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.43" Contents of /etc/fail2ban/filter.d/apache-401repeat.conf #Fail2Ban filter for bots and scrapers that try to access #files directly without entering credentials for apache2-auth #and therefore trigger lots of 401 errors without triggering #the apache-auth jail. # #Marcus Dean Adams [Definition] failregex = ^<HOST> .+\" 401 \d+ .*$ Contents of /etc/fail2ban/jail.d/apache-401repeat.local [apache-401repeat] enabled = true ignoreip = 10.1.1.1 port = 80,443 filter = apache-401repeat maxretry = 1 bantime = 672h findtime = 10m logpath = /var/log/apache2/access.log Oh, and all this traffic is AFTER I explicitly banned Alibaba's IP ranges that were absolutely blowing me up day and night. Observation; two of the IP addresses that have triggered this jail in the 30 or so minutes since I turned it on were owned by Microsoft.  Wonder if they're doing their own AI scraping/probing, or if that's just an Azure VM owned by somebody else.
  • Recent Achievements

    • Rising Star
      Phillip0web went up a rank
      Rising Star
    • One Month Later
      Epaminombas earned a badge
      One Month Later
    • One Year In
      Bert Fershner earned a badge
      One Year In
    • Reacting Well
      ChrisOdinUK earned a badge
      Reacting Well
    • One Year In
      Steviant earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      552
    2. 2
      ATLien_0
      208
    3. 3
      +FloatingFatMan
      175
    4. 4
      Michael Scrip
      152
    5. 5
      Som
      139
  • Tell a friend

    Love Neowin? Tell a friend!