Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ji-podhead authored Jun 8, 2024
1 parent 753014d commit 664013c
Showing 1 changed file with 53 additions and 1 deletion.
54 changes: 53 additions & 1 deletion docs/DNS/protection/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,60 @@ By implementing TSIG authentication and regularly updating your DNS software, yo
Remember, the effectiveness of these measures depends on the overall security posture of your DNS infrastructure, including secure network configurations and regular monitoring.

---
### Firewall
These recommendations are tailored to work with PF (Packet Filter), a popular open-source firewall for BSD-based systems, and OpenSense, a comprehensive security suite designed for OPNsense, an open-source network security platform.
Firewall Configuration for DNS Security
**1. Block Unnecessary Ports and Protocols**

***Enhanced Security and Performance Strategies for Web Applications in Kubernetes***
- PF/OpenSense Configuration:

```
block in proto { tcp, udp } on egress port domain
```
> This rule blocks outgoing traffic on ports typically associated with DNS (domain name system) queries, reducing the risk of DNS amplification attacks.
**2. Restrict DNS Queries to Trusted Sources**

- PF/OpenSense Configuration:

```
pass in on em0 proto udp to port domain from any to <trusted-dns-server-ip> keep state
```

> Replace <trusted-dns-server-ip> with the IP address of your trusted DNS server(s). This rule allows DNS queries only to specified, trusted DNS servers, blocking queries to any other destination.
**3. Enable DNSSEC Validation**

- General Recommendation: While PF/OpenSense does not directly handle DNSSEC validation, enabling DNSSEC on your DNS resolver configuration ensures that DNS responses are validated against signed records, providing protection against DNS spoofing.

**4. Monitor and Log DNS Traffic**

- PF/OpenSense Configuration:

```
pass in on em0 proto udp to port domain flags S/SA synproxy state
```
> This rule enables SYN proxying for DNS traffic, logging attempts to perform DNS amplification attacks without actually forwarding the traffic. Combine this with log analysis tools to monitor for suspicious activity.
**5. Use TSIG Authentication for DNS Transactions**

- General Recommendation: Although PF/OpenSense does not natively support TSIG authentication, configuring your DNS server (e.g., BIND9) to require TSIG for zone transfers and dynamic updates provides an additional layer of security against DNS cache poisoning.

**6. Regularly Update Your Firewall Rules**

- Best Practice: Periodically review and update your PF/OpenSense firewall rules to reflect changes in your network topology, threat landscape, and security requirements.

***Integrating with OpenSense***

- OpenSense offers a graphical interface and additional features that complement PF's capabilities, making it easier to manage complex firewall rules and monitor network traffic.
- Utilizing OpenSense alongside PF can enhance your ability to detect and respond to DNS-related threats effectively.
Conclusion
- Configuring your firewall correctly is a crucial step in securing your network against DNS-related attacks.
- By following these guidelines and leveraging tools like PF and OpenSense, you can create a robust defense strategy that protects your DNS infrastructure and broader network from common vulnerabilities.
- Remember, security is an ongoing process; regularly reviewing and adjusting your configurations in response to emerging threats is essential for maintaining a secure environment.

---
### Enhanced Security and Performance Strategies for Web Applications in Kubernetes


**1. Container Security:**
Expand Down

0 comments on commit 664013c

Please sign in to comment.