HiBlog Networking and Protocols
What Is a Static IP Address and How Do You Get One?
- Mina SeyfollahiAuthor
- Last updated
- 8 minutesReading time
- 982Views
- Mina Seyfollahi
- Last updated:
- 8 min read
- 982 views
When you set up a security camera, connect remotely to your office computer or register your server with a payment gateway, you may be asked for one thing: “Give us a static IP.” But the IP of your home or office internet changes every time the modem restarts, and whatever you set up yesterday no longer works today!
In this article we explain what a static IP is, how it differs from a dynamic IP, what public and private IPs and CGNAT mean, how to tell whether your IP is static, and the ways you can get a static IP. We also go through the pros and cons of a static IP and its security tips.
Short answer: a static IP is an internet address that does not change each time you connect. To get one, buy a static IP from your internet service provider (ISP) or move your service to a virtual server, which has a static public IP. If you only want to reach a device with a changing IP under a fixed name, dynamic DNS is enough.
What is a static IP?
Every device that connects to the internet or a network has a numeric address called an IP (Internet Protocol address), like a postal address that packets use to reach their destination. Most home users have a dynamic IP: each time the modem connects, the ISP gives it one of its free IPs. A static IP, however, always stays the same, and others always reach you at that address. To learn about the role of the IP in networking, read what the TCP/IP model is.
Static IP vs dynamic IP
| Feature | Static IP | Dynamic IP |
|---|---|---|
| Changes | Always stays the same | May change on each connection |
| Cost | Usually costs extra | No extra cost |
| Access from outside | Always at one address | Needs dynamic DNS |
| Limiting access by IP | Possible | Practically impossible |
| Suits | Servers, websites, email, cameras and remote access | Everyday internet use |
Public IP, private IP and CGNAT
Before buying a static IP, tell these three apart, because many problems start right here:
- Public IP: the address seen on the internet, which others can connect to. The static IP you buy from an ISP is a public IP.
- Private IP: the address of devices inside a home or office network, such as 192.168.1.10 or 10.0.0.5. These addresses only mean something inside that network and are not seen from the internet.
- CGNAT: many mobile and some home internet connections give an IP from the 100.64.0.0/10 range instead of a public IP, and several subscribers go out to the internet behind one shared public IP. In this case no connection from outside reaches you, and even dynamic DNS does not help.
How do I know whether my IP is static?
- See your current public IP; for example search Google for my ip, or run
curl ifconfig.mein a terminal. - Turn the modem off and on and check the IP again. If it does not change after several tries, you probably have a static IP.
- On the modem’s admin page, compare the IP in the WAN or Internet section with the IP from step 1. If they differ, or the modem’s IP starts with 100.64 or 10, you are behind CGNAT.
- The most precise way is to ask your ISP’s support; a static IP is a service bought separately, and the ISP knows about it.
Why do we need a static IP?

- Hosting websites, APIs and servers: a service others must always find needs a fixed address.
- Payment gateways and outside services: some payment gateways and API services answer only requests that come from your server’s registered IP.
- Remote access: connecting to company systems with Remote Desktop or SSH, and limiting that access to your own IP only.
- Security cameras and smart devices: viewing cameras and controlling devices from outside without hunting for a new address every day.
- Mail servers and internet telephony (VoIP): a mail server needs a static IP with a reverse (PTR) record so its messages are not taken for spam.
How to get a static IP
1. Buy a static IP from your ISP
If you want the IP of your home or office internet to be static, buy it from your internet provider. Most fixed-line providers (ADSL, VDSL and fiber) offer it for a monthly fee, but on mobile internet such an option is usually not available to ordinary subscribers.
2. A virtual server with a static IP
If you want a static IP for a website, API, bot or any service that must always be reachable, a virtual server is the simplest and most professional way. Every VPS has a public IP that is yours until the end of the service and has nothing to do with your home internet or your modem restarting. To learn more, read what a virtual server is.
3. Dynamic DNS
If you have a public IP that is not static, dynamic DNS services such as No-IP and DuckDNS give you a fixed name like myhome.duckdns.org and point it to the new IP each time it changes. Many modems and camera recorders have these services in their settings. Remember that this does not work behind CGNAT.
A static IP inside your own network
Sometimes a static IP means a device’s internal IP; for example you want a printer, a camera recorder or an internal server to always keep the same private IP, so the modem’s port forwarding keeps pointing to it. You do not need to buy anything for this: on the modem or router admin page, in the DHCP section, find an option such as DHCP Reservation or Address Reservation and tie an IP to that device’s MAC address. Another way is to set the IP by hand on the device itself, as long as that IP is outside the range the modem gives to other devices.
Pros and cons of a static IP

Pros
- A permanent address: users, services and devices always reach you at one address.
- Precise access control: you can limit access to a server, panel or network to your own IP only.
- Easy remote access: you connect to cameras, devices and company systems without looking up a new address.
- Better standing for email: a mail server with a static IP and a PTR record ends up in spam less often.
Cons
- Cost: ISPs charge extra for a static IP.
- A constant target: an address that never changes is always in the same place for scans and attacks too, and without a firewall and updates it is more exposed.
- Less privacy: with a static IP your online activity is easier to link together.
Security tips for a static IP
- Open only the ports you need and close the rest with a firewall.
- Change the default passwords of your modem, cameras and network devices on the very first day.
- Turn on two-factor login for services reachable from the internet.
- Keep the operating system, software and device firmware up to date.
Frequently asked questions
Does an ordinary user need a static IP?
No. For browsing, watching videos and everyday tasks, a dynamic IP is perfectly enough. A static IP becomes necessary when someone or some service must connect to you from outside or recognize you by your IP.
Is there a free static IP?
Usually not; ISPs charge for it. If you have a public IP, dynamic DNS is a free and practical alternative.
Is a static IP more secure?
Not by itself. A static IP only lets you limit access to a specific IP; real security comes from a firewall, strong passwords and updates.
Does a static IP lower ping in online games?
No. Ping depends on the route and distance between you and the game server, not on whether your IP is static. But for hosting a game server, or games that connect players directly, having a public IP instead of being behind CGNAT helps.
Does a VPS IP never change?
A HiData VPS IP is yours until the end of the service and does not change when you turn the server off and on. Under HiData’s terms, if a technical reason comes up, the IP is changed with at least 3 days’ notice; in urgent cases such as an attack or a blocked IP, without that notice.
A VPS with a static IP
If you want a static IP for a website, an API, a payment gateway or remote access, take a look at HiData VPS: HiData’s Iran VPS comes with a static public IP until the end of the service, an IPv6 subnet and full root access, on HP servers with NVMe disks. Want to try it before buying? Get the free 24-hour VPS. And if your server’s IP ever becomes unreachable from Iran, see our guide to blocked VPS IPs.


