Windows 7 firewall - allow alternate ports for RDP

scottfreeze

New member
Local time
4:10 PM
Messages
14
Hi all,

I'm looking for help configuring Windows 7 (RTM) firewall to allow traffic for an alternate Remote Desktop listening port in the most secure way possible. I know how to just open up the port completely, which works, but I'd rather not do that if I can just open it up for the Remote Desktop program.

I don't seem to be able to just "copy" the built-in Remote Desktop rule and change the port because the port number cannot be edited in some of the built in rules (or copies thereof, I guess). If it matters, I need to be able to access this port with both "old" and "new" versions of Remote Desktop (from an XP machine, as well as another windows 7 machine, for example).

Can anyone offer any assistance or otherwise offer any advice for my situation?

Thanks,
Scott
 

My Computer My Computer

At a glance

Windows 7 RTMXeon E3110 3.0 GHz4 GB Patriot Extreme DDR2On-board
Computer Manufacturer/Model Number
Home built
OS
Windows 7 RTM
CPU
Xeon E3110 3.0 GHz
Motherboard
Asus P5E-VM HDMI
Memory
4 GB Patriot Extreme DDR2
Graphics Card(s)
On-board
Sound Card
On-board
Hard Drives
Western Digital WD7500AACS 750 GB
PSU
See case
Case
Antec NSK1380 MicroATX with 350W PSU
AFAIK, RDP has always used 3389 - why would you need separate posts? After all, you cannot have multiple RD sessions, anyway, coming into the machine, so I fail to see the need for alternate ports....

Have you tried editing the existing ED rule to just add another port?
 

My Computers My Computers

  • At a glance

    Windows 11 21H2 Current buildAMD Ryzen 9 3950X4 * 32 GB - Corsair Vengeance 3600 MHzEVGA GeForce RTX 3080 Ti XC3 ULTRA GAMING (12...
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    The Beast Model A (homebrew)
    OS
    Windows 11 21H2 Current build
    CPU
    AMD Ryzen 9 3950X
    Motherboard
    MSI MEG X570 GODLIKE
    Memory
    4 * 32 GB - Corsair Vengeance 3600 MHz
    Graphics Card(s)
    EVGA GeForce RTX 3080 Ti XC3 ULTRA GAMING (12G-P5-3955-KR)
    Sound Card
    Realtek® ALC1220 Codec
    Monitor(s) Displays
    2x Eve Spectrum ES07D03 4K Gaming Monitor (Matte) | Eve Spec
    Screen Resolution
    3x 3840 x 2160
    Hard Drives
    3x Samsung 980 Pro NVMe PCIe 4 M.2 2 TB SSD (MZ-V8P2T0B/AM) } 3x Sabrent Rocket NVMe 4.0 1 TB SSD
    PSU
    PC Power & Cooling’s Silencer Series 1050 Watt, 80 Plus Plat
    Case
    Fractal Design Define 7 XL Dark ATX Full Tower Case
    Cooling
    SteelSeries Apex Pro Wired Gaming Keyboard
    Keyboard
    SteelSeries Apex Pro
    Mouse
    Logitech MX Master 3S | MX Master 3 for business
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
    Antivirus
    Windows Defender + MB 3
    Browser
    Nightly (default) + Firefox (stable),Chrome, Edge
  • At a glance

    ChromeOS Flex Dev Channel (current)Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 250...16 GBIntel(R) HD Graphics 520
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    Dell Latitude E5470
    OS
    ChromeOS Flex Dev Channel (current)
    CPU
    Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)
    Motherboard
    Dell
    Memory
    16 GB
    Graphics Card(s)
    Intel(R) HD Graphics 520
    Sound Card
    Intel(R) HD Graphics 520 + RealTek Audio
    Monitor(s) Displays
    Dell laptop display 15"
    Screen Resolution
    1920 * 1080
    Hard Drives
    Toshiba 128GB M.2 22300 drive
    INTEL Cherryville 520 Series SSDSC2CW180A 180 GB SATA III SSD
    PSU
    Dell
    Case
    Dell
    Cooling
    Dell
    Keyboard
    Dell
    Mouse
    Logitech MX Master 3S (shared w. Sys 1) | Dell TouchPad
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
Thanks for the reply. The reason I'd like to open alternate ports is because I have two computers behind my router that I'd like to connect to with Remote Desktop. I have the router configured to forward requests on port 3389 to one computer, and another port for the other computer.

As for editing the existing rule, when I try to do that I get the following message:

"This is a predefined rule and some of its properties cannot be modified."
 

My Computer My Computer

At a glance

Windows 7 RTMXeon E3110 3.0 GHz4 GB Patriot Extreme DDR2On-board
Computer Manufacturer/Model Number
Home built
OS
Windows 7 RTM
CPU
Xeon E3110 3.0 GHz
Motherboard
Asus P5E-VM HDMI
Memory
4 GB Patriot Extreme DDR2
Graphics Card(s)
On-board
Sound Card
On-board
Hard Drives
Western Digital WD7500AACS 750 GB
PSU
See case
Case
Antec NSK1380 MicroATX with 350W PSU
Hmmm, doesn't your router allow port mapping? I mean that it takes incoming, say port 4455, and sends that to IP#1 @ port 3389, and takes incoming @ port 3389 and sends to IP #2 @ 3389?

As for editing the existing rule, yah, saw that myself when I started fooling with it.

However, I think using the path
Code:
%windir%\system32\mstsc.exe
I think you might be able to create a second rule if need be....and make it a separate port....
 

My Computers My Computers

  • At a glance

    Windows 11 21H2 Current buildAMD Ryzen 9 3950X4 * 32 GB - Corsair Vengeance 3600 MHzEVGA GeForce RTX 3080 Ti XC3 ULTRA GAMING (12...
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    The Beast Model A (homebrew)
    OS
    Windows 11 21H2 Current build
    CPU
    AMD Ryzen 9 3950X
    Motherboard
    MSI MEG X570 GODLIKE
    Memory
    4 * 32 GB - Corsair Vengeance 3600 MHz
    Graphics Card(s)
    EVGA GeForce RTX 3080 Ti XC3 ULTRA GAMING (12G-P5-3955-KR)
    Sound Card
    Realtek® ALC1220 Codec
    Monitor(s) Displays
    2x Eve Spectrum ES07D03 4K Gaming Monitor (Matte) | Eve Spec
    Screen Resolution
    3x 3840 x 2160
    Hard Drives
    3x Samsung 980 Pro NVMe PCIe 4 M.2 2 TB SSD (MZ-V8P2T0B/AM) } 3x Sabrent Rocket NVMe 4.0 1 TB SSD
    PSU
    PC Power & Cooling’s Silencer Series 1050 Watt, 80 Plus Plat
    Case
    Fractal Design Define 7 XL Dark ATX Full Tower Case
    Cooling
    SteelSeries Apex Pro Wired Gaming Keyboard
    Keyboard
    SteelSeries Apex Pro
    Mouse
    Logitech MX Master 3S | MX Master 3 for business
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
    Antivirus
    Windows Defender + MB 3
    Browser
    Nightly (default) + Firefox (stable),Chrome, Edge
  • At a glance

    ChromeOS Flex Dev Channel (current)Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 250...16 GBIntel(R) HD Graphics 520
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    Dell Latitude E5470
    OS
    ChromeOS Flex Dev Channel (current)
    CPU
    Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)
    Motherboard
    Dell
    Memory
    16 GB
    Graphics Card(s)
    Intel(R) HD Graphics 520
    Sound Card
    Intel(R) HD Graphics 520 + RealTek Audio
    Monitor(s) Displays
    Dell laptop display 15"
    Screen Resolution
    1920 * 1080
    Hard Drives
    Toshiba 128GB M.2 22300 drive
    INTEL Cherryville 520 Series SSDSC2CW180A 180 GB SATA III SSD
    PSU
    Dell
    Case
    Dell
    Cooling
    Dell
    Keyboard
    Dell
    Mouse
    Logitech MX Master 3S (shared w. Sys 1) | Dell TouchPad
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
I tried using:
%windir%\system32\mstsc.exe

as the program name, but this rule does not work. I'm trying to connect from an XP computer, so my guess is that the XP version and the windows 7 version of the mstsc.exe are different enough that the windows 7 firewall doesn't recognize them as the same for the purposes of the rule. That's the best I could come up with.

With respect to the port mapping, my router software (linksys wrt54g2) only allows me to forward incoming ports to IP addresses, not specific ports at that IP address. Maybe a third party firmware for the router would allow me to do this? That would be pretty slick, and would probably be a good solution to my problem... I'll look into it.
 

My Computer My Computer

At a glance

Windows 7 RTMXeon E3110 3.0 GHz4 GB Patriot Extreme DDR2On-board
Computer Manufacturer/Model Number
Home built
OS
Windows 7 RTM
CPU
Xeon E3110 3.0 GHz
Motherboard
Asus P5E-VM HDMI
Memory
4 GB Patriot Extreme DDR2
Graphics Card(s)
On-board
Sound Card
On-board
Hard Drives
Western Digital WD7500AACS 750 GB
PSU
See case
Case
Antec NSK1380 MicroATX with 350W PSU
Hi all,

Thanks for the replies. In the end, I took JohnGalt's advice and set up port-to-port (single port) forwarding. Because the Linksys WRT54G2 default firmware doesn't allow this, I flashed my router with DD-WRT, which does allow port-to-port forwarding. This allowed me to keep the Remote Desktop listening at port 3389 (default) and also use the built-in Windows Firewall rules, while at the same time directing external Remote Desktop requests to two different computers on my home network by specifying the port from the RDP client.
 

My Computer My Computer

At a glance

Windows 7 RTMXeon E3110 3.0 GHz4 GB Patriot Extreme DDR2On-board
Computer Manufacturer/Model Number
Home built
OS
Windows 7 RTM
CPU
Xeon E3110 3.0 GHz
Motherboard
Asus P5E-VM HDMI
Memory
4 GB Patriot Extreme DDR2
Graphics Card(s)
On-board
Sound Card
On-board
Hard Drives
Western Digital WD7500AACS 750 GB
PSU
See case
Case
Antec NSK1380 MicroATX with 350W PSU
scottfreeze,

I had this same problem and the solution is actually so rediculously simple that I wanted to slam my head against the wall after fighting with it for hours.

You create a custom rule with the program specifications set exactly like the preconfigured one. In other words, you assign the rule to a specific program and the path is "System". Set it to your custom TCP port and save it. Go back and edit it, go to the Advanced tab and make sure you allow Edge Traversal. As long as you port forward it in your router then you're golden.

I could do what you did, but I feel much more comfortable with it being on a completely different port.
 

My Computer My Computer

At a glance

Windows 7 Ultimate
OS
Windows 7 Ultimate
Hi all,

Thanks for the replies. In the end, I took JohnGalt's advice and set up port-to-port (single port) forwarding. Because the Linksys WRT54G2 default firmware doesn't allow this, I flashed my router with DD-WRT, which does allow port-to-port forwarding. This allowed me to keep the Remote Desktop listening at port 3389 (default) and also use the built-in Windows Firewall rules, while at the same time directing external Remote Desktop requests to two different computers on my home network by specifying the port from the RDP client.

I am highly surprised that the native Router did not allow port forwarding in the settings. however, you're still better off with DD-WRT - it rocks.

****

Good answer, Kaosu - I didn't think about the Edge traversal part of the FW settings. makes sense, in retrospect.

Stickified and Rep added.
 

My Computers My Computers

  • At a glance

    Windows 11 21H2 Current buildAMD Ryzen 9 3950X4 * 32 GB - Corsair Vengeance 3600 MHzEVGA GeForce RTX 3080 Ti XC3 ULTRA GAMING (12...
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    The Beast Model A (homebrew)
    OS
    Windows 11 21H2 Current build
    CPU
    AMD Ryzen 9 3950X
    Motherboard
    MSI MEG X570 GODLIKE
    Memory
    4 * 32 GB - Corsair Vengeance 3600 MHz
    Graphics Card(s)
    EVGA GeForce RTX 3080 Ti XC3 ULTRA GAMING (12G-P5-3955-KR)
    Sound Card
    Realtek® ALC1220 Codec
    Monitor(s) Displays
    2x Eve Spectrum ES07D03 4K Gaming Monitor (Matte) | Eve Spec
    Screen Resolution
    3x 3840 x 2160
    Hard Drives
    3x Samsung 980 Pro NVMe PCIe 4 M.2 2 TB SSD (MZ-V8P2T0B/AM) } 3x Sabrent Rocket NVMe 4.0 1 TB SSD
    PSU
    PC Power & Cooling’s Silencer Series 1050 Watt, 80 Plus Plat
    Case
    Fractal Design Define 7 XL Dark ATX Full Tower Case
    Cooling
    SteelSeries Apex Pro Wired Gaming Keyboard
    Keyboard
    SteelSeries Apex Pro
    Mouse
    Logitech MX Master 3S | MX Master 3 for business
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
    Antivirus
    Windows Defender + MB 3
    Browser
    Nightly (default) + Firefox (stable),Chrome, Edge
  • At a glance

    ChromeOS Flex Dev Channel (current)Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 250...16 GBIntel(R) HD Graphics 520
    Computer type
    PC/Desktop
    System Manufacturer/Model Number
    Dell Latitude E5470
    OS
    ChromeOS Flex Dev Channel (current)
    CPU
    Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)
    Motherboard
    Dell
    Memory
    16 GB
    Graphics Card(s)
    Intel(R) HD Graphics 520
    Sound Card
    Intel(R) HD Graphics 520 + RealTek Audio
    Monitor(s) Displays
    Dell laptop display 15"
    Screen Resolution
    1920 * 1080
    Hard Drives
    Toshiba 128GB M.2 22300 drive
    INTEL Cherryville 520 Series SSDSC2CW180A 180 GB SATA III SSD
    PSU
    Dell
    Case
    Dell
    Cooling
    Dell
    Keyboard
    Dell
    Mouse
    Logitech MX Master 3S (shared w. Sys 1) | Dell TouchPad
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
Back
Top