ヤオフクでOrange Pi zeroを入手したのでインストール作業に取り掛かりました。Orange Pi zeroはLanポートが100Mbpsなので本命ではないのですが、定評があるモデルなので持っている価値はある上、今ある条件で経験を積んでおきたいということとでやってみることにしました。Allwinner系のSBCはWi-Fi周りが弱いという欠点がありますが、他のルータと比べて処理能力が格段優れています。従来のルーターとこのSBCを組み合わせることで素晴らしい効果が期待できます。
このSBCボードで特にやりたかったことはShorewallの導入です。以前、Armbianに改造したTVBOXのルータで1年程度稼働したのですが、突然eMMCが壊れたという経験をしてから、ルータは極力ストレージアクセスを避けるべきだという方針に変えてました。仕方なく非力なルーターを使わざるを得なかったのですがShorewallを動かすには非力すぎました。そこでOpenWrtに対応する機器を調べていたらAllwinner系のSoCが使えるということがわかり、これを使えばShorewallが使えるのではと考えました。
問題はSBCの入手ですが、元の値段に対してどういうわけかみな高額でなかなかチャンスが見つけられないことが続いてたのですが、偶然ヤオフクでOrange Pi zeroを見つけました。本命ではないのですが、Orange Pi zeroなら今のADSL環境でもスペック的に十分対応可能なので入手することにしました。
入手したボードを調べてみるとv1.5でしたので最新のLTSバージョンということになります。調べたところ前バージョンのv1.4だと発熱の問題があり、あまり宜しくないようです。v1.5(LTS版)は発熱等ほかいくつか不具合が改善されているというアナウンスがされており実際に期待通りの結果でした。
インストールはOpenWrtのサイトからopenwrt-19.07.5-sunxi-cortexa7-sun8i-h2-plus-orangepi-zero-ext4-sdcard.img.gz
というファイルをダウンロードしてTFカードに焼き付けるだけです。
gunzip -c openwrt-19.07.5-sunxi-cortexa7-sun8i-h2-plus-orangepi-zero-ext4-sdcard.img.gz | dd of=/dev/mmcblk(1) bs=1M
TFカードをOrange PiにセットしてUSBケーブルから電源を送り込めばOopenWrtが立ち上がります。リセットボタンが見当たらないのでfailsafeをどうするのかわかりませんが、UARTポートのシリアルアクセスができるのでこれで対処できそうです。参考にログ出力を載せておきます。
[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.14.209 (builder@buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11257-5090152ae3)) #0 SMP PREEMPT Sun Dec 6 07:31:03 2020 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=30c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: Xunlong Orange Pi Zero [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] On node 0 totalpages: 131072 [ 0.000000] free_area_init_node: node 0, pgdat c0c58880, node_mem_map dfbac000 [ 0.000000] Normal zone: 1024 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 131072 pages, LIFO batch:31 [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: Using PSCI v0.1 Function IDs from DT [ 0.000000] random: get_random_bytes called from 0xc0a00908 with crng_init=0 [ 0.000000] percpu: Embedded 15 pages/cpu s30796 r8192 d22452 u61440 [ 0.000000] pcpu-alloc: s30796 r8192 d22452 u61440 alloc=15*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 130048 [ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Memory: 508560K/524288K available (5648K kernel code, 356K rwdata, 956K rodata, 2048K init, 250K bss, 15728K reserved, 0K cma-reserved, 0K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xe0800000 - 0xff800000 ( 496 MB) [ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc0784188 (7665 kB) [ 0.000000] .init : 0xc0a00000 - 0xc0c00000 (2048 kB) [ 0.000000] .data : 0xc0c00000 - 0xc0c59180 ( 357 kB) [ 0.000000] .bss : 0xc0c6052c - 0xc0c9f010 ( 251 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4. [ 0.000000] Tasks RCU enabled. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] GIC: Using split EOI/Deactivate mode [ 0.000000] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns [ 0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.000017] Switching to timer-based delay loop, resolution 41ns [ 0.000150] Console: colour dummy device 80x30 [ 0.000188] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.000202] pid_max: default: 32768 minimum: 301 [ 0.000315] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.000327] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.000818] CPU: Testing write buffer coherency: ok [ 0.001132] /cpus/cpu@0 missing clock-frequency property [ 0.001154] /cpus/cpu@1 missing clock-frequency property [ 0.001169] /cpus/cpu@2 missing clock-frequency property [ 0.001187] /cpus/cpu@3 missing clock-frequency property [ 0.001199] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.040054] Setting up static identity map for 0x40200000 - 0x40200060 [ 0.060049] Hierarchical SRCU implementation. [ 0.100107] smp: Bringing up secondary CPUs ... [ 0.180499] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.260622] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002 [ 0.340762] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003 [ 0.340839] smp: Brought up 1 node, 4 CPUs [ 0.340861] SMP: Total of 4 processors activated (192.00 BogoMIPS). [ 0.340867] CPU: All CPU(s) started in HYP mode. [ 0.340872] CPU: Virtualization extensions available. [ 0.344335] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.344792] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.344815] futex hash table entries: 1024 (order: 4, 65536 bytes) [ 0.345005] pinctrl core: initialized pinctrl subsystem [ 0.346156] NET: Registered protocol family 16 [ 0.346464] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.347919] No ATAGs? [ 0.373147] SCSI subsystem initialized [ 0.373445] libata version 3.00 loaded. [ 0.373721] usbcore: registered new interface driver usbfs [ 0.373789] usbcore: registered new interface driver hub [ 0.373882] usbcore: registered new device driver usb [ 0.374018] Linux video capture interface: v2.00 [ 0.374075] pps_core: LinuxPPS API ver. 1 registered [ 0.374083] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.374109] PTP clock support registered [ 0.374424] Advanced Linux Sound Architecture Driver Initialized. [ 0.380913] clocksource: Switched to clocksource arch_sys_counter [ 0.386265] NET: Registered protocol family 2 [ 0.386885] TCP established hash table entries: 4096 (order: 2, 16384 bytes) [ 0.386932] TCP bind hash table entries: 4096 (order: 3, 32768 bytes) [ 0.386995] TCP: Hash tables configured (established 4096 bind 4096) [ 0.387085] UDP hash table entries: 256 (order: 1, 8192 bytes) [ 0.387123] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) [ 0.387287] NET: Registered protocol family 1 [ 0.387632] kvm [1]: 8-bit VMID [ 0.388062] kvm [1]: vgic interrupt IRQ16 [ 0.388166] kvm [1]: Hyp mode initialized successfully [ 0.389251] No memory allocated for crashlog [ 0.389393] workingset: timestamp_bits=30 max_order=17 bucket_order=0 [ 0.393640] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.393796] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.396124] io scheduler noop registered [ 0.396138] io scheduler deadline registered [ 0.396276] io scheduler cfq registered (default) [ 0.396836] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO [ 0.400047] sun8i-h3-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver [ 0.401531] sun8i-h3-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver [ 0.406281] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled [ 0.408898] console [ttyS0] disabled [ 0.429199] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 35, base_baud = 1500000) is a U6_16550A [ 1.035240] console [ttyS0] enabled [ 1.043397] loop: module loaded [ 1.047865] libphy: Fixed MDIO Bus: probed [ 1.052393] dwmac-sun8i 1c30000.ethernet: PTP uses main clock [ 1.058172] dwmac-sun8i 1c30000.ethernet: No regulator found [ 1.063943] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 148000 (expect 58000) [ 1.073351] dwmac-sun8i 1c30000.ethernet: Chain mode enabled [ 1.079004] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported [ 1.086231] dwmac-sun8i 1c30000.ethernet: Normal descriptors [ 1.091898] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported [ 1.099110] dwmac-sun8i 1c30000.ethernet: COE Type 2 [ 1.104083] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported [ 1.111000] libphy: stmmac: probed [ 1.114918] dwmac-sun8i 1c30000.ethernet: Found internal PHY node [ 1.121217] libphy: mdio_mux: probed [ 1.124810] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY [ 1.131184] dwmac-sun8i 1c30000.ethernet: Powering internal PHY [ 1.137846] libphy: mdio_mux: probed [ 1.141942] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 1.148463] ehci-platform: EHCI generic platform driver [ 1.153879] ehci-platform 1c1a000.usb: EHCI Host Controller [ 1.159470] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1 [ 1.167356] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000 [ 1.200929] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00 [ 1.207189] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 [ 1.213994] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.221219] usb usb1: Product: EHCI Host Controller [ 1.226091] usb usb1: Manufacturer: Linux 4.14.209 ehci_hcd [ 1.231670] usb usb1: SerialNumber: 1c1a000.usb [ 1.236589] hub 1-0:1.0: USB hub found [ 1.240371] hub 1-0:1.0: 1 port detected [ 1.244849] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 1.251068] ohci-platform: OHCI generic platform driver [ 1.256459] ohci-platform 1c1a400.usb: Generic Platform OHCI controller [ 1.263110] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2 [ 1.270957] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400 [ 1.345080] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001 [ 1.354246] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.361479] usb usb2: Product: Generic Platform OHCI controller [ 1.367392] usb usb2: Manufacturer: Linux 4.14.209 ohci_hcd [ 1.372970] usb usb2: SerialNumber: 1c1a400.usb [ 1.377862] hub 2-0:1.0: USB hub found [ 1.381657] hub 2-0:1.0: 1 port detected [ 1.386161] usbcore: registered new interface driver usb-storage [ 1.392410] mousedev: PS/2 mouse device common for all mice [ 1.398324] i2c /dev entries driver [ 1.402459] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0) [ 1.411641] sunxi-mmc 1c0f000.mmc: Got CD GPIO [ 1.470944] sunxi-mmc 1c0f000.mmc: base:0xe08c9000 irq:23 [ 1.481148] NET: Registered protocol family 10 [ 1.486658] Segment Routing with IPv6 [ 1.490381] NET: Registered protocol family 17 [ 1.494985] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this. [ 1.507970] can: controller area network core (rev 20170425 abi 9) [ 1.514269] NET: Registered protocol family 29 [ 1.518715] 8021q: 802.1Q VLAN Support v1.8 [ 1.520185] mmc0: host does not support reading read-only switch, assuming write-enable [ 1.523028] Registering SWP/SWPB emulation handler [ 1.535128] mmc0: new high speed SD card at address e624 [ 1.541597] mmcblk0: mmc0:e624 SU02G 1.84 GiB [ 1.542620] ehci-platform 1c1b000.usb: EHCI Host Controller [ 1.550783] mmcblk0: p1 p2 p3 [ 1.551674] ehci-platform 1c1b000.usb: new USB bus registered, assigned bus number 3 [ 1.562573] ehci-platform 1c1b000.usb: irq 28, io mem 0x01c1b000 [ 1.590919] ehci-platform 1c1b000.usb: USB 2.0 started, EHCI 1.00 [ 1.597187] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002 [ 1.603987] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.611211] usb usb3: Product: EHCI Host Controller [ 1.616083] usb usb3: Manufacturer: Linux 4.14.209 ehci_hcd [ 1.621660] usb usb3: SerialNumber: 1c1b000.usb [ 1.626599] hub 3-0:1.0: USB hub found [ 1.630380] hub 3-0:1.0: 1 port detected [ 1.635017] ohci-platform 1c1b400.usb: Generic Platform OHCI controller [ 1.641668] ohci-platform 1c1b400.usb: new USB bus registered, assigned bus number 4 [ 1.649521] ohci-platform 1c1b400.usb: irq 29, io mem 0x01c1b400 [ 1.725081] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001 [ 1.731886] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.739099] usb usb4: Product: Generic Platform OHCI controller [ 1.745029] usb usb4: Manufacturer: Linux 4.14.209 ohci_hcd [ 1.750595] usb usb4: SerialNumber: 1c1b400.usb [ 1.755515] hub 4-0:1.0: USB hub found [ 1.759295] hub 4-0:1.0: 1 port detected [ 1.764472] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq [ 2.040932] sunxi-mmc 1c10000.mmc: base:0xe08ec000 irq:24 [ 2.046402] hctosys: unable to open rtc device (rtc0) [ 2.051915] vcc3v0: disabling [ 2.054884] vcc5v0: disabling [ 2.057848] ALSA device list: [ 2.060811] No soundcards found. [ 2.060861] mmc1: new high speed SDIO card at address 0001 [ 2.076580] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: (null) [ 2.084128] VFS: Mounted root (ext4 filesystem) readonly on device 179:2. [ 2.093001] Freeing unused kernel memory: 2048K [ 2.154678] init: Console is alive [ 2.158264] init: - watchdog - [ 2.361121] random: fast init done [ 2.565592] kmodloader: loading kernel modules from /etc/modules-boot.d/* [ 2.586880] kmodloader: done loading kernel modules from /etc/modules-boot.d/* [ 2.594995] init: - preinit - [ 2.773287] random: jshn: uninitialized urandom read (4 bytes read) [ 2.811730] random: jshn: uninitialized urandom read (4 bytes read) [ 2.830024] random: jshn: uninitialized urandom read (4 bytes read) [ 2.889439] Generic PHY 0.1:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0.1:01, irq=POLL) [ 2.900305] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available [ 2.907984] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW [ 2.915843] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 5.997796] mount_root: mounting /dev/root [ 6.001556] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 6.003022] EXT4-fs (mmcblk0p2): warning: mounting unchecked fs, running e2fsck is recommended [ 6.010450] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 6.027263] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null) [ 6.145751] urandom-seed: Seeding with /etc/urandom.seed [ 6.190702] procd: - early - [ 6.194277] procd: - watchdog - [ 6.364729] urandom_read: 4 callbacks suppressed [ 6.364737] random: jshn: uninitialized urandom read (4 bytes read) [ 6.435126] random: jshn: uninitialized urandom read (4 bytes read) [ 6.499021] random: jshn: uninitialized urandom read (4 bytes read) [ 6.827996] procd: - watchdog - [ 6.831391] procd: - ubus - [ 6.885724] procd: - init - [ 7.187323] kmodloader: loading kernel modules from /etc/modules.d/* [ 7.197657] urngd: v1.0.2 started. [ 7.219194] NET: Registered protocol family 38 [ 7.242415] device-mapper: ioctl: 4.37.0-ioctl (2017-09-20) initialised: dm-devel@redhat.com [ 7.247361] random: crng init done [ 7.257250] ntfs: driver 2.1.32 [Flags: R/O MODULE]. [ 7.266502] NET: Registered protocol family 15 [ 7.272409] Initializing XFRM netlink socket [ 7.278975] tun: Universal TUN/TAP device driver, 1.6 [ 7.309471] gre: GRE over IPv4 demultiplexor driver [ 7.315702] ip_gre: GRE over IPv4 tunneling driver [ 7.325671] ip6_gre: GRE over IPv6 tunneling driver [ 7.340487] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 7.353126] Mirror/redirect action on [ 7.363026] u32 classifier [ 7.365757] input device check on [ 7.369443] Actions configured [ 7.383419] nf_conntrack version 0.5.0 (8192 buckets, 32768 max) [ 7.427427] Bridge firewalling registered [ 7.432743] Loading modules backported from Linux version v4.19.137-0-gc076c79e03c6 [ 7.440419] Backport generated by backports.git v4.19.137-1-0-g60c3a249 [ 7.449300] ip_tables: (C) 2000-2006 Netfilter Core Team [ 7.558324] Netfilter messages via NETLINK v0.30. [ 7.568531] wireguard: WireGuard 1.0.20200611 loaded. See www.wireguard.com for information. [ 7.577513] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. [ 7.617146] xt_time: kernel timezone is -0000 [ 7.678639] ctnetlink v0.93: registering with nfnetlink. [ 7.692385] nf_tables: (c) 2007-2009 Patrick McHardy <kaber@trash.net> [ 7.719833] PPP generic driver version 2.4.2 [ 7.725762] NET: Registered protocol family 24 [ 7.751876] usbcore: registered new interface driver rt2800usb [ 7.758028] kmodloader: done loading kernel modules from /etc/modules.d/* [ 10.702139] Generic PHY 0.1:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0.1:01, irq=POLL) [ 10.713199] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available [ 10.720961] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW [ 10.727882] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 10.737450] br-lan: port 1(eth0.111) entered blocking state [ 10.743280] br-lan: port 1(eth0.111) entered disabled state [ 10.749369] device eth0.111 entered promiscuous mode [ 10.754495] device eth0 entered promiscuous mode [ 10.761427] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready [ 10.838577] IPv6: ADDRCONF(NETDEV_UP): eth0.666: link is not ready [ 10.850833] IPv6: ADDRCONF(NETDEV_UP): eth0.999: link is not ready [ 11.054724] br-lan: port 2(vxlan0) entered blocking state [ 11.061555] br-lan: port 2(vxlan0) entered disabled state [ 11.068242] device vxlan0 entered promiscuous mode [ 11.074359] br-lan: port 2(vxlan0) entered blocking state [ 11.079813] br-lan: port 2(vxlan0) entered forwarding state [ 11.128490] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready [ 12.801589] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx [ 12.810166] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 12.817550] br-lan: port 1(eth0.111) entered blocking state [ 12.823214] br-lan: port 1(eth0.111) entered forwarding state [ 12.830242] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.666: link becomes ready [ 12.837853] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.999: link becomes ready [ 13.173942] pppoe-wan: renamed from ppp0 [ 13.529989] xt_CT: No such helper "netbios-ns" [ 13.681391] xt_CT: No such helper "sane" [ 13.755089] xt_CT: No such helper "sane-0" [ 14.056347] xt_CT: No such helper "netbios-ns" [ 14.137165] xt_CT: No such helper "sane" [ 14.172282] xt_CT: No such helper "sane-0"
LANポートが一つしかないのでVLANを使いました。
レイアウト図です。
vlan111 vlan999 LAN --------| Openwrt router |-------- Wan | | eth0.111 | | eth0.999 | | | Orange Pi zero |
VLANの設定はダッシュボードではなく/etc/config/network
を編集します。
config interface 'lan' option type 'bridge' option ifname 'eth0.111' option proto 'static' option ip6assign '60' list dns '8.8.8.8' list dns '1.1.1.1' list ipaddr '192.168.1.1/26' config interface 'wan' option ifname 'eth0.999' option proto 'pppoe' option password '****************' option ipv6 'auto' option username '******.******.ne.jp'
OpenWrtのダッシュボードの設定からShorewallに変えてみるとさすがにシンプルで設定が楽です。ダッシュボードだと複雑な設定にすると乱雑になりすぎて間違いやすく、結果やはり変えてよかった思いました。
Post-installation
luci-firewallのアンインストール
opkg remove --force-depends luci-app-firewall
shorewallを有効にする
/etc/shorewall/shorewall.conf: STARTUP_ENABLED=Yes
/etc/init.d/firewwall disable
/etc/init.d/shorewall enable
/etc/init.d/shorewall start or reload
参考
- https://linux-sunxi.org/Xunlong_Orange_Pi_Zero#Compatibility