Troubleshooting Network Issues on a Raspberry Pi with pfSense

Troubleshooting Network Issues on a Raspberry Pi with pfSense

Recently, I encountered a network connectivity issue with my Raspberry Pi running Raspberry Pi OS Bookworm, where the device was not receiving an IP address from my pfSense router’s DHCP server. After some investigation and adjustments, I was able to resolve the problem successfully. Here’s a detailed blog post to help others facing similar challenges.

Initial Symptoms

The issue was that my Raspberry Pi, connected via a wired Ethernet connection, was not receiving an IP address from my pfSense DHCP server. The default DHCP client, dhcpcd, was active and causing conflicts. Although NetworkManager was installed, it was not active, leading to further issues.

Diagnosing the Issue

Step 1: Check Network Interface Status

I began by checking the network interface status using:

nmcli device status

The output revealed that eth0 was connected but not receiving an IP address.

Step 2: Verify IP Assignment

To verify whether the Raspberry Pi was assigned an IP address, I used:

ip a show eth0

The result showed an IP address (192.168.0.224) and a valid lease from the pfSense DHCP server.

Step 3: Confirm the Default Gateway

Next, I checked the default gateway configuration:

ip route

The default route correctly pointed to the pfSense router at 192.168.0.1.

Changing DHCP Client to NetworkManager

The default DHCP client on Raspberry Pi OS Bookworm is dhcpcd, which can cause conflicts. To switch to NetworkManager, I used:

sudo raspi-config

I navigated to Advanced Options > Network Config > NetworkManager, selected it, and rebooted the Raspberry Pi. This change resolved the DHCP conflict and allowed the device to obtain an IP address correctly.

Testing Network Connectivity

Ping Test

I ran a basic connectivity test:

ping 8.8.8.8
ping google.com

Both tests were successful, indicating no connectivity issues.

Resolving the Issue

The issue was resolved by disabling dhcpcd and enabling NetworkManager using sudo raspi-config. No further DNS changes were required as the default settings pointed correctly to the pfSense router.

Conclusion

After switching to NetworkManager using sudo raspi-config, my Raspberry Pi successfully received a DHCP lease from the pfSense router, and the network connectivity was fully restored. If you’re experiencing similar issues, following these steps can help identify and resolve the problem effectively.

Feel free to share your own network troubleshooting experiences or reach out for further assistance!




Optimizing pfSense WAN Stability: Adjusting dpinger Monitoring IP

When managing a pfSense firewall, maintaining a stable WAN connection is crucial for ensuring uninterrupted internet access. One common issue users face is the dpinger gateway monitor mistakenly marking the WAN as down, leading to unnecessary failovers or service disruptions. This often happens when the default monitor IP (usually the ISP’s gateway) becomes temporarily unreachable, even if the internet connection is still active.

Why Change the dpinger Monitor IP?

The default setup typically monitors the ISP’s gateway. However, this gateway might not always be reliable, leading to false positives where pfSense incorrectly detects a WAN failure. By changing the monitor IP to a more reliable and globally accessible IP address, such as Cloudflare’s 1.1.1.1 or Google’s 8.8.8.8, you can minimize the risk of unnecessary downtime.

How to Change the dpinger Monitor IP

  1. Access pfSense Interface:

  • Log in to the pfSense web interface.

  1. Modify Gateway Settings:

  • Navigate to System > Routing, then go to the Gateways tab.
  • Edit your WAN gateway by clicking the pencil icon.

  1. Set a New Monitor IP:

  • In the Monitor IP field, enter 1.1.1.1 (or another reliable IP).
  • Save and apply the changes.

Benefits of Using a Reliable Monitor IP

Switching to a well-known IP like 1.1.1.1 enhances the reliability of your gateway monitoring, ensuring that dpinger only triggers alerts or actions when there’s a genuine WAN issue. This adjustment helps maintain a more stable network environment, particularly in scenarios where the WAN connection is critical.

Final Thoughts

For many pfSense users, changing the dpinger monitor IP is a simple yet effective tweak to ensure WAN stability. It’s a proactive step to prevent false alarms and ensure that your firewall is performing optimally. Remember, while this solution works for most setups, always monitor the performance after making changes to ensure it suits your specific environment.

This adjustment is particularly useful for those experiencing frequent, unwarranted WAN down notifications and can significantly improve network reliability.

By making this small change, you can help ensure your pfSense firewall continues to provide robust, uninterrupted protection for your network.


By following these steps, you can enhance the reliability of your pfSense setup, minimizing unnecessary disruptions and keeping your network running smoothly. For more detailed discussions and user experiences, you might want to visit pfSense forums or review the official documentation.




pfSense+ ver. 24.09: Recovering from a Firmware Upgrade Mishap on My Netgate SG-1100

Upgrading the firmware of a device usually promises enhancements and bug fixes, but it can sometimes lead to unexpected complications, as was the case with my recent experience upgrading my Netgate SG-1100 from version 23.09 to 24.03. Typically, a firmware upgrade takes around 15-20 minutes, during which I ensured I had a backup in place, following best practices.

However, this time around, the upgrade did not go as planned, and I found myself reaching for my serial cable, downloading balenaEtcher and PuTTY, and preparing for a manual recovery. I reached out to Netgate support, who guided me through the process of downloading the latest firmware. The process was straightforward: log into the Netgate store, add the firmware to your cart, and download it at no additional cost.

Using balenaEtcher, I wrote the firmware image to a USB stick, then connected it to my device. With my serial cable attached and PuTTY configured (COM3, 115200 speed, 8 data bits, 1 stop bit, no parity, and no flow control).
I followed the detailed installation instructions provided by Netgate, which are available here.

During this ordeal, I was grateful for my backup Internet solutions, including a home fiber connection and mobile Internet. I had a secondary router ready—a Zimaboard running pfSense Community Edition—which not only got me back online quickly but also, surprisingly, performed faster than the SG-1100.

This experience reinforced the value of having a backup router and the practicality of using pfSense Community Edition for personal use. For businesses, however, I would still recommend investing in a Netgate device with the Plus version for additional support.

Once I resolved the initial issues, restored my settings, and confirmed everything was operational, I decided to keep the Netgate SG-1100 as a backup device while continuing to use my Zimaboard. This incident highlighted a compatibility issue with pfBlockerNG-devel and the new firmware on the small Netgate SG-1100, which was resolved by switching back to the stable version of pfBlockerNG.

Always having a backup plan and knowing how to manually recover your device’s firmware are invaluable, as Internet connectivity is crucial in today’s world. The ability to troubleshoot and restore functionality with minimal downtime is not just convenient; it is essential.

Knud ;O)




Enhancing Your Network Security with pfBlockerNG-devel: A Quick Guide

I recently upgraded to pfSense Plus 24.03 and initially hoped to see improvements with pfBlockerNG-devel. However, it appears that pfBlockerNG-devel is facing stability issues in this version. On the other hand, the standard pfBlockerNG seems to be functioning more stably. If you’re encountering similar issues with pfBlockerNG-devel, it might be worth switching back to the stable version of pfBlockerNG until further updates address these concerns.

Are you concerned about the security of your home network? Worried about malicious websites, ads, and unwanted content infiltrating your online experience? Look no further than pfBlockerNG-devel, a powerful package for pfSense that allows you to take control of your network’s security by implementing various blocking mechanisms. In this guide, we’ll walk you through the installation and key configuration steps to get the most out of pfBlockerNG-devel without overwhelming you with technical details.

Installation

To get started, open up your pfSense dashboard and navigate to the System Package Manager. Here, you’ll find a list of available packages. Search for “pfBlockerNG-devel” and install it. Once the installation is complete, you’ll be guided through a wizard that will assist you in setting up pfBlockerNG.

Initial Configuration

After installation, ensure that you enable “floating rules” and “kill states.” These settings are important for the proper functioning of pfBlockerNG.

GeoIP Blocking

One powerful feature of pfBlockerNG-devel is the ability to block traffic based on geographical locations. If there are countries you prefer not to have contact with, you can easily set up inbound blocking rules for them. This adds an extra layer of security to your network.

DNSBL (DNS Blocking)

DNSBL, or DNS Blocking, is an essential tool to prevent access to malicious, ads, and unwanted websites. pfBlockerNG-devel supports this feature by allowing you to add various blacklists. However, it’s important not to go overboard, as blocking too much might hinder your internet usage. Consider enabling lists like “ads_basic,” “malicious,” “easylist,” and “firebog_malicious” under DNSBL groups.

Moreover, the “shalalist” category offers site-blocking options for aggressive, cost traps, drugs, finance, gambling, and spyware-related websites. The “ut1” category includes aggressive, dangerous sites, DDOS, drugs, gambling, malware, phishing, sects, and cheater-related sites. Be selective in your choices to maintain optimal internet usability.

IP Blocking

In the IP blocking section, you can prevent outbound traffic to specific IP addresses. This is useful for devices that may have IP addresses hardcoded in their software, bypassing your DNS. Prioritize blocking known malicious IPs by using the PRI1 and TOR deny outbound lists. Additionally, maintain a whitelist to permit outbound traffic to trusted IPs.

Regular Updates

Remember, changes you make within pfBlockerNG-devel need an update to take effect. Go to “Firewall” and select “pfBlockerNG Update” to ensure your settings are current.

DNS Provider and Security

For enhanced security, consider configuring your external DNS provider. One recommended option is Quad9, known for its comprehensive blocklists and secondary DNS service. Quad9 not only blocks potentially harmful sites but also secures your DNS requests against potential fakes. This extra layer of protection prevents malicious actors from redirecting you to counterfeit websites.

Conclusion

Enhancing your network security with pfBlockerNG-devel doesn’t have to be overwhelming. By following this quick guide, you can set up an effective security solution for your home network. Remember to strike a balance between protection and usability, and stay updated with the latest threat intelligence to keep your online experience safe and smooth.




Exploring the KEA DHCP Server in pfSense+ 23.09

Do not use KEA DHCP after 50 days, I got a lot of problems and my devices did not come on the internet and also not got the right IPs.
So I had to switch back to the old ISC DHCP again.

Warning – KEA DHCP is not working 100% in 23.09.1

With the release of pfSense+ 23.09, a significant transition in DHCP services is on the horizon. The move from the traditional ISC DHCP server to the modern KEA DHCP is not just a change; it’s an upgrade that brings several benefits and improvements.

Why Switch to KEA DHCP?

  1. Deprecated ISC DHCP: The ISC DHCP server is now deprecated, signaling a shift towards more advanced and supported solutions like KEA.
  2. Simple Transition Process: You can easily switch to KEA DHCP via System > Advanced > Networking in the pfSense+ interface. A simple toggle from ISC DHCP to KEA DHCP is all it takes, maintaining the simplicity of the process.
  3. No Reboot Required: Remarkably, switching to KEA DHCP doesn’t necessitate a system reboot. This feature ensures minimal disruption in network services.

Key Considerations for Migration

  1. Automatic Migration: pfSense+ is engineered to seamlessly migrate your existing DHCP settings to KEA DHCP, preserving configurations like IP ranges and reservations.
  2. Manual Verification: It’s prudent to manually check that all settings have correctly transferred and KEA DHCP operates as expected.
  3. Advanced Configurations: KEA DHCP offers more flexibility, which might necessitate some manual adjustments for complex configurations.
  4. Documentation and Community Support: Leverage pfSense documentation and forums for any migration challenges or questions.
  5. Backup Your Configuration: Always backup your current configuration before making significant changes like this.

Enhancements with KEA DHCP

KEA DHCP is not just a replacement but an enhancement. It offers:

  1. Unified Configuration: KEA integrates dynamic ranges and static mappings more cohesively.
  2. Static Mappings in Dynamic Range: Static mappings can now coexist within the dynamic range, optimizing address space utilization.
  3. Flexibility in Assignments: KEA allows dynamic and fixed address assignments within the same pool, offering greater flexibility.
  4. Improved Management and Performance: Expect easier management and better performance with KEA, along with advanced features suitable for complex networks.

Post-Migration Steps

After the migration:

  1. Monitor Service Status: Check Status > Dashboard to confirm KEA DHCP service is up and running.
  2. Adjust Watchdog Settings: Update your service watchdog to monitor KEA DHCP instead of the old ISC service.
  3. Review Notifications: Keep an eye on notifications for any alerts related to DHCP service.

In summary, the transition to KEA DHCP in pfSense+ 23.09 is a straightforward yet impactful change. It simplifies the DHCP management while offering improved performance and flexibility. Remember to verify settings post-migration and enjoy the new capabilities of your upgraded system!

Knud ;O)




Understanding the Importance of the Recent OpenSSH Patch in pfSense

Understanding the Importance of the Recent OpenSSH Patch in pfSense

The FreeBSD Project recently issued a crucial security advisory (FreeBSD-SA-23:19.openssh) that highlights a significant vulnerability in OpenSSH—a widely used suite for secure remote communication. This advisory is particularly relevant for users of pfSense, a popular open-source firewall and router software based on FreeBSD.

The Vulnerability: Prefix Truncation Attack

Identified as CVE-2023-48795, the security flaw involves a “Prefix Truncation Attack” in the SSH protocol’s handshake mechanism. Attackers can exploit this vulnerability to manipulate handshake messages silently, potentially weakening client authentication algorithms or disabling keystroke timing attack countermeasures. This vulnerability affects all supported versions of FreeBSD.

Immediate Action Required

Given the severity of the issue, it’s vital for administrators to patch their systems immediately. For pfSense users, this means ensuring their system incorporates the latest FreeBSD patches. The advisory provides detailed steps for updating systems either through binary patches via freebsd-update or by applying source code patches directly.

Workaround and Long-Term Solution

Until systems can be fully updated, a temporary workaround is provided, involving specific changes to the OpenSSH configuration files to mitigate the risk. However, this is only a stopgap measure, and administrators are strongly encouraged to apply the full updates as soon as possible to ensure the integrity and security of their systems.

Conclusion

This advisory serves as a reminder of the constant vigilance needed in maintaining the security of network systems like pfSense. Administrators should take immediate action to apply this patch and regularly monitor for further updates to protect against evolving threats. The quick response and detailed guidance provided by the FreeBSD Security Team reflect the ongoing commitment to security within the open-source community.




Understanding the Security Enhancements in pfSense + Update 23.09.1


Introduction:

The latest pfSense + update, version 23.09.1, marks a significant step forward in network security and functionality. As a widely-used open-source firewall and router software, pfSense is integral to maintaining robust network security. This update addresses several critical vulnerabilities and performance issues, reflecting the ongoing commitment to providing a secure and efficient network environment.

Key Security Fixes in 23.09.1:

  1. TCP Spoofing Vulnerability Patch (FreeBSD-SA-23:17.pf):
    One of the most critical fixes in this release is for a TCP spoofing vulnerability in the pf(4) component. This vulnerability could potentially allow an attacker to intercept and manipulate TCP traffic, posing a significant risk to data integrity and security. The update patches this flaw, thereby enhancing the security of TCP traffic management in pfSense.
  2. ZFS Data Corruption Issues (FreeBSD-EN-23:16.openzfs & FreeBSD-EN-23:18.openzfs):
    ZFS, a key file system used by pfSense, had two notable vulnerabilities that have been addressed in this update. One issue led to potential data corruption, and the other caused high CPU usage by ZFS kernel threads. These fixes not only improve data integrity but also enhance the overall performance of systems using ZFS.
  3. OpenSSL Performance Issues (FreeBSD-EN-23:17.ossl):
    Prior to the update, the ossl(4) module’s AES-GCM implementation occasionally produced incorrect results. Since AES-GCM is widely used for encrypted communications, this fix is crucial for maintaining the confidentiality and integrity of encrypted data.
  4. Kernel Physical Memory Allocator Error (FreeBSD-EN-23:20.vm):
    The update rectified an issue with the kernel’s physical memory allocator, which previously gave incorrect results. This fix is vital for the overall stability and reliability of the pfSense system.

Implications for Network Security:

These security enhancements in the pfSense + 23.09.1 update represent critical steps in safeguarding network infrastructure. By addressing vulnerabilities ranging from TCP spoofing to data integrity in file systems and encryption modules, this update ensures that pfSense continues to offer robust defense mechanisms against a variety of cyber threats.

Furthermore, the resolution of these issues not only enhances security but also contributes to the overall performance and stability of networks utilizing pfSense. Network administrators can now rely on a more secure, efficient, and reliable system for managing their network traffic and security policies.

Conclusion:

The 23.09.1 update for pfSense + underscores the importance of continuous vigilance and proactive measures in network security. By addressing key vulnerabilities and performance issues, pfSense maintains its position as a trusted and capable tool in the arsenal of network security professionals. Users of pfSense are encouraged to apply this update promptly to ensure their networks remain secure and efficient.

For more in-depth details about the 23.09.1 update and its full range of features and fixes, please refer to the official pfSense documentation.


This blog post outlines the security-centric aspects of the pfSense + 23.09.1 update, emphasizing its impact and importance in network security.




Accelerating VPN Performance with SafeXcel Crypto on pfSense 23.09-RELEASE (arm64)

The pfSense 23.09-RELEASE has brought a welcome addition to its suite of security features for Netgate 1100 users: the SafeXcel Crypto setting. This new feature is targeted at enhancing the already robust VPN performance by leveraging dedicated hardware acceleration.

What is SafeXcel Crypto?

SafeXcel Crypto is a hardware acceleration technology that boosts the performance of cryptographic operations. When activated, it allows the system to handle encryption and decryption processes for VPN connections more efficiently. It supports a range of encryption algorithms including AES-CBC, AES-CCM, AES-GCM, and more.

How Does it Benefit VPN Performance?

By activating SafeXcel Crypto, VPN operations are no longer solely dependent on the CPU’s general capabilities. Instead, they utilize dedicated hardware designed specifically for cryptographic functions. This results in:

  • Increased Throughput: Data can be encrypted and decrypted at a faster rate, allowing for higher data transmission speeds through the VPN.
  • Reduced CPU Load: Offloading these tasks from the main CPU helps in reducing the overall load, which is particularly beneficial for systems under heavy use.
  • Enhanced Security: With dedicated resources for cryptographic operations, security protocols can function more robustly.

How to Activate SafeXcel Crypto

Activating SafeXcel Crypto in the new pfSense 23.09-RELEASE is straightforward. Navigate to System > Advanced > Miscellaneous in the pfSense GUI and enable the SafeXcel Crypto option. Make sure to configure your IPsec to use one of the supported ciphers to take full advantage of this feature.

Final Thoughts

The addition of SafeXcel Crypto to pfSense’s security arsenal reinforces Netgate’s commitment to delivering top-notch performance and security. With the ease of activation and the promise of better VPN performance, SafeXcel Crypto is set to be a game-changer for businesses and individuals alike who depend on VPNs for secure, reliable connectivity.




Effortless Upgrade to pfSense+ 23.09 on Netgate 1100: A Quick Guide

Hello, tech enthusiasts! Knud here with a must-know update for all pfSense+ users, especially those with Netgate 1100. The latest release, 23.09, is here, and it’s packed with significant changes and upgrades.

Upgrading to pfSense+ 23.09: Step-by-Step

  1. Initiate the Update: Access the pfSense+ dashboard, and click the ‘Update’ button under the ‘Version’ section.
  2. Backup Is Key: Before updating, navigate to ‘Diagnostics’ then ‘Backup & Restore’ for a necessary backup.
  3. Patience Pays Off: Expect the update to take around 15 minutes. So, relax, and let it complete.

What’s New in 23.09?

  1. PHP Upgrade: PHP has been upgraded to version 8.2.11, ensuring better performance and security【11†source】.
  2. Operating System Upgrade: The base system now uses a more recent point on FreeBSD 14-CURRENT【11†source】.
  3. Improved SCTP Support: Enhancements in PF for firewall rules, NAT, and logging, particularly for SCTP packets【11†source】.
  4. OpenSSL Upgrade: A significant jump from 1.1.1t to 3.0.12, bringing major API and ABI changes, and deprecating weak algorithms【15†source】.
  5. Kea DHCP Server: A new, opt-in feature preview for IPv4 and IPv6 DHCP services【11†source】.
  6. NVMe Storage Device Driver Change: The default driver switched from nvd(4) to nda(4), impacting swap configurations【15†source】.
  7. Security Enhancements: OpenSSL 3.0.x no longer supports SHA1 certificates, impacting OpenVPN and other services【15†source】.

Post-Update Steps:

Once updated, perform another backup to ensure your settings are current.

Final Thoughts:

Upgrading your pfSense+ system to version 23.09 is straightforward but requires careful steps. Remember, patience is crucial during the upgrade process for a smooth transition. Enjoy the new features and improved performance!

Cheers to efficient networking,
Knud ;O)




Setting Up SMTP Mail to Pushover Notification with Docker on Raspberry Pi

Setting Up SMTP Mail to Pushover Notification with Docker on Raspberry Pi

Are you looking for a way to easily push SMTP emails to your Pushover notifications using your Raspberry Pi? With the power of Docker and the smtp-pushover image by mattbun, you can set up a simple solution that allows you to send emails to your Raspberry Pi’s port 25 and have the messages forwarded to your Pushover account. In this guide, we’ll walk you through the process step by step.

Prerequisites:

  1. Raspberry Pi with Docker installed.
  2. Basic understanding of Docker and Docker Compose.
  3. Pushover account with User Key and API Token.

Step 1: Pull the Docker Image

The first step is to pull the smtp-pushover Docker image from the GitHub Container Registry. Open a terminal on your Raspberry Pi and execute the following command:

docker pull ghcr.io/mattbun/smtp-pushover:main@sha256:bb4a333892e612edbff843c0a8c79112ff0e61a2e605ebcce4755701513f5f38

Step 2: Configure Docker Compose

Create a docker-compose.yml file in a directory of your choice. Copy and paste the following configuration into the file:

version: '3'

services:
  smtp-pushover:
    restart: unless-stopped
    container_name: smtp-pushover
    image: ghcr.io/mattbun/smtp-pushover
    ports:
      - "25:25"
    environment:
      - PORT=25
      - PUSHOVER_USER="YOUR_PUSHOVER_USER_KEY"
      - PUSHOVER_TOKEN="YOUR_PUSHOVER_API_TOKEN"

Replace YOUR_PUSHOVER_USER_KEY and YOUR_PUSHOVER_API_TOKEN with your actual Pushover User Key and API Token.

Step 3: Start the Service

In the same directory where you created the docker-compose.yml file, open a terminal and run the following command to start the Docker container:

docker-compose up -d smtp-pushover

The -d flag stands for “detached mode,” which will run the container in the background.

Step 4: Sending Emails to Port 25

You’re all set! You can now send emails to the port 25 on your Raspberry Pi. Any emails sent to this port will be forwarded to your Pushover account as notifications.

Conclusion

With just a few simple steps, you’ve set up your own SMTP server using Docker on your Raspberry Pi and configured it to forward emails to your Pushover notifications. This can be a convenient way to receive important alerts and messages directly on your mobile device. Remember to keep your Pushover User Key and API Token secure and never share them publicly. Happy notifying!

For more information and options, you can refer to the official smtp-pushover repository.