From c66c0b46b5a8d5745cd1f3dded80541a25e5bd8d Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 29 Oct 2025 17:31:32 +0100 Subject: [PATCH] board/aarch64: update BPi-R3 factory-config - Enable bridging of LAN ports in br0, default IP: 192.168.0.1/24 - Enable firewall with two zones: 'wan' and 'lan', policy: lan-to-wan - Enable DHCP server on br0 Signed-off-by: Joachim Wiberg --- .../bananapi,bpi-r3/etc/factory-config.cfg | 110 +++++++++++++++++- 1 file changed, 105 insertions(+), 5 deletions(-) diff --git a/board/aarch64/bananapi-bpi-r3/rootfs/usr/share/product/bananapi,bpi-r3/etc/factory-config.cfg b/board/aarch64/bananapi-bpi-r3/rootfs/usr/share/product/bananapi,bpi-r3/etc/factory-config.cfg index 8eef6793..8d94c11b 100644 --- a/board/aarch64/bananapi-bpi-r3/rootfs/usr/share/product/bananapi,bpi-r3/etc/factory-config.cfg +++ b/board/aarch64/bananapi-bpi-r3/rootfs/usr/share/product/bananapi,bpi-r3/etc/factory-config.cfg @@ -10,30 +10,61 @@ "state": { "admin-state": "unlocked" } + }, + { + "class": "infix-hardware:usb", + "name": "USB2", + "state": { + "admin-state": "unlocked" + } } ] }, "ietf-interfaces:interfaces": { "interface": [ + { + "name": "br0", + "type": "infix-if-type:bridge", + "ietf-ip:ipv4": { + "address": [ + { + "ip": "192.168.0.1", + "prefix-length": 24 + } + ] + } + }, { "name": "lan1", "type": "infix-if-type:ethernet", - "ietf-ip:ipv6": {} + "ietf-ip:ipv6": {}, + "infix-interfaces:bridge-port": { + "bridge": "br0" + } }, { "name": "lan2", "type": "infix-if-type:ethernet", - "ietf-ip:ipv6": {} + "ietf-ip:ipv6": {}, + "infix-interfaces:bridge-port": { + "bridge": "br0" + } }, { "name": "lan3", "type": "infix-if-type:ethernet", - "ietf-ip:ipv6": {} + "ietf-ip:ipv6": {}, + "infix-interfaces:bridge-port": { + "bridge": "br0" + } }, { "name": "lan4", "type": "infix-if-type:ethernet", - "ietf-ip:ipv6": {} + "ietf-ip:ipv6": {}, + "infix-interfaces:bridge-port": { + "bridge": "br0" + } }, { "name": "lo", @@ -168,7 +199,17 @@ } }, "ietf-system:system": { - "hostname": "infix-00-00-00", + "hostname": "bpi-r3", + "ntp": { + "server": [ + { + "name": "default", + "udp": { + "address": "pool.ntp.org" + } + } + ] + }, "authentication": { "user": [ { @@ -210,6 +251,65 @@ } ] }, + "infix-dhcp-server:dhcp-server": { + "option": [ + { + "id": "ntp-server", + "address": "auto" + }, + { + "id": "dns-server", + "address": "auto" + }, + { + "id": "router", + "address": "auto" + } + ], + "subnet": [ + { + "subnet": "192.168.0.0/24", + "pool": { + "start-address": "192.168.0.100", + "end-address": "192.168.0.250" + } + } + ] + }, + "infix-firewall:firewall": { + "default": "wan", + "zone": [ + { + "name": "lan", + "action": "accept", + "interface": [ + "br0" + ] + }, + { + "name": "wan", + "action": "drop", + "interface": [ + "wan" + ], + "service": [ + "dhcpv6-client" + ] + } + ], + "policy": [ + { + "name": "lan-to-wan", + "ingress": [ + "lan" + ], + "egress": [ + "wan" + ], + "masquerade": true + } + ] + }, "infix-meta:meta": { "version": "1.5" },