RDP Error: Because of a Protocol Error this Session will be Disconnected

I found this fix on ServerFault but I’m reposting it here:

This problem may occur due to low memory on the remote server. For me, doing the following fixed the problem:

  1. Go to the Experience tab, and disable the following:
    1. Desktop Composition
    2. Visual Styles
    3. Persistent bitmap caching
  2. Go to the Display tab:
    1. Set a smaller resolution
    2. Lower the color depth (for example 15 bit)
    3. Also, if you don’t need the remote audio, go to Local Resources tab:
      1. Click the Remote audio -> Settings…, check Do not play and Do not record

No need to change the RDP Compression from the Group Policy on the remote machine, only disabling these should do the trick.

Tested to work on Windows Server 2008 R2 SP1 as the remote, and Windows 10 Pro as the client.

How To Replicate Windows DHCP Filters

It appears that you have to set this up with PowerShell. Regular DHCP replication only replicates at the Scope level, whereas Filters are set at the Server level. Run this PowerShell command on your secondary DHCP server.

Get-DhcpServerv4Filter -List Deny -ComputerName YOUR_PRIMARY_DHCP_SERVER | Add-DhcpServerv4Filter -Force

Get Client IP in PHP

 * Gets IP address.
function getIpAddress()
    $ipAddress = '';
    if (! empty($_SERVER['HTTP_CLIENT_IP'])) {
        // to get shared ISP IP address
        $ipAddress = $_SERVER['HTTP_CLIENT_IP'];
    } else if (! empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
        // check for IPs passing through proxy servers
        // check if multiple IP addresses are set and take the first one
        $ipAddressList = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
        foreach ($ipAddressList as $ip) {
            if (! empty($ip)) {
                // if you prefer, you can check for valid IP address here
                $ipAddress = $ip;
    } else if (! empty($_SERVER['HTTP_X_FORWARDED'])) {
        $ipAddress = $_SERVER['HTTP_X_FORWARDED'];
    } else if (! empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP'])) {
        $ipAddress = $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
    } else if (! empty($_SERVER['HTTP_FORWARDED_FOR'])) {
        $ipAddress = $_SERVER['HTTP_FORWARDED_FOR'];
    } else if (! empty($_SERVER['HTTP_FORWARDED'])) {
        $ipAddress = $_SERVER['HTTP_FORWARDED'];
    } else if (! empty($_SERVER['REMOTE_ADDR'])) {
        $ipAddress = $_SERVER['REMOTE_ADDR'];
    return $ipAddress;

echo "IP Address: " . getIpAddress();

Adtran NetVanta 3430 Default Configuration

hostname "NV3430G2"
enable password password
ip subnet-zero
ip classless
ip domain-proxy
ip domain-lookup
ip routing
event-history on
no logging forwarding
logging forwarding priority-level info
no logging email
logging email priority-level info
username "admin" password "password"
banner motd #

                ****** Important Banner Message ******

Enable and Telnet passwords are configured to "password".
HTTP and HTTPS default username is "admin" and password is "password".
Please change them immediately.
The ethernet 0/1 interface is enabled with an address of
Telnet, HTTP, and HTTPS access are also enabled.
To remove this message, while in configuration mode type "no banner motd".

                ****** Important Banner Message ******

interface eth 0/1
  ip address dhcp
  ip address secondary
  no shutdown
interface eth 0/2
  no ip address
ip http server
ip http secure-server
line con 0
line telnet 0 4
  password password

Windows FTP to Non-Standard Port

Here’s how to connect to a non-standard port from windows command line:

Connecting to a non-standard ftp port from the Windows command line.
Microsoft Windows [Version 10.0.19042.746]
(c) 2020 Microsoft Corporation. All rights reserved.

ftp> open 1024
Connected to
220 FTP Server ready.
530 Log in with USER and PASS first.
User ( anonymous
331 Username ok, send password.
230 Login successful.
ftp> bye
221 Goodbye.


How To Delete A WSD Printer Port

I’ve found 2 ways to delete a WSD printer port:

With PowerShell

remove-printerport -WSD-PortName -computer serverName

You can use “WSD-*” if you only have one WSD port to delete.

With Windows GUI

Assuming you’ve moved your printer to a different port, just add a dummy printer to the server using the WSD port to be deleted, then delete the dummy printer. Windows should delete the WSD port automatically.

OSPF on Watchguard

!! SECTION 1: Configure interface properties.
! Set properties for interface eth1.
! interface eth1
! Set simple authentication password (SHAREDKEY).
! ip ospf authentication-key SHAREDKEY
! Set MD5 authentication key ID (10) and MD5 authentication key (AUTHKEY).
! ip ospf message-digest-key 10 md5 AUTHKEY
! Set link cost to 1000 (1-65535) on interface eth1.
! for OSPF link cost table.
! ip ospf cost 1000
! Set hello interval to 5 seconds (1-65535); default is 10 seconds.
! ip ospf hello-interval 5
! Set dead-interval to 15 seconds (1-65535); default is 40 seconds.
! ip ospf dead-interval 15
! Set interval between link-state advertisements (LSA) retransmissions
! to 10 seconds (1-65535); default is 5 seconds.
! ip ospf retransmit-interval 10
! Set LSA update interval to 3 seconds (1-3600); default is 1 second.
! ip ospf transmit-delay 3
! Set high priority (0-255) to increase eligibility to become the
! designated router (DR).
! ip ospf priority 255

!! SECTION 2: Start OSFP and set daemon properties.
! Enable OSPF daemon. Must be enabled for all OSPF configurations.
router ospf
! Set the router ID manually to If not set, the firewall will
! set its own ID based on an interface IP address.
ospf router-id
! Enable RFC 1583 compatibility (increases probability of routing loops).
! ospf rfc1583compatibility
! Set area border router (ABR) type to cisco, ibm, shortcut, or standard.
! More information about ABR types is in draft-ietf-ospf-abr-alt-05.txt.
ospf abr-type cisco
! Disable OSPF announcement on interface eth0.
! passive interface eth0
! Set global cost to 1000 (0-429495).
! auto-cost reference bandwidth 1000
! Set SPF schedule delay to 25 (0-4294967295) seconds and hold time to
! 20 (0-4294967295) seconds; default is 5 and 10 seconds.
! timers spf 25 20

!! SECTION 3: Set network and area properties. Set areas with W.X.Y.Z
!! or Z notation.
! Announce OSPF on network network for area
network area 0
! Create area and set a classful network range (
! for the area (range and interface network settings must match).
! area range
! Set virtual link neighbor ( for area
! area virtual-link
! Set area as a stub on all routers in area
! area stub
! area stub no-summary
! Enable simple password authentication for area
! area authentication
! Enable MD5 authentication for area
! area authentication message-digest

!! SECTION 4: Redistribute OSPF routes
! Share route of last resort (default route) from kernel routing table
! with OSPF peers.
default-information originate
! Redistribute static routes to OSPF.
redistribute static
! Redistribute routes from all interfaces to OSPF.
redistribute connected
! redistribute connected route-map
!!Redistribute routes from RIP and BGP to OSPF.
! redistribute rip
! redistribute bgp

!! SECTION 5: Configure route redistribution filters with access lists
!! and route maps.
! Create an access list to only allow redistribution of
! access-list LISTNAME permit
! access-list LISTNAME deny any
! Create a route map with name MAPNAME and allow with a
! priority of 10 (1-199).
! route-map MAPNAME permit 10
! match ip address LISTNAME