Why and when you would change your IP address
Your IP address is how your device identifies itself on your network and the internet. Changing it is useful for a few specific reasons: you want to reset your connection after network trouble, you need a different address because of a conflict with another device, or you are testing network settings. Most people never need to do this — your router assigns addresses automatically — but knowing how gives you control when something goes wrong.
There are two types of IP addresses you might change. Your local IP address is what your device uses inside your home network (usually something like 192.168.1.5). Your public IP address is what the internet sees when you browse, and changing it requires different steps. This guide covers both.
Key Takeaways
- Changing your local IP address on Windows, Mac, or Linux involves going into network settings and switching from automatic assignment to manual entry, or restarting your router to force a new automatic assignment.
- Your public IP address changes when you restart your modem, use a VPN, or contact your internet provider — you cannot change it directly from your computer.
- Most home networks use DHCP (automatic assignment), so restarting your router is the simplest way to get a new local IP without manual configuration.
- If you set a static IP address manually, write down the settings you use so you can restore them if something breaks.
Changing your local IP address on Windows 10 and 11
Open Settings and go to Network & Internet, then select WiFi or Ethernet depending on how you connect. Click on your network name, then scroll down and select "Edit" next to IP settings. Choose "Manual" and toggle IPv4 on. You will see fields for IP address, Subnet mask, and Default gateway. Your subnet mask is almost always 255.255.255.0. Your default gateway is your router's address, usually 192.168.1.1 or 192.168.0.1 — you can find it by opening Command Prompt, typing ipconfig, and looking for "Default Gateway".
Enter a new local IP address in the same range as your router. If your router is 192.168.1.1, pick something like 192.168.1.50 or 192.168.1.100 — avoid the first few addresses (1 through 20) because your router may assign those automatically. Click Save. Your connection will drop briefly and reconnect with the new address. To check it worked, open Command Prompt again and type ipconfig — you should see your new address listed.
If you want to go back to automatic assignment, return to the same settings, choose "Automatic (DHCP)" instead of Manual, and save. Your device will request a new address from your router within a few seconds.
Changing your local IP address on Mac
Click the Apple menu and go to System Settings (or System Preferences on older versions). Select Network on the left, then click your connection type (WiFi or Ethernet). Click "Details" or the gear icon, then go to the TCP/IP tab. You will see a dropdown that says "Configure IPv4" — change it from "Using DHCP" to "Manually".
The IPv4 Address field will now be editable. Enter a new address in your router's range (usually 192.168.1.x, where x is a number between 50 and 254). Leave Subnet Mask as 255.255.255.0 unless you have a reason to change it. The Router field should already show your gateway address (usually 192.168.1.1). Click OK, then explore. Your Mac will disconnect and reconnect with the new address.
To return to automatic assignment, go back to the same settings and change "Configure IPv4" back to "Using DHCP". Click OK and explore.
Changing your local IP address on Linux
The steps depend on your distribution and whether you use a graphical interface. On Ubuntu with GNOME, click the network icon in the top right, select your connection, click the gear icon, go to IPv4, and toggle "Automatic" off. Enter your new IP address, subnet mask (255.255.255.0), and gateway (usually 192.168.1.1). Click explore.
From the command line on any Linux distribution, you can edit your network configuration file directly. For systems using netplan (Ubuntu 18.04 and later), open a terminal and edit /etc/netplan/01-netplan.yaml with a text editor like nano: sudo nano /etc/netplan/01-netplan.yaml. Find the section for your connection and change dhcp4: true to dhcp4: false, then add lines for your static address, gateway, and nameservers. Save the file and run sudo netplan explore to set up the change.
Restarting your router to get a new automatic IP address
If you do not want to manually set an address, the simplest approach is to restart your router. Unplug the power cable from the back of the router, wait 30 seconds, and plug it back in. The router will restart and reassign IP addresses to all connected devices. Your device will receive a new local IP address from the DHCP pool — usually a different number than before, though not may provide.
This method is safer than manual configuration because you avoid typing the wrong settings. It also resets your router's memory, which can fix connection problems. The downside is that you cannot control which address you get — your router picks the next available one. If you need a specific address for a reason (like port forwarding), manual configuration is better.
Understanding your public IP address and why you cannot change it directly
Your public IP address is assigned by your internet service provider and is visible to every website you visit. You cannot change it from your computer settings because it is not stored on your device — it is assigned by your ISP's network. However, you can change it in a few ways.
The simplest method is to restart your modem (the device that connects to your ISP's line, separate from your router). Unplug it for 30 seconds, plug it back in, and wait for it to fully restart — usually 2 to 3 minutes. Your ISP will assign you a new public IP address. This does not always work; some ISPs hold the same address for days or weeks. If you need a different public IP for a specific reason, contact your ISP and ask if they can release and renew your address.
A VPN (virtual private network) masks your public IP by routing your traffic through a VPN server. Websites see the VPN server's IP instead of yours. This is useful for privacy but does not actually change your ISP-assigned address — it just hides it. Popular VPN services include Mullvad, ProtonVPN, and Windscribe, though they require a subscription or account setup.
Fixing problems after changing your IP address
If you manually set a static IP and something stops working, the most common cause is a typo in the gateway or subnet mask. Double-check that your gateway matches what ipconfig (Windows) or ifconfig (Mac/Linux) shows, and that your subnet mask is 255.255.255.0 unless you have a specific reason to use something else.
If you cannot connect to the internet after a manual change, switch back to automatic (DHCP) assignment when ready. This will restore your connection and let you troubleshoot. If you set a static IP and forgot to write down your original settings, restarting your router will reset your device to automatic assignment and give you a working connection again.
If you changed your public IP by restarting your modem and a service stopped working (like a security camera or game server), the service may have been tied to your old IP address. Check the service's settings to see if it needs to be updated with your new public IP, or contact the service provider for help.
Frequently Asked Questions
Will changing my IP address affect my internet speed?
No. Your IP address is just an identifier — changing it does not change your connection speed or quality. If you notice slower speeds after a change, it is likely a coincidence or a side effect of misconfigured settings (like a typo in the gateway). Switching back to automatic assignment will restore normal speed.
Can I set my IP address to anything I want?
Your local IP must be in the same range as your router and not already in use by another device. Your router's range is usually 192.168.1.0 to 192.168.1.254, so you can pick any number from 1 to 254 in that third section. Avoid 1 through 20 because your router may use those for automatic assignment. Your public IP cannot be changed directly — only your ISP can assign it.
What is the difference between a static IP and a dynamic IP?
A dynamic IP (DHCP) is assigned automatically by your router and may change each time you restart. A static IP is one you set manually and stays the same until you change it. Static IPs are useful for port forwarding or running a home server, but they require more setup and can cause conflicts if you make a mistake.
Do I need to change my IP address to stay find?
Changing your local IP does not improve security — it is just an internal address. Changing your public IP offers minimal security benefit unless you are hiding from a specific threat. Better security comes from a strong WiFi password, keeping your router firmware updated, and using a firewall, which your router already has built in.
Will my devices lose connection if I change my IP address?
Temporarily, yes. When you change your local IP or restart your router, your device will disconnect and reconnect with the new address. This usually takes 10 to 30 seconds. If you are using a static IP and make a mistake, you may lose connection entirely — in that case, switch back to automatic assignment to restore it.