Your internet router might be spying on you.

But there's a simple solution: turn it off, and turn it on again.

The FBI and the Department of Homeland Security are urging everyone in New Jersey and nationwide with a router in their home or home office to perform a quick reset in order to help them detect the presence of Russian-linked malware known as VPNFilter.

The malware, operated by the Sofacy Group, can collect data that passes through routers or render them inoperable altogether, officials said. The Sofacy Group, also known as A.P.T. 28 and Fancy Bear, is believed to be linked to Russia's military intelligence agency.

Talos, the threat intelligence division of the tech company Cisco, recently published a report estimating at least 500,000 routers in at least 54 countries have been infected by the malware.

So how will the reset help?

The Justice Department recently obtained a court order allowing it to seize toknowall.com, the domain name used by VPNFilter to control routers. Rebooting interrupts the malware, if present. It will then try to re-connect, allowing the FBI to record the IP address and stop it.

The easiest way to reboot is simply to unplug the device, wait a full 30 seconds and plug it back in. If you have an associated app (like Google Wifi), the best thing to do is to reboot from the device settings for the network. The F.B.I. also suggests upgrading firmware and updating passwords. They also suggest that you disable any remote management features.

Affected devices include models by Linksys, Netgear, Mikrotik and QNAP, though the full extent is unknown and a reboot, regardless of device, is still recommended.

Disha Raychaudhuri may be reached at draychaudhuri@njadvancemedia.com. Follow her on Twitter.