Your firewall sits between your modem and everything else on your network

A firewall is a device or software that controls which data packets move in and out of your network. The physical placement matters: your firewall connects to your modem on one side (the side facing the internet) and to your router on the other side (the side facing your devices). This arrangement lets the firewall inspect all traffic before it reaches your computers, phones, and printers.

In most home setups, you have one modem provided by your internet service provider, one firewall (often built into your router), and then all your other devices branch out from there. In business networks, the firewall is usually a separate piece of hardware that sits in a specific order in the chain.

Understanding what plugs into what matters because it determines what the firewall can actually protect. If devices bypass the firewall, they bypass the protection.

Key Takeaways

  • Your firewall's internet port connects to your modem; its network port connects to your router or directly to your devices.
  • Most home routers have a built-in firewall, so you may not see a separate firewall device at all.
  • Wired devices (computers, printers, servers) connect to the firewall's network side through ethernet cables or through a switch.
  • Wireless devices connect through your router, which should sit on the protected side of the firewall.
  • Any device that connects directly to your modem without going through the firewall is unprotected.

The modem connection: where internet traffic enters

Your firewall has one port labeled WAN (wide area network) or "internet" that connects to your modem using an ethernet cable. This is the only connection that faces the public internet. The modem receives the signal from your internet service provider's lines and converts it into data your firewall can read.

This connection is critical because it is the entry point for all incoming traffic. The firewall inspects everything arriving through this port and decides whether to let it through based on your rules. If you have a modem and firewall from different manufacturers, they still work together — the cable is just a standard ethernet cable, and the connection is automatic.

The network side: where your devices connect

The other side of the firewall has one or more ports labeled LAN (local area network) that connect to your router or directly to your devices. This is the protected side. Devices on this side are shielded by the firewall's rules.

In a home setup, you typically run one ethernet cable from the firewall's LAN port to your router's WAN port. Your router then broadcasts wifi and has its own ethernet ports for wired devices. In a business setup, the firewall might connect to a network switch instead, and the switch distributes connections to many devices.

Some firewalls have multiple LAN ports so you can connect several devices directly without a router in between. This is less common in homes but standard in offices.

Wired devices and network switches

Devices that need a wired connection — desktop computers, printers, servers, security cameras with ethernet ports — connect through ethernet cables to either the firewall's LAN ports or to a network switch. A switch is a device that simply extends the number of available ports; it does not add any protection or routing, it just multiplies connections.

If your firewall has only one or two LAN ports but you need to connect five devices, you plug a switch into one of those ports, and then plug your five devices into the switch. The switch sits on the protected side of the firewall, so all those devices still benefit from the firewall's rules.

The order matters: modem → firewall → switch → devices. If you accidentally plug a device directly into the modem, it bypasses the firewall entirely.

Wireless devices and your router's placement

Phones, tablets, laptops, and smart home devices connect wirelessly through your router. The router must sit on the protected side of the firewall — meaning it connects to the firewall's LAN port, not directly to the modem.

When your router is positioned correctly, all wireless traffic still passes through the firewall's inspection. The firewall sees the data coming from your router and applies the same rules it applies to wired devices. Your router's own built-in firewall (most routers have one) adds a second layer, but the main protection comes from the firewall upstream.

If you plug your router directly into the modem and skip the firewall, your wireless devices lose the firewall's protection. This is a common mistake in setups where someone adds a second router without thinking about the order.

When your router has a built-in firewall

Most home routers sold today include a firewall as a built-in feature. In these cases, you do not have a separate firewall device — the router itself is doing the job. The router connects to your modem on one side and broadcasts wifi and provides ethernet ports on the other side.

This built-in firewall is usually adequate for home use, though it is less powerful than a dedicated firewall device. You can check whether your router's firewall is turned on by logging into the router's settings (usually through a web browser or an app) and looking for a "firewall" or "security" section.

If you want more control or more advanced protection, you can add a separate firewall device between your modem and router, even if your router already has one. The separate device becomes the primary firewall, and the router's built-in firewall becomes a secondary layer.

Devices that should never connect directly to the modem

Your modem should have only one ethernet cable plugged into it: the one going to your firewall. Everything else — your router, computers, printers, cameras, gaming consoles — should connect downstream from the firewall, not directly to the modem.

If you connect a device directly to the modem, that device sees the raw internet and has no firewall protection. It is exposed to attacks, malware, and unwanted incoming connections. This is especially dangerous for devices that are always on, like security cameras or servers.

The only exception is during troubleshooting: if you suspect your firewall or router is broken, you might temporarily connect a single device directly to the modem to test whether the modem itself is working. Once testing is done, disconnect it and restore the normal order.

Frequently Asked Questions

Can I connect my computer directly to the firewall without a router?

Yes, if your firewall has multiple LAN ports, you can plug computers directly into those ports. However, you will lose wifi capability unless you add a separate access point. Most people use a router instead because it provides both wired and wireless connections from a single device.

What if my modem and firewall are in different rooms?

You can use a longer ethernet cable to connect them, up to 100 meters. The cable itself does not affect security or speed in any meaningful way for home use. Just make sure the cable is rated for ethernet (usually Cat5e or better) and is not damaged.

Do I need a separate firewall if my router already has one built in?

For most homes, the router's built-in firewall is sufficient. A separate firewall device is more common in businesses or homes with advanced security needs. If you are unsure whether your router's firewall is on, check the router's settings or contact your internet service provider.

What happens if I plug my router into the modem instead of a firewall?

Your router's built-in firewall will still protect your devices, but you lose the extra layer of protection a dedicated firewall provides. This is acceptable for most home users, but it means your router is doing double duty and may be slightly slower.

Can I use a firewall and a router from different manufacturers?

Yes, they work together without any special setup. The firewall does not need to know what router you are using, and the router does not need to know what firewall is upstream. They communicate through standard ethernet connections.