[This story was originally published in July 2014 and has been updated with new information ever since.]
Most gateway routers used by home customers are profoundly not secure. Some routers are so vulnerable to attack that they should be thrown out, a security expert said at the HOPE X hacker conference in New York.
- Best Wi-Fi routers for your home or small office
- The best antivirus software to keep your PC clean
- Modem vs. router: How they're different and what they do
"If a router is sold at [a well-known retail electronics chain], you don't want to buy it," independent computer consultant Michael Horowitz said in a presentation.
"If your router is given to you by your internet service provider [ISP], you don't want to use it either, because they give away millions of them, and that makes them a prime target both for spy agencies and bad guys."
Horowitz recommended that security-conscious consumers instead upgrade to commercial routers intended for small businesses, or at least separate their modems and routers into two separate devices. (Many "gateway" units, often supplied by ISPs, act as both.) Failing either of those options, Horowitz gave a list of precautions users could take.
- A router VPN is the best way to secure your Wi-Fi at home
Problems with consumer routers
Routers are the essential but unheralded workhorses of modern computer networking, yet few home users realize they are in fact full-fledged computers, with their own operating systems, software and vulnerabilities.
"A compromised router can spy on you," Horowitz said, explaining that a router under an attacker's control can stage a man-in-the-middle attack, alter unencrypted data or send the user to "evil twin" websites masquerading as often-used webmail or online-banking portals.
Many consumer-grade home-gateway devices fail to notify users if and when firmware updates become available, even though those updates are essential to patch security holes, Horowitz noted. Some other devices will not accept passwords longer than 16 characters.
Millions of routers throughout the world have the Universal Plug and Play (UPnP) networking protocol enabled on internet-facing ports, which exposes them to external attack.
"UPnP was designed for LANs [local area networks], and as such, it has no security. In and of itself, it's not such a big deal," Horowitz said. But, he added, "UPnP on the internet is like going in for surgery and having the doctor work on the wrong leg."
Another problem is the Home Network Administration Protocol (HNAP), a management tool found on some older consumer-grade routers that transmits sensitive information about the router over the Web at http://[router IP address]/HNAP1/, and grants full control to remote users who provide administrative usernames and passwords (which many users never change from the factory defaults).
"As soon as you get home, this is something you want to do with all your routers," Horowitz told the tech-savvy crowd. "Go to /HNAP1/, and, hopefully, you'll get no response back, if that's the only good thing. Frankly, if you get any response back, I would throw the router out."
- Setting up a virtual router is the perfect way to share your connections
The WPS threat
Worst of all is Wi-Fi Protected Setup (WPS), an ease-of-use feature that lets users bypass the network password and connect devices to a Wi-Fi network simply by entering an eight-digit PIN that's printed on the router itself. Even if the network password or network name is changed, the PIN remains valid.
"This is a huge expletive-deleted security problem," Horowitz said. "That eight-digit number will get you into the [router] no matter what. So a plumber comes over to your house, turns the router over, takes a picture of the bottom of it, and he can now get on your network forever."
That eight-digit PIN isn't even really eight digits, Horowitz explained. It's actually seven digits, plus a final checksum digit. The first four digits are validated as one sequence and the last three as another, resulting in only 11,000 possible codes instead of 10 million.
"If WPS is active, you can get into the router," Horowitz said. "You just need to make 11,000 guesses" — a trivial task for most modern computers and smartphones.
Then, there's networking port 32764, which French security researcher Eloi Vanderbeken in 2013 discovered had been quietly left open on gateway routers sold by several major brands. Using port 32764, anyone on a local network — which includes a user's ISP — could take full administrative control of a router, and even perform a factory reset, without a password.
The port was closed on most affected devices following Vanderbeken's disclosures, but he later found that it could easily be reopened with a specially designed data packet that could be sent from an ISP.
"This is so obviously done by a spy agency, it's amazing," Horowitz said. "It was deliberate, no doubt about it."
- Read more: The best Dubai VPN can sidestep the UAE's draconian internet laws
How to lock down your home router
The first step toward home router security, Horowitz said, is to make sure the router and cable modem are not a single device. Many ISPs lease such devices to customers, but they'll have little control over their own networks. (If you need to get your own modem, check out our recommendations for the best cable modem.)
"If you were given a single box, which most people I think call a gateway," he said, "you should be able to contact the ISP and have them dumb down the box so that it acts as just a modem. Then you can add your own router to it."
Next, Horowitz recommended that customers buy a low-end commercial-grade Wi-Fi/Ethernet router, such as the Pepwave Surf SOHO, which retails for about $200 (though beware price gougers), rather than a consumer-friendly router that can cost as little as $20.
Commercial-grade routers are unlikely to have UPnP or WPS enabled. The Pepwave, Horowitz noted, offers additional features, such as firmware rollbacks in case a firmware update goes wrong.
Regardless of whether a router is commercial- or consumer-grade, there are several things, varying from easy to difficult, that home-network administrators can do to make sure their routers are more secure:
Change the administrative credentials from the default username and password. They're the first things an attacker will try. Your router's instruction manual should show you how to do this. If it doesn't, then Google it.
Make the password long, strong and unique, and don't make it anything resembling the regular password to access the Wi-Fi network.
Change the network name, or SSID, from "Netgear," "Linksys" or whatever the default is, to something unique — but don't give it a name that identifies you.
"If you live in an apartment building in apartment 3G, don't call your SSID 'Apartment 3G,'" Horowitz quipped. "Call it 'Apartment 5F.'"
Turn on automatic firmware updates if they're available. Newer routers, including most mesh routers, will automatically update the router firmware.
Enable WPA2 wireless encryption so that only authorized users can hop on your network. If your router can support only the old WEP standard, it's time for a new router.
Enable the new WPA3 encryption standard if the router supports it. As of mid-2020, however, few routers and client devices (PCs, mobile devices, smart-home devices) do.
Disable Wi-Fi Protected Setup, if your router lets you.
Set up a guest Wi-Fi network and offer its use to visitors, if your router has such a feature. If possible, set the guest network to turn itself off after a set period of time.
"You can turn on your guest network, and set a timer, and three hours later, it turns itself off," Horowitz said. "That's a really nice security feature."
If you have a lot of smart-home or Internet of Things devices, odds are many of them won't be terribly secure. Connect them your guest Wi-Fi network instead of your primary network to minimize the damage resulting from any potential compromise of an IoT device.
Do not use cloud-based router management if your router's manufacturer offers it. Instead, figure out if you can turn that feature off.
"This is a really bad idea," Horowitz said. "If your router offers that, I would not do it, because now you're trusting another person between you and your router."
While those models offer security improvements in other areas, such as with automatic firmware updates, it might be worth looking for a mesh-style router that permits local administrative access, such as the Netgear Orbi.
Install new firmware when it becomes available — this is how router makers install security patches. Log into your router's administrative interface routinely to check.
With some brands, you may have to check the manufacturer's website for firmware upgrades. But have a backup router on hand if something goes wrong. Some routers also let you back up the current firmware before installing an update.
Set your router to use the 5-GHz band for Wi-Fi instead of the more standard 2.4-GHz band, if possible — and if all your devices are compatible.
"The 5-GHz band does not travel as far as the 2.4-GHz band," Horowitz said. "So if there is some bad guy in your neighborhood a block or two away, he might see your 2.4-GHz network, but he might not see your 5-GHz network."
Disable remote administrative access, and disable administrative access over Wi-Fi. Administrators should connect to routers via wired Ethernet only. (Again, this won't be possible with many mesh routers.)
Advanced tips for more tech-savvy users
Change the settings for the administrative Web interface, if your router permits it. Ideally, the interface should enforce a secure HTTPS connection over a non-standard port, so that the URL for administrative access would be something like, to use Horowitz's example, "https://192.168.1.1:82" instead of the more standard "http://192.168.1.1", which by default uses the internet-standard port 80.
Use a browser's incognito or private mode when accessing the administrative interface so that your new URL is not saved in the browser history.
Disable PING, Telnet, SSH, UPnP and HNAP, if possible. All of these are remote-access protocols. Instead of setting their relevant ports to "closed," set them to "stealth" so that no response is given to unsolicited external communications that may come from attackers probing your network.
"Every single router has an option not to respond to PING commands," Horowitz said. "It's absolutely something you want to turn on — a great security feature. It helps you hide. Of course, you're not going to hide from your ISP, but you're going to hide from some guy in Russia or China."
Change the router's Domain Name System (DNS) server from the ISP's own server to one maintained by OpenDNS (22.214.171.124, 126.96.36.199), Google Public DNS (188.8.131.52, 184.108.40.206) or Cloudflare (220.127.116.11, 18.104.22.168).
If you're using IPv6, the corresponding OpenDNS addresses are 2620:0:ccc::2 and 2620:0:ccd::2, the Google ones are 2001:4860:4860::8888 and 2001:4860:4860::8844, and the Cloudflare ones are 2606:4700:4700::1111 and 2606:4700:4700::1001.
Use a virtual private network (VPN) router to supplement or replace your existing router and encrypt all your network traffic.
"When I say VPN router, I mean a router that can be a VPN client," Horowitz said. "Then, you sign up with some VPN company, and everything that you send through that router goes through their network. This is a great way to hide what you're doing from your internet service provider."
Many home Wi-Fi routers can be "flashed" to run open-source firmware, such as the DD-WRT firmware, which in turn supports the OpenVPN protocol natively. Most of the best VPN services support OpenVPN as well and provide instructions on how to set open-source routers up to use them.
Finally, use Gibson Research Corp.'s Shields Up port-scanning service at https://www.grc.com/shieldsup. It will test your router for hundreds of common vulnerabilities, most of which can be mitigated by the router's administrator.