How to Change Your IP Address on Mac
On a Mac you can change your private IP by renewing your DHCP lease from your router, set a static private IP for reliable port forwarding, or replace your public IP entirely using a VPN. This guide covers all three approaches for macOS.
Method 1 - Renew DHCP Lease (New Private IP)
| Method | Steps |
|---|---|
| System Settings (Ventura+) | System Settings → Network → select Wi-Fi or Ethernet → Details → TCP/IP tab → click "Renew DHCP Lease" |
| System Preferences (Monterey and earlier) | System Preferences → Network → select connection → Advanced → TCP/IP → Renew DHCP Lease |
| Terminal | Run sudo ipconfig set en0 DHCP (replace en0 with your interface name) |
Method 2 - Set a Static Private IP on Mac
Go to System Settings → Network → select your connection → Details → TCP/IP tab. Change "Configure IPv4" from "Using DHCP" to "Manually". Enter your chosen IP address (e.g. 192.168.1.150), the subnet mask (255.255.255.0), and your router's IP as the router/gateway. Click OK and then Apply. Your private IP is now fixed and will survive reboots and reconnections.
Method 3 - Change Your Public IP with a VPN
Install a VPN client for macOS (NordVPN, Mullvad, ProtonVPN, ExpressVPN all offer native macOS apps). Connect to a VPN server of your choice. All outbound traffic uses the VPN server's IP address instead of your home ISP's IP. Verify by visiting whatsmyipnow.com - The displayed IP and location should match the VPN server.
Key Points
- Renewing the DHCP lease may or may not give you a new private IP - It depends on your router's lease table. If your old IP lease has not expired, the router typically re-assigns the same address.
- Your public IP is controlled by your ISP, not your Mac. To change it, restart your router (some ISPs assign a new public IP on reconnect) or use a VPN.
- macOS network interfaces: en0 is typically Wi-Fi, en1 is typically Ethernet or a USB-C adapter. Run
ifconfig -lin Terminal to list all interfaces. - After changing your IP, run a DNS leak test to confirm your DNS is routing through the correct path.
- macOS includes a built-in IKEv2/IPSec VPN client (System Settings → VPN → Add VPN Configuration) if you have access to a corporate or self-hosted VPN server.