Cyber · Foundation
Securing Network Devices: Router, Switch, and Wireless Access Point Best Practices
Imagine you have just opened a small business. You have rented a nice office, bought computers for your staff, and hired someone to set up your internet connection. The technician installs a router, a switch, and a wireless access point, connects everything together, and hands you the keys. The network works perfectly. Everyone can browse the web, send emails, and share files. You feel safe.
But here is the problem. That technician almost certainly left every device with its original factory settings. The router's login password is probably "admin." The wireless network's name is probably "NETGEAR" or "Linksys," and its password might be printed on a sticker on the back of the device. The switch probably has every single port active and open, including the ones nobody is using. In security terms, your technician just built you a fortress and left all the gates wide open, the guards asleep, and a sign on the front door listing every known weakness.
This lesson is about how to close those gates. We will walk through the principles and specific steps that security professionals use to protect the three most important types of network devices: routers, switches, and wireless access points. We will start with ideas that apply to all three, and then look at what makes each device unique and how to protect it specifically.
Before we begin, let us make sure we understand what these three devices actually do, because knowing a device's job helps us understand why it needs to be protected in a particular way.
A router is the device that connects your local network to the outside world, meaning the internet. Think of it as the main gate in the wall of your fortress. Every piece of information that travels between your computers and the internet passes through the router. It makes decisions about where traffic should go. Because it sits right at the edge between your private network and the public internet, it is constantly exposed to the outside world, and it is therefore a constant target for attackers.
A switch is the device that connects computers and other devices to each other inside your local network. If the router is the main gate in the outer wall, the switch is the network of corridors and doors inside the fortress. When you print a document to the office printer, that data travels through the switch. When two colleagues share a file, that data travels through the switch. It manages the internal flow of information. Attackers who get past your router, or who physically enter your building, will then try to abuse your switch to spy on internal traffic or move from one part of your network to another.
A wireless access point, often called a WAP, is the device that allows computers, phones, and tablets to connect to your network without a physical cable. It broadcasts a radio signal that devices can detect and connect to. This is a unique security challenge because the signal travels through walls and into the street, which means someone sitting in a car outside your building can potentially attempt to connect to your network. Unlike the router and switch, which are only reachable by people who are physically plugged in or already on the network, the wireless access point is reachable by anyone within range.
Now that we understand these three characters in our story, let us start with the security principles they all share.
The single most important thing you can do when you set up any network device is to change the default username and password. This sounds obvious, and yet it is one of the most common failures in network security across the world, from home offices to large corporations. Every manufacturer ships their devices with a standard login. For many routers and switches, the username is "admin" and the password is "password" or "admin" or "1234." These defaults are publicly published in the manufacturer's documentation, which means anyone can look them up. Attackers do not even need to guess. They simply try the defaults, and very often, they work.
The most famous example of what happens when this step is ignored is the Mirai botnet. A botnet is a large collection of internet-connected devices that have been secretly taken over by an attacker and are being used together, often to attack websites or send spam. The Mirai botnet, which first appeared in 2016, spread by automatically scanning the internet and trying to log into devices using a list of about sixty common default usernames and passwords. It successfully took control of hundreds of thousands of devices, including home routers and security cameras, and used them to launch some of the largest internet attacks ever recorded at that time. The attack was not sophisticated. It worked almost entirely because people had never changed their factory default credentials.
The lesson is clear. When you set up any network device, the first thing you do is log in with the default credentials and change them immediately. The new password should be long, ideally at least fifteen characters, and should mix letters, numbers, and symbols. A passphrase, which is a sentence or a string of random words, works very well. Something like "correct-horse-battery-staple" is both long and memorable. Never reuse passwords across multiple devices.
The second universal principle is to keep the device's firmware updated. Firmware is the permanent software that is built into the device itself and controls how it operates. Think of it as the device's brain. Like any software, firmware can have security flaws, called vulnerabilities. These are mistakes in the code that an attacker can exploit to take control of the device or to spy on traffic passing through it. Manufacturers find these flaws regularly and release updates, called patches, to fix them.
The problem is that many people set up a device and then forget about it. The router sits in the corner doing its job, and nobody thinks to check whether its firmware is up to date. Months or years pass. During that time, security researchers and attackers alike may have discovered serious vulnerabilities in that firmware version, vulnerabilities that have been publicly announced and documented. Your unpatched device is now like a castle wall with a known crack in it, and the location of that crack has been published on the internet.
The practice is straightforward. Regularly check the manufacturer's website for your device model, and apply any available firmware updates. Many modern devices have an option to check for updates automatically through the administrative interface, which is the web page or software you use to manage the device. Enable this feature if you trust it, and verify periodically that updates are actually being applied.
The third principle is to disable any services or features that you are not actively using. Every feature that is turned on is another way for an attacker to interact with your device. Security professionals call this the "attack surface," meaning the total number of ways an attacker could potentially reach and compromise a system. The larger the attack surface, the more opportunities exist for attack. Reducing the attack surface is a fundamental goal of security hardening, which means the process of making a system more resistant to attack.
Several specific services are worth mentioning here. Telnet is an old protocol, meaning an old language that computers use to communicate with each other, that allows you to type commands to manage a device remotely. The problem is that Telnet sends everything, including your username and password, as plain, readable text over the network. Anyone who can see that network traffic can read your credentials. Telnet should be disabled and replaced with SSH, which stands for Secure Shell. SSH does the same job but encrypts everything, meaning it scrambles the data so that anyone who intercepts it cannot read it. Similarly, HTTP, the protocol used to load web pages, sends data in plain text. HTTPS, the secure version, encrypts that data. Device management interfaces should always use HTTPS, not HTTP.
Another service to disable is UPnP, which stands for Universal Plug and Play. This is a feature designed for convenience. It allows devices on your network to automatically announce themselves and configure the router to forward certain kinds of traffic to them. Your games console, for example, might use UPnP to ask the router to open certain ports so that your friends can connect to your game. This sounds helpful, but in practice it means that any device on your network, including one infected with malware, can silently instruct your router to open a door to the internet without your knowledge. Disabling UPnP removes this risk.
The fourth principle is to secure how you access the device for management. Logging in to a router or switch to change settings is a powerful action. If an attacker can perform that login, they own the device. We have already discussed using encrypted protocols like SSH and HTTPS. But there is another layer: restricting which computers are even allowed to attempt a login.
Most managed network devices allow you to create a rule that says administrative access is only permitted from specific IP addresses. An IP address is a unique number assigned to each device on a network, a bit like a house number on a street. If you configure your router to only accept management connections from your own computer's IP address, then even if an attacker knows your password, they cannot log in from their own machine because the device will simply refuse their connection before it even reaches the login screen.
The fifth principle is logging. Logs are records of events. Every time someone logs in to a device, every time a connection is blocked, every time a configuration is changed, the device can record that event in a log. Without logs, you are blind. If something goes wrong, you have no way to investigate what happened or when it started. With logs, you can reconstruct the sequence of events that led to a problem and identify the source.
The best practice is to send device logs to a central location. This central system is often called a log server or, in larger organizations, a SIEM, which stands for Security Information and Event Management system. A SIEM is a powerful tool that collects logs from many devices, correlates them, meaning it looks for patterns and connections between events across different systems, and generates alerts when something suspicious is detected. For a small business, even a simple log server or a cloud-based logging service is far better than having no logs at all.
The sixth universal principle is physical security. This is sometimes overlooked in favor of the more technical measures, but it is critically important. All the software security in the world is useless if an attacker can walk up to your router and press the factory reset button. That single button press, which often requires nothing more than holding a small pin against a hole for a few seconds, can wipe every security setting you have configured and return the device to its vulnerable factory defaults. Beyond the reset button, an attacker with physical access to a switch can plug a laptop directly into an active unused port and gain immediate access to your internal network.
The practice is simple: keep network devices in locked rooms or locked cabinets. Server rooms or network closets should require a key or access card. Security cameras in these areas add another layer of accountability. Do not leave network equipment in publicly accessible areas like reception desks or open office spaces.
Now let us move from the universal principles to the specific measures that apply to each type of device.
Routers deserve special attention because they face the internet directly. The most important concept for router security is the idea of "implicit deny." This phrase refers to how a firewall operates. A firewall is a set of rules that decides which network traffic is allowed through and which is blocked. The firewall might be built into the router or it might be a separate device. Either way, the principle is the same.
There are two opposite philosophies for firewall rules. The first is "allow by default," where all traffic is permitted unless there is a specific rule blocking it. This is easy to manage but very dangerous, because it means unknown and potentially harmful traffic gets through automatically. The second philosophy is "deny by default," also called "implicit deny," where all traffic is blocked unless there is a specific rule explicitly allowing it. This is more work to set up because you have to create a rule for every kind of legitimate traffic you need, but it is vastly safer. Think of it as the difference between a nightclub with a bouncer who lets everyone in except known troublemakers, versus a nightclub with a bouncer who turns everyone away except people whose names are on the guest list. The guest list approach is far more secure.
For most networks, the router's firewall should block all incoming connections from the internet by default, and only allow specific traffic that has been deliberately permitted. Outgoing traffic, meaning your computers reaching out to the internet, is typically allowed more freely, though there are good reasons to restrict that as well in high-security environments.
One specific router setting that is dangerously common and should always be disabled is remote administration over the WAN port. WAN stands for Wide Area Network, and in this context it means the internet. Some routers allow you to access their management interface from the internet, so you can log in and change settings from anywhere in the world. This sounds convenient, but it also means the entire internet can attempt to log in. Automated scanning tools constantly search for exposed management interfaces and try default passwords against them. This feature should be turned off. If you genuinely need to manage your network remotely, the correct way to do this is through a VPN, which stands for Virtual Private Network. A VPN creates an encrypted tunnel between your computer and your network, so that your remote computer behaves as if it were physically on the local network, with the same access restrictions and without exposing the management interface to the public internet.
Routers also support something called Access Control Lists, or ACLs. An ACL is a list of rules that tells the router which traffic to allow or block based on criteria like the source IP address, the destination IP address, and the type of traffic. For example, you might create an ACL rule that blocks all traffic from IP address ranges known to be associated with malicious activity. You might also use ACLs to prevent certain types of traffic from leaving your network, for example blocking your computers from connecting to ports that are commonly used by malware to communicate with its controller. ACLs are a powerful and flexible tool for enforcing network traffic policies.
Now let us turn to switches. Switches present different security challenges because they operate inside the network rather than at its edge. An attacker who reaches your internal network, either through a compromised computer, a physical connection, or a wireless breach, will then try to exploit the switch to spy on other people's traffic or to reach systems they should not have access to.
The first switch-specific practice is port security. A port, in this context, is the physical socket on the switch where you plug in a network cable. Port security is a feature that controls which devices are allowed to connect to each port. The way it works is based on MAC addresses. A MAC address is a unique identifier that every network device has. It is set by the manufacturer and is built into the hardware itself. The address looks something like this: 00:1A:2B:3C:4D:5E. Each device has its own unique MAC address.
With port security, you can configure a switch port to only allow connections from specific MAC addresses, or to only allow one device to connect at a time. If someone unplugs the authorized printer from a port and plugs in their own laptop, the switch detects an unknown MAC address and can automatically shut down that port, preventing the unauthorized device from communicating on the network. This is an effective first line of defense against someone wandering into your office and plugging into a network cable.
The second switch practice is to disable unused ports. This is beautifully simple. If a port has no cable plugged into it and is not currently in use, shut it down through the switch's administrative interface. An inactive port cannot be exploited. If someone plugs into it, nothing happens because the switch will not pass any traffic through that port until an administrator explicitly enables it again. This is a quick and easy measure that eliminates an entire category of physical access risk.
The third switch practice is one of the most powerful concepts in network security: VLANs, or Virtual Local Area Networks. A VLAN allows you to divide a single physical switch into multiple separate, logical networks. The word "logical" here means that the separation exists in software and configuration rather than in physical hardware. Devices in different VLANs cannot talk to each other unless traffic is deliberately routed between them, typically through a router or firewall with its own rules.
Imagine a company with three departments: Sales, Finance, and IT. Without VLANs, all three departments' computers are on the same network. If a salesperson's laptop gets infected with malware, that malware can potentially reach the Finance department's computers and steal financial records, or reach the IT systems and cause serious damage. The infection can spread freely because there are no internal walls.
With VLANs, you create three separate network segments. Sales is on VLAN 10, Finance is on VLAN 20, and IT is on VLAN 30. A guest network, for visitors who need internet access, might be on VLAN 99. Traffic within each VLAN flows normally. But to send traffic from VLAN 10 to VLAN 20, it has to pass through a router or firewall, where rules control what is and is not allowed. If the infected salesperson's laptop tries to scan the Finance computers for vulnerabilities, its traffic hits the boundary between VLANs and is stopped. The infection is contained, like a fire door in a building that stops a fire from spreading from one room to the next.
This principle of dividing a network into smaller, isolated segments is called network segmentation, and it is one of the most effective defenses against the lateral movement of attackers, meaning their ability to move from one compromised system to others within the same network.
The fourth switch-specific practice is enabling DHCP Snooping. DHCP stands for Dynamic Host Configuration Protocol. When a device, like your laptop, connects to a network, it does not know its own IP address yet. It sends out a message asking, essentially, "Is there a server here that can give me an IP address and tell me how to reach the internet?" A DHCP server, which is usually built into the router or a server on the network, hears this request and responds with an IP address and network configuration. This process happens automatically and invisibly every time you connect to a network.
An attacker can set up a rogue DHCP server, meaning a fake one. If this fake server responds to your laptop's request before the legitimate server does, your laptop will accept its instructions. The attacker's DHCP server can then direct all your traffic through the attacker's machine, allowing them to see everything you send and receive. This is called a man-in-the-middle attack.
DHCP Snooping is a feature you enable on the switch that prevents this. You tell the switch which ports are connected to legitimate, trusted DHCP servers. Any DHCP response that comes from any other port is automatically discarded. The switch acts as a verification checkpoint, ensuring that only the real DHCP server can hand out network configuration to devices.
Now let us focus on wireless access points, which present perhaps the most publicly visible and accessible attack surface of the three device types.
The most important wireless security setting is encryption. Encryption, remember, means scrambling data so that anyone who intercepts it cannot read it. When you connect to a wireless network, all the data you send, from web pages to passwords to emails, travels through the air as radio waves. Without encryption, anyone with the right software, which is freely available, can capture that data and read it.
Over the years, several different encryption standards have been used for wireless networks. WEP, which stands for Wired Equivalent Privacy, was the original standard. It was found to be fundamentally broken many years ago. A determined attacker can crack WEP encryption in minutes. WPA, Wi-Fi Protected Access, was the replacement for WEP, but it too has significant weaknesses and should not be used. WPA2 was a substantial improvement and, when configured with AES encryption, has been reasonably secure for many years. AES stands for Advanced Encryption Standard and is a widely trusted encryption method. WPA3, the newest standard, is stronger still and addresses some remaining weaknesses in WPA2. If your devices support WPA3, use it. If not, use WPA2 with AES. Never use WEP or the original WPA. Using them is the wireless equivalent of using a padlock that anyone with a paperclip can open.
One widely available feature that should always be disabled is WPS, which stands for Wi-Fi Protected Setup. WPS was designed to make it easier to connect devices to a wireless network. Instead of typing a long, complex password, you could press a button on the router or enter a short PIN number. The button method is relatively harmless, but the PIN method has a serious design flaw. The PIN is eight digits long, but due to how the verification process works, an attacker can effectively test only the first four digits and then the last four digits separately, rather than all eight digits together. This reduces the number of possible combinations from one hundred million to just eleven thousand, which an automated tool can try in a few hours. Once the PIN is discovered, the tool can recover the full Wi-Fi password, regardless of how complex it is. WPS PIN authentication should be disabled on every wireless access point.
The next wireless best practice is creating a separate guest network. Almost every modern wireless access point allows you to broadcast more than one wireless network at the same time. You can have your main internal network for staff, and a completely separate guest network for visitors, customers, or even your own personal devices. The guest network should be configured with "client isolation," a setting that prevents devices connected to the guest network from communicating with each other or with any device on the main internal network. A guest can reach the internet but cannot reach your file servers, printers, or other staff computers. This is important even if you trust your guests completely, because their devices may carry malware without their knowledge.
Changing the default SSID is also recommended. An SSID is the Service Set Identifier, which is simply the name of your wireless network, the name that appears in the list when you search for available networks on your phone. When a device ships from the factory, its default SSID reveals the manufacturer and sometimes even the model. "NETGEAR73" tells an attacker they are looking at a Netgear device, and they can immediately look up which known vulnerabilities affect that model's firmware. Changing the SSID to something neutral, like "OfficeNetwork" or a random string of characters, removes this free information. It is worth noting, though, that changing the SSID does not provide strong security on its own. It simply removes a small convenience that was helping the attacker.
Two practices are often cited in older security guides but have become somewhat controversial among modern security professionals, and it is worth addressing them honestly. The first is hiding the SSID, meaning turning off the broadcast so that your network name does not appear in the list of available networks. The idea is that attackers cannot connect to a network they cannot find. The reality is that the network is still broadcasting signals even when the SSID is hidden, and there are freely available tools that can detect hidden networks by analyzing those signals. Hiding the SSID causes inconvenience for legitimate users while providing very little real protection. This approach is sometimes called "security through obscurity," meaning relying on keeping secrets rather than on genuine technical defenses. Security through obscurity is generally considered a weak and unreliable strategy.
The second debated practice is MAC address filtering on wireless networks. The idea is that you create a list of approved MAC addresses and configure the access point to only allow those addresses to connect. Anyone whose device is not on the list is rejected. This seems sensible, but MAC addresses can be easily spoofed, meaning an attacker can change their device's MAC address to impersonate an approved device. Wireless traffic is broadcast through the air, so an attacker watching your network can simply observe which MAC addresses are connecting, pick one, and copy it. MAC address filtering stops unsophisticated, casual attackers but provides no real barrier to anyone who knows what they are doing. It can give a false sense of security, which is arguably worse than no security at all, because it might lead you to believe your network is protected when it is not.
Let us now zoom out and think about how all of these practices fit together to form a coherent security strategy. Security professionals often talk about "defense in depth," which means using multiple layers of protection so that even if one layer fails, others remain to stop or slow an attacker. A single strong password is one layer. A firewall is another layer. Network segmentation with VLANs adds another layer. Physical security adds another. Logging adds yet another, because even if an attacker succeeds, your logs may help you detect the intrusion and respond to it.
Think of it like layers of security around a central treasure. The first layer is the locked front door of the building. The second is the access card reader on the server room. The third is the locked equipment cabinet. The fourth is the requirement to use an encrypted protocol to log into the device. The fifth is the restriction that only your computer's IP address can access the management interface. An attacker who defeats one layer still faces the next. Each additional layer raises the cost, effort, and risk of a successful attack.
It is also worth thinking about risk prioritization, because not every organization has unlimited time and resources. If a small business can only implement three security measures right now, which three would provide the greatest benefit? The answer, based on the frequency and impact of real-world attacks, is almost certainly these: change all default credentials immediately, apply all available firmware updates, and use strong wireless encryption with WPA2 or WPA3. These three measures alone would prevent the vast majority of common automated attacks. Once these are in place, the next priorities would be disabling unnecessary services, creating separate guest and internal networks, and shutting down unused switch ports.
Let us revisit the story we started with. The business with the unprotected network. After applying everything we have discussed, the picture looks very different. The router's management password has been changed to a long, complex passphrase, and the management interface is only accessible from the IT administrator's computer. The router's firewall blocks all incoming connections by default. Firmware updates are applied regularly. The switch has all unused ports disabled, and port security prevents unknown devices from connecting. The network is divided into VLANs so that guests cannot reach financial data and a compromised computer in one department cannot easily reach systems in another. The wireless network uses WPA3 encryption, WPS is disabled, there is a separate guest network with client isolation, and all logs are being sent to a central server. This is not a perfect, impenetrable fortress, no such thing exists. But it is a network that has been deliberately hardened, that requires significant effort and skill to compromise, and that will generate warnings if someone is trying.
Let us bring this lesson to a close with a summary of the key ideas we have covered.
All network devices share the same foundational security needs. You must change default credentials immediately. You must keep firmware updated to close known vulnerabilities. You must disable unnecessary services to reduce the attack surface. You must use encrypted protocols like SSH and HTTPS for management, and restrict which computers can access management interfaces. You must maintain logs so that you can detect and investigate incidents. And you must ensure physical security so that devices cannot be tampered with or reset without authorization.
Routers face the internet directly and must be configured with an implicit deny firewall posture, where all traffic is blocked unless specifically permitted. Remote management over the internet should be disabled, with VPN used instead if remote access is needed. Access Control Lists provide fine-grained control over what traffic is allowed in and out.
Switches manage internal network traffic and need port security to prevent unauthorized device connections, disabled unused ports to eliminate physical access risks, VLANs to segment the network into isolated zones that contain breaches and slow down attackers, and DHCP Snooping to prevent fake servers from redirecting traffic.
Wireless access points must use strong encryption, WPA3 preferred and WPA2 with AES as the minimum. WPS PIN authentication must be disabled due to its fundamental design flaw. A separate guest network with client isolation protects the internal network from visitor devices. Changing the default SSID removes a small convenience for attackers. Hiding the SSID and using MAC address filtering are not reliable security measures and should not be depended upon.
Finally, the overall philosophy is defense in depth: multiple overlapping layers of security, each one raising the cost and difficulty of a successful attack. No single measure is sufficient on its own, but together, these practices form a network that is substantially more resistant to the threats it faces every day.
Test Your Understanding
1. The lesson emphasizes changing default credentials as the 'single most important thing' for network device security. Explain why this is such a critical first step, referencing the Mirai botnet as an example, and describe the characteristics of a strong new password or passphrase.
2. Compare and contrast the primary security concerns and specific best practices for routers, switches, and wireless access points. Focus on how their distinct roles in a network lead to different security priorities and methods.
3. The lesson introduces the concept of 'defense in depth' and 'risk prioritization.' Explain what 'defense in depth' means in the context of network security and provide an example. Then, identify the top three security measures a small business should prioritize if resources are limited, justifying your choices based on the lesson's insights.
Guide the System
Tell the system what to focus on or where to go deeper.
