RaspAP/raspap-webgui

[Bug]: No routing/ip tables on fresh install 3.2.9(img release)

brazier opened this issue · 3 comments

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

Other

RaspAP version

3.2.5 (Latest)

Other software or services running with RaspAP?

No other software

Contact details (optional)

Bug description

There is no Routing between eth0 and wlan0, adding iptables roules as per: manual install fixes the issue until next reboot.

Testet with clean 2.3.9(multiple times) and 2.3.7 install using the supplied images: https://github.com/RaspAP/raspap-webgui/releases/
Running on a Compute model 3 Using Raspberry Pi Imager v1.8.5 to flash with setting username, password, timezone, locale and ssh-key.

Doing a fresh install of the official Raspberry OS Lite 64bit(2024-11-19) from the raspberry pi imager with same settings as above, then running the quick installer works without any problems.
sudo apt-get update sudo apt-get full-upgrade sudo reboot sudo raspi-config curl -sL https://install.raspap.com | bash

Steps to reproduce

  1. Download .img.zip
  2. Write using Raspberry PI Imager v1.8.5
  3. Connect to AP over wifi (fyi im not using a external adapter)
  4. Eth0 connected to other lan(10.0.0.0/24)
  5. No routing

raspap_debug_img.log

raspap_debug_quick_install.log

Screenshots

No response

Additional context

No response

Relevant log output

(Also the version should be updated in the form when posting the issue, and perhaps also add the img realese as a install method)

Inspection of the most recent image build log revealed the following:

Checking iptables rules
/usr/bin/grep: /etc/iptables/rules.v4: No such file or directory
Adding rule: -t nat -A POSTROUTING -j MASQUERADE
iptables: Failed to initialize nft: Protocol not supported
[ x error ]  Unable to execute iptables 
/usr/bin/grep: /etc/iptables/rules.v4: No such file or directory
Adding rule: -t nat -A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE
iptables: Failed to initialize nft: Protocol not supported
[ x error ]  Unable to execute iptables 
Persisting IP tables rules
iptables-save/1.8.9 (nf_tables) Failed to initialize nft: Protocol not supported
[ x error ]  Unable to execute iptables-save 

Thanks for reporting

pi-gen operates in a chroot environment on a mounted filesystem instead of an active OS. For this reason, there are no kernel modules loaded. Configuring iptables or nftables fails because there is no real kernel or network stack running.

The solution (obvious now) is to modify our pi-gen fork to configure these rules on first boot.