Networking – Port forwarding not working for port 9

networkingportport-forwardingrouterwake-on-lan

I'm trying to set up my PC to work with Wake on LAN so I set up port forwarding on port 9 on my
TP-Link Archer C2 router. However, when I use this tool to check whether the port is open, it says it is closed. I created an inbound rule in my firewall that allows connection through port 9 and I don't know what else could be causing it to not work properly.

Note: I disabled DHCP so I always have the same IP address.

IPv4 Address: 192.168.1.100
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1

UPDATE: I tried binding the MAC address to the IP in the router settings as suggested here instead of disabling DHCP via the OS, but I still couldn't wake the PC up using my phone, unless my phone was in the same network when the PC shut down and didn't exit that network.

Best Answer

Seems like the "Is this port open" checking tools' results are not so relevant after all. What I did in the end to be able to use my phone to turn on my PC remotely, regardless of the network I am in, was to follow the steps described here for my router and set up a Dynamic DNS hostname. I'll describe each step here for future reference.

1. Enable Wake on LAN from the BIOS

For my ASUS ROG motherboard, this was under Advanced -> APM -> Enable Power On by PCIE.

2. Allow the Network Adapter to wake up the computer via magic packet

In Windows 10, this can be done by going to Device Manager -> Network Adapters -> Properties -> Power Management -> Allow this device to wake up the computer (Optional: Only allow a magic packet to wake up the computer).

3. Change router settings

For a TP-Link router, settings can be accessed by typing tplinklogin.net in the address bar. To find out the Network Card's MAC (Physical) Address, open the Command Prompt and type in ipconfig /all.

3.1. IP & MAC binding

This links the MAC Address of the Network Card to a chosen IP so the router knows to send the packet to the Network Card even when the PC is offline. For a TP-Link router, this is under IP & MAC Binding -> Binding Settings.

3.2. DHCP Address Reservation

This ensures that the PC gets assigned the same IP address every time it comes online. For a TP-Link router, this is under DHCP -> Address Reservation.

3.3. Port Forwarding

This redirects a request coming from WAN to the chosen IP above. I chose ports 7-9 so in case one doesn't work, I can use another. The default is port 9 for WoL. This setting can be found under Forwarding -> Virtual Server for a TP-Link router.

4. Pick a Dynamic DNS hostname

I used the no-ip service because it is free, but you have to confirm the hostname every 30 days if you want it to keep working. I downloaded the client and changed the settings so it starts with Windows.

5. Set up WoL application

  • TeamViewer

    To use TeamViewer to wake up your computer, go to Extras -> Options -> General -> Wake-on-LAN (Configure...), select Public address and type in the Dynamic DNS hostname chosen at step 4 and one of the ports you are forwarding to (in my case, 7, 8, or 9 - I chose 9). Make sure the target computer is assigned to your account.

  • WoL app

    For a Wake-on-LAN application such as this one, you will need to enter the MAC address of the target computer as well as the port and hostname.

Another useful link with more details if necessary can be found here.

Related Question