Skip to content

[Bug]: Iptables firewall rules update to block traffic on abended tunnel #1649

Closed as not planned
@frankozland

Description

@frankozland

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Issue reporting checklist

Operating System

Raspberry Pi OS (64-bit) Lite Bookworm

Quick install or Manual setup?

Quick install

Onboard wireless chipset or external adapter?

Onboard wireless chipset

Hardware

Raspberry Pi 4 Model B

RaspAP version

3.1.3 (Latest)

Other software or services running with RaspAP?

Yes (specify below)

Contact details (optional)

Bug description

config/iptables_rules.json

        {
            "name": "firewall policies",
            "fw-state": true,
            "comment": "Policy rules (firewall)",
            "rules": [
                "-P INPUT DROP",
                "-P FORWARD ACCEPT",
                "-P OUTPUT ACCEPT",
                "-t nat -P PREROUTING ACCEPT",
                "-t nat -P POSTROUTING ACCEPT",
                "-t nat -P INPUT ACCEPT",
                "-t nat -P OUTPUT ACCEPT"
            ]

With '-P FORWARD ACCEPT' and any cli/openvpn/wg goes down, packets will still flow.
Masquerade means "FORWARD ANY MEANS POSSIBLE"

So if tunnel dies, packets still traverse.

This should be changed to '-P FORWARD DROP'

2ndly - if i have already applied custom firewall rules, they should be honored vs raspap changing them.
For example, in my firewall i specificed '-P FORWARD DROP'. RASPAP ignored what i configured and changed it to '-P FORWARD ACCEPT'.

I think Raspap should check to see if i have any rules that its about to change and give option not to change them if already set.

Steps to reproduce

install raspap
apply personal custom firewall rules
enable tunnel

Screenshots

No response

Additional context

No response

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions