How to Open a Port on Your Router (Step-by-Step)
Port forwarding guide for home networks
Port forwarding lets devices on the internet reach a specific service running on a computer inside your home network — for example a game server, a self-hosted web app, a security camera, or a remote-desktop connection. By default, your router blocks unsolicited inbound connections, so you need to create an explicit rule that tells it where to send traffic on a given port. This guide walks through the process from start to finish.
Step 1: Find Your Router's IP Address
Your router's admin page is usually reachable at a private address such as 192.168.1.1 or 192.168.0.1. On Windows, open Command Prompt and run ipconfig — look for “Default Gateway”. On macOS or Linux, run netstat -nr | grep default or check your network settings. Enter that address into your browser to reach the router's login page.
Step 2: Assign a Static Local IP to Your Device
Before forwarding a port, make sure the device running your service always keeps the same local IP address. Otherwise, your router might hand it a different address later (via DHCP) and your forwarding rule would silently point at the wrong device. Most routers let you reserve an IP for a specific device's MAC address under a section called “DHCP Reservation” or “Address Reservation”. Alternatively, you can configure a static IP directly in your device's network settings, making sure it's outside your router's DHCP range.
Step 3: Create the Port Forwarding Rule
Look for a section labelled “Port Forwarding”, “Virtual Server”, or “NAT Forwarding” in your router's admin interface — the exact wording varies by manufacturer. You'll typically need to fill in:
- External port — the port visitors from the internet will connect to.
- Internal port — the port your application is actually listening on (often the same as the external port).
- Internal / local IP — the static IP address you reserved in Step 2.
- Protocol — TCP, UDP, or both, depending on what your application needs.
Save the rule and, if prompted, allow the router to restart or reload its configuration.
Step 4: Allow the Port Through Your Device's Firewall
Port forwarding on the router only gets traffic to your local network — the operating system firewall on the target device must also allow inbound connections on that port. On Windows, check Windows Defender Firewall → Advanced Settings → Inbound Rules. On Linux, check ufw status or your iptables/nftables rules. On macOS, check System Settings → Network → Firewall.
Step 5: Verify the Port Is Actually Open
Once your rule is saved and the application is running, use PortCheck to confirm the port is reachable from outside your network. Because the check runs from an external server, it accurately reflects what someone on the internet would experience — testing from inside your own network can give misleading results due to NAT loopback behaviour.
Common Pitfalls
- Your ISP may use Carrier-Grade NAT (CGNAT), meaning you don't actually have a dedicated public IP and forwarding won't work at all. Contact your ISP to confirm.
- Some ISPs block specific inbound ports outright, particularly SMTP (25) and sometimes HTTP/HTTPS on residential plans.
- Double NAT (a modem in router mode plus a separate router) requires forwarding rules on both devices.
- Forgetting to also open the port in the device's local firewall is one of the most common reasons a rule “doesn't work”.
If the port still doesn't appear open after following these steps, see our troubleshooting checklist for a systematic way to isolate the problem.