You can also reserve an IP from the router instead
Instead of configuring a device directly, your router's DHCP reservation feature can automatically hand out the same IP address every time to a device based on its MAC address. Check how to find that device's MAC address first if you want to go this route.
Pair it with port forwarding
Once a device has a static IP, you can use port forwarding to open a specific port on that device to the outside. Since the forwarding rule targets a specific address, that address needs to stay fixed first β otherwise you would have to redo the forwarding rule every time the IP changed.
Frequently Asked Questions
What is the difference between a router-side IP reservation and setting a static IP directly on the PC?
A router IP reservation still technically uses DHCP, but the router remembers to always hand a specific device the same address. Configuring a static IP directly on the PC means that device stops using DHCP entirely and fixes its own address. The router reservation is generally easier to manage, but knowing how to configure it directly on the PC is useful when you cannot access the router's settings page.
Will entering the wrong values break my internet completely?
Yes β entering a gateway or subnet mask that does not match your actual network can disconnect you from the internet. If that happens, simply switching back to "Obtain an IP address automatically (DHCP)" restores a normal connection immediately.