-
-
Notifications
You must be signed in to change notification settings - Fork 825
Description
Code of Conduct
- I agree to follow this project's Code of Conduct.
Issue reporting checklist
- I have read and understand the issue reporting policy.
- I observed this bug on a clean install of a supported OS.
- I have followed the project prerequisites.
- I have searched this repository for existing issues.
- I checked the FAQ and official documentation.
- I am using an external wireless adapter.
- I have generated a RaspAP debug log and performed a self-diagnosis.
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
I think there is an issue with iptables on set up - ive logged a few cases on this before, but i think i now have an answer.
And it could just be my issue -
Masquerade means "just try to send that packet no matter what" - the default is to just forward packet any way possible.
The default is to forward everything and anything.
If the behaviour is not to want that you have to explicitly state this in a DROP rule.
I struggled with this for a while before finally realizing that without the DROP rule, if any of the configured vpn's (openvpn, wireguard, nord, etc) go down, packets are automatically forwarded OUTSIDE the tunnel.
This is absolutely not the behaviour i personally want.
The change is simple - add:
-P FORWARD DROP
With the installer prompt "Block anything that doesnt go thru VPN?"
If yes, plop that rule in.
This means if WLAN0 tries to send packet to WLAN1 directly as a FORWRD it gets blocked immediately.
local net traffic is unaffected.
Only WLAN0 -> (whatever tunnel wg0, tun0, etc) -> WLAN1 will flow (as well as local traffic)
I have an external iptables ruleset that i've tested this on.
Im betting most users are unaware that if the vpn tunnel goes down traffic still goes thru - and im guessing thats a very undesirable configuration.
I think the files impacted are:
installers/configauth.sh
installers/uninstall.sh
config/iptables_rules.json
A nice to have would be a switch in admin panel to be able to turn this on or off and maybe a monitor on dashboard that displays a warning if the switch is on and the tunnel isnt passing traffic for easier diagnostics to non-technical users.
Steps to reproduce
install with openvpn
install openvpn provider and bring up openvpn interface.
install iptraf and open a seperate window with iptraf watching general interfaces
disable openvpn
Traffic still flows.
Screenshots
No response
Additional context
No response
Relevant log output
No response