IPv4 Firewall Settings: Complete Guide to Configuration & Security

Estimated Reading Time: 3 min

Here’s a comprehensive guide on IPv4 Firewall Settings to help you configure and manage your firewall for complete security and network control.


IPv4 Firewall Settings Guide

1. Introduction to IPv4 Firewall

A firewall is a network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. IPv4-based firewalls help protect networks by filtering traffic using IP addresses, ports, and protocols.

2. Types of Firewalls

  • Packet Filtering Firewall: Examines packets and allows or blocks them based on IP addresses, ports, and protocols.
  • Stateful Inspection Firewall: Tracks active connections and makes decisions based on the state of traffic.
  • Proxy Firewall: Intermediary between user requests and the target system.
  • Next-Generation Firewall (NGFW): Includes deep packet inspection (DPI), application-layer filtering, and intrusion prevention.

3. Firewall Rules and Configuration

Firewall rules define what traffic is allowed or denied. Rules are usually structured as follows:

ACTION  PROTOCOL  SOURCE IP  DESTINATION IP  PORT

3.1 Common Actions

  • ALLOW: Permit traffic
  • DENY: Block traffic
  • LOG: Record traffic for monitoring

3.2 Protocols

  • TCP (Transmission Control Protocol)
  • UDP (User Datagram Protocol)
  • ICMP (Internet Control Message Protocol)

3.3 Common Ports

ServicePort Number
HTTP80
HTTPS443
FTP21
SSH22
DNS53
SMTP25

4. Configuring IPv4 Firewall on Different Platforms

4.1 Configuring on Linux (iptables)

To list existing firewall rules:

sudo iptables -L -v -n

To allow incoming SSH (port 22):

sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT

To block an IP address:

sudo iptables -A INPUT -s 192.168.1.100 -j DROP

To save rules:

sudo iptables-save > /etc/iptables/rules.v4

4.2 Configuring on Windows Firewall

To allow an application:

  1. Open Windows Defender Firewall.
  2. Click Advanced Settings.
  3. Select Inbound Rules > New Rule.
  4. Choose Program and specify the application.
  5. Allow or block the program.

To block a specific IP address:

New-NetFirewallRule -DisplayName "Block IP" -Direction Inbound -RemoteAddress 192.168.1.100 -Action Block

4.3 Configuring on Cisco Router

To block an IP address:

access-list 100 deny ip 192.168.1.100 0.0.0.255 any
interface GigabitEthernet0/1
ip access-group 100 in

To allow SSH:

access-list 101 permit tcp any any eq 22
interface GigabitEthernet0/1
ip access-group 101 in

5. Best Practices for IPv4 Firewall Security

  • Use Least Privilege: Only allow necessary services and block everything else.
  • Enable Logging: Keep track of all firewall activity.
  • Regularly Review Rules: Remove outdated or unused rules.
  • Implement IP Whitelisting: Restrict access to trusted IPs.
  • Use Stateful Inspection: Improve security with session tracking.

6. Troubleshooting Firewall Issues

  • Check Active Rules: Run iptables -L (Linux) or Get-NetFirewallRule (Windows).
  • Use Network Monitoring Tools: tcpdump, Wireshark, netstat.
  • Verify Connectivity: Use ping and traceroute to diagnose blocked traffic.
  • Test Rules: Temporarily disable or modify rules to troubleshoot.

7. Conclusion

Configuring an IPv4 firewall is essential for securing networks against unauthorized access and threats. By applying the right firewall rules, monitoring logs, and following best practices, you can enhance network security and efficiency.


Photo of author

Flora

IPv4 Firewall Settings: Complete Guide to Configuration & Security

Published

I am Flora, the publisher and founder of *Be-Smart*, a platform dedicated to sharing insights and inspiration for living a fulfilling life. With a strong background in the web, my goal is to empower people to genuinely recognize and celebrate admirable actions big or small in themselves and others.