In today’s linked world, every internet connected device is at some amount of network risk. Whether you’re working on a laptop at home, managing a company network, or running a cloud service, you need to monitor your network traffic. At this point, a firewall becomes an important layer of cybersecurity.
A firewall watches incoming and outgoing network traffic and applies security rules to decide what should be allowed or prohibited. NIST defines a firewall as a device or application that controls the flow of network traffic across networks or hosts with various security postures. A firewall can also help restrict connections using a Public IP Address, making it harder for unauthorised internet traffic to directly access services and devices that should not be available to the public.
What’s A Firewall?

A firewall is a security mechanism that serves as a barrier between a trusted network and an untrusted network, such as the internet. It compares network connections to a set of rules.
For example, a firewall might decide that online traffic utilising HTTPS should be allowed and an unexpected connection trying to access an underused service should be blocked.
“Firewalls control what traffic may flow in and out of network ports,” Microsoft says. Today’s firewalls may filter traffic based on IP address, ports, protocols, applications and connection statuses.
If a device has a Public IP Address, the firewall can be particularly critical because that address might be visible from the internet. However, the fact that a device has a Public IP Address doesn’t indicate that every service is exposed. What may really be reached is dictated by firewall rules, router setup, NAT and service settings.
How Does A Firewall Work?
A firewall functions by examining network traffic and matching it against security rules.
Imagine a somebody trying to connect to your computer from the Internet. The firewall may evaluate information such as:
- Source IP address
- Destination IP address
- Network protocol
- Source and destination port
- Application or service
- Direction of traffic
- Connection state
The firewall then decides whether to permit, deny, or inspect the connection.
For example, an organization may enable HTTPS traffic to a public web server but not allow direct access to administrative services via the Internet. This eliminates needless exposure of systems associated with a Public IP.
Stateful inspection, a method that modern firewalls can utilise to keep track of current connections and use connection information when assessing whether packets should be accepted. Google Cloud’s current firewall literature describes stateful Layer 3 and Layer 4 filtering as part of its Cloud Next Generation Firewall features.
How Does A Firewall Protect Your Network?
1. Blocks Unauthorized Connections
The main purpose of a firewall is to block unwanted network connections.
If an attacker finds a Public IP Address, they can try to scan for open ports and exposed services. A well-configured firewall can restrict unwanted inbound traffic and decrease the amount of services exposed from outside the network.
This does not make the Public IP Address invisible but can minimise the attack surface a lot.
2. Controls Network Ports
Apps talk to each other via network ports. Some ports are associated with commonly used services, such as web servers, remote administration, email, and databases.
These ports can be blocked by a firewall. For example, a firm might let HTTPS traffic to a web server but block the database server from accessing the internet directly.
This is particularly significant where multiple computers are sharing a network, or where services are connected with a Public IP address.
3. Filters Traffic Based on IP Addresses
Firewall rules allow or deny traffic based on source and destination IP addresses.
For example, an administrator can specify that a management service is allowed to accept connections only from a trusted office network. Then traffic from unknown internet addresses can be refused.
You can safeguard a Public IP Address with rules that limit which external systems can communicate with it.
4. Reduces the Attack Surface
Every unnecessarily exposed service can be another chance for attackers.
A firewall helps to mitigate this risk by limiting the allowed connections. The OWASP Web Security Testing Guide states that exposed and superfluous services may suggest a missing or misconfigured firewall.
If the server has a Public IP Address, administrators should check the exposed ports and services to the internet.
5. Helps Protect Devices on Public Networks
Firewalls are also helpful when connected to public Wi-Fi.
Other devices on the same network could belong to strangers therefore Microsoft says tighter security restrictions are needed for public networks. Windows Firewall has separate profiles for domain, private, and public networks.
Firewall helps prevent unwanted inbound connections when your device connects to public Wi-Fi Your device may continue to communicate with the internet via a Public IP Address provided by the network.
Types Of Firewalls

There are various types of firewalls.
Network Firewall
A network firewall guards traffic between networks. It is often used at the boundary of an internal network of an enterprise and the Internet.
Host-Based Firewall
Host-based firewall runs on a single computer or server directly. Host based firewalls filter traffic coming in and out of a device . An example of a host based firewall is the Windows firewall .
Stateful Firewall
A stateful firewall keeps track of the connections in use and utilises the state of the connection to determine if traffic is allowed to pass through. This allows it to see if the traffic is part of an existing connection .
Next Generation Firewall
Next-generation firewalls provide more advanced inspection and security features. Depending on the product, these can include application restrictions, threat intelligence, intrusion prevention, URL filtering and other defences. For example, Google Cloud’s Cloud NGFW offers Layer 3, Layer 4 and Layer 7 controls.
Public IP Address And Firewall Security
Public IP Address is an address that can be used to communicate with a device or network via the internet. Infrastructure that is exposed to the public needs to be well secured.
It is vital to remember that just because a machine has a Public IP Address does not indicate that it has been fully exposed. Router , NAT setup , cloud security group , firewall . Incoming connections may be allowed or not .
For example, a server may have a Public IP Address but only accept incoming connections on HTTPS while restricting administrative ports from the broader internet.
Similarly, a cloud firewall can utilise rules to regulate traffic on IP ranges, ports, protocols and other parameters. Firewall policies (explicit allow and reject choices for network traffic)
This isn’t just about hiding a Public IP Address. The purpose is to limit the reachable services to only the required ones and to prohibit any extraneous traffic.
Two Real-World Examples
1: Home Computer
Imagine someone working on a laptop at home. The router connects the home to the Internet. The laptop also has its own software firewall.
If an attacker attempts to connect to an idle service, the connection could be halted before it reaches the application. Firewall and router rules can block incoming connections that are not solicited, even if the internet connection is on a Public IP Address.
Microsoft points out that there is normally very little justification for most household PCs and networks to allow unsolicited inbound traffic.
2: Business Web Server
Consider an online store that has a web server with a public IP address.
The company requires clients to go to its website, hence HTTPS traffic has to be authorised. But its database should not be immediately accessible via the internet.
A correctly built firewall will enable essential web traffic while limiting database and administrative connections to trusted services. This means that an exposed service is less likely to become an easy entry point.
NIST recommends that organisations create, configure, test, deploy and maintain firewall policies as part of an overall security plan.
Best Practices For Firewall Security

The firewall is only as effective as it is well set and maintained.
Follow these practices:
- Turn on your firewall, if appropriate, on computers, servers and network devices.
- Block unwanted inbound traffic.
- Only allow the ports and services you need.
- Periodically review the firewall rules.
- Remove old/unused rules .
- Limit administrative access.
- Watch the firewall logs for anything strange.
- Use more robust controls on public networks.
- Secure cloud workloads with proper network firewall rules.
- Don’t use a firewall as your only security measure.
A firewall can protect a Public IP Address but it’s no substitute for software upgrades, strong authentication, endpoint protection, secure application development, encryption or solid security practices.
Is A Firewall Enough To Protect Your Network?
No. A firewall is an important layer of defence, but cyber security is multi-layered.
A firewall, for instance, can block unauthorised network connections but it cannot automatically patch a vulnerable application or prevent a user from voluntarily giving credentials to a phishing website.
OWASP also points out that standard network firewalls are not a complete barrier against all web application attacks. Web application vulnerabilities necessitate additional application security controls.
Organisations should integrate firewalls with secure authentication, patch management, endpoint security, vulnerability management, monitoring, backups and secure application practices.
Final Thoughts
One of the cornerstones of network security is a firewall. It tracks traffic, security rules, blocks unwanted connections and helps to limit the attack surface of machines, servers and networks.
No matter if it is a personal computer or a huge cloud infrastructure that you are safeguarding, firewall rules should be based on what traffic is truly needed. If you have a Public IP Address , it can make an internet-facing service reachable . However , firewall restrictions can be carefully crafted to control which connections are allowed . Therefore, anyone who uses internet-connected devices should know how firewalls work, making it a crucial cybersecurity skill.
Frequently Asked Questions
1. What is Firewall?
A firewall is a security system that monitors network traffic to decide which connections are allowed and which are banned, according to security criteria.
2. Can a firewall disguise my Public IP Address?
No. A firewall does not necessarily hide a Public IP Address. Instead, it is controlling what traffic can reach the systems connected with that address. Other technologies like NAT, VPNs or reverse proxies can offer additional network privacy/architecture benefits.
3. Can a Public IP Address Be Attacked by Hackers?
Attackers might try to scan a Public IP Address for reachable services and open ports. A well-configured firewall can help limit exposure by blocking unwanted incoming connections.
4. Do I have to disable my firewall?
You should generally not disable your firewall unless there’s a special security or troubleshooting reason. Microsoft advises that disabling Windows Firewall could expose a device to unauthorised access.
5. Is a firewall sufficient for cybersecurity?
Nope. A firewall is just one layer of defence. You should also employ software upgrades, strong passwords, multi-factor authentication, endpoint protection, secure configurations, backups, monitoring and other relevant security controls.
Try Our Tools
Want to increase your digital security in your daily life? Explore our resources at ExplainMeTech. Discover useful tools to simplify everyday technology and cybersecurity tasks. See some interesting free resources on our Tools page: ExplainMeTech Tools
References
OWASP – Web Security Testing Guide: Network Firewall & Exposed Services
OWASP Web Security Testing Guide – Network Firewall
NIST – Guidelines on Firewalls and Firewall Policy (SP 800-41 Rev. 1)
NIST SP 800-41 Rev. 1
Microsoft – What Is a Firewall?
Microsoft Support – What Is a Firewall?
Microsoft – Firewall and Network Protection
Microsoft Firewall and Network Protection
Google Cloud – Firewall Documentation
Google Cloud Firewall Documentation
For more helpful technology, cybersecurity, and digital security tips, visit ExplainMeTech.com and explore our latest guides, tools, tips, and insights.