Ipfire headless configuration

I installed IPfire when I had access to a full screen monitor and keyboard / mouse. Now I’m trying to figure out if I can installed ipfire without a keyboard / mouse, because I’ll travel a lot with it.

I plan to install Ipfire on my RPi and use it as a router / firewall.

To customize the different zones, to install the necessary IPS / IDS tools, for VPNs, to make the correct wpa_supplicant conf, I need to have ssh access to ipfire from my ethernet port.

In RPi, this is simply creating an empty ssh file in the boot dir.

Is ssh daemon started when ipfire is booted?

If I connect an Ethernet cable to RPi, will I be able to connect to ipfire via ssh? Or is there a web interface that I can connect to at startup?

This might help get you started…

with SSH:
https://wiki.ipfire.org/configuration/system/ssh

with the web interface:
https://wiki.ipfire.org/configuration

via this address on the green network:
https://ipfire:444/cgi-bin/index.cgi

2 Likes

good suggestion. :fist_left: :+1:

@arne_f, @jon

as I mentioned, I try to configure the distribution, so that I can configure the server directly by editing the img file.

To do this, I look at ‘/etc/rc.d/*’ directory. I found several services to be purchased during the launch. Because I’m running it at a headless server, the only way to check if services are being reinforced is by checking the logs.

When I checked the logs, unfortunately there was nothing to suggest that all the services were purchased. Here are the logs:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.184-ipfire-multi (root@arm64-02.dub.ipfire.org) (gcc version 9.3.0 (GCC)) #1 SMP Tue Jul 14 12:40:26 GMT 2020
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    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: Raspberry Pi 3 Model B+
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 8 MiB at 0x3d800000
[    0.000000] On node 0 totalpages: 255488
[    0.000000] free_area_init_node: node 0, pgdat c11f9840, node_mem_map ef72f000
[    0.000000]   Normal zone: 1728 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 196608 pages, LIFO batch:31
[    0.000000]   HighMem zone: 58880 pages, LIFO batch:15
[    0.000000] random: get_random_bytes called from start_kernel+0xb0/0x55c with crng_init=0
[    0.000000] percpu: Embedded 16 pages/cpu s35532 r8192 d21812 u65536
[    0.000000] pcpu-alloc: s35532 r8192 d21812 u65536 alloc=16*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 253760
[    0.000000] Kernel command line: console=ttyS1,115200n8 root=UUID=5a248f13-4c7a-4925-8e73-3401f601f6f4 rootwait
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 978784K/1021952K available (9216K kernel code, 1165K rwdata, 3476K rodata, 2048K init, 442K bss, 34976K reserved, 8192K cma-reserved, 227328K highmem)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
                   lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
                   pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                   modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                     .text : 0xc0008000 - 0xc0a00000   (10208 kB)
                     .init : 0xc0f00000 - 0xc1100000   (2048 kB)
                     .data : 0xc1100000 - 0xc12237d4   (1166 kB)
                      .bss : 0xc122b6c0 - 0xc129a150   ( 443 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 32678 entries in 96 pages
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    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.000012] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.000031] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.000084] bcm2835: system timer (irq = 33)
[    0.001522] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.001538] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.001556] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.001568] Switching to timer-based delay loop, resolution 52ns
[    0.001887] Console: colour dummy device 80x30
[    0.001934] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.001950] pid_max: default: 32768 minimum: 301
[    0.002189] Security Framework initialized
[    0.002274] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.002290] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.003230] CPU: Testing write buffer coherency: ok
[    0.003670] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.004083] Setting up static identity map for 0x100000 - 0x100078
[    0.004767] Hierarchical SRCU implementation.
[    0.008987] smp: Bringing up secondary CPUs ...
[    0.009677] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.010521] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.011251] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.011385] smp: Brought up 1 node, 4 CPUs
[    0.011401] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.011407] CPU: All CPU(s) started in HYP mode.
[    0.011412] CPU: Virtualization extensions available.
[    0.012844] devtmpfs: initialized
[    0.019158] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.019425] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.019448] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.020177] pinctrl core: initialized pinctrl subsystem
[    0.021334] NET: Registered protocol family 16
[    0.025269] DMA: preallocated 2048 KiB pool for atomic coherent allocations
[    0.028914] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.028923] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.029748] Serial: AMBA PL011 UART driver
[    0.032488] uart-pl011 3f201000.serial: could not find pctldev for node /soc/gpio@7e200000/uart0_gpio32, deferring probe
[    0.048248] vgaarb: loaded
[    0.048837] SCSI subsystem initialized
[    0.049019] libata version 3.00 loaded.
[    0.049244] usbcore: registered new interface driver usbfs
[    0.049295] usbcore: registered new interface driver hub
[    0.049384] usbcore: registered new device driver usb
[    0.049561] usb_phy_generic phy: phy supply vcc not found, using dummy regulator
[    0.051665] clocksource: Switched to clocksource arch_sys_counter
[    0.099067] VFS: Disk quotas dquot_6.6.0
[    0.099171] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.099555] simple-framebuffer 3eef1000.framebuffer: framebuffer at 0x3eef1000, 0x10a800 bytes, mapped to 0xf0a80000
[    0.099568] simple-framebuffer 3eef1000.framebuffer: format=a8r8g8b8, mode=656x416x32, linelength=2624
[    0.106919] Console: switching to colour frame buffer device 82x26
[    0.112887] simple-framebuffer 3eef1000.framebuffer: fb0: simplefb registered!
[    0.122108] NET: Registered protocol family 2
[    0.122794] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.122920] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.123106] TCP: Hash tables configured (established 8192 bind 8192)
[    0.123246] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.123294] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.123540] NET: Registered protocol family 1
[    0.123579] PCI: CLS 0 bytes, default 64
[    0.124176] Trying to unpack rootfs image as initramfs...
[    3.575105] Freeing initrd memory: 6804K
[    3.577185] Initialise system trusted keyrings
[    3.577419] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    7.608926] NET: Registered protocol family 38
[    7.608951] Key type asymmetric registered
[    7.608962] Asymmetric key parser 'x509' registered
[    7.609055] bounce: pool size: 64 pages
[    7.609155] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    7.609318] io scheduler noop registered
[    7.609328] io scheduler deadline registered
[    7.609527] io scheduler cfq registered (default)
[    7.609538] io scheduler mq-deadline registered
[    7.609547] io scheduler kyber registered
[    7.609829] io scheduler bfq registered
[    7.623491] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    7.625086] console [ttyS1] disabled
[    7.625127] 3f215040.serial: ttyS1 at MMIO 0x0 (irq = 59, base_baud = 31250000) is a 16550
[    8.141841] console [ttyS1] enabled
[    8.144980] Serial: AMBA driver
[    8.148118] Non-volatile memory driver v1.3
[    8.151715] bcm2835-rng 3f104000.rng: hwrng registered
[    8.166128] brd: module loaded
[    8.177059] loop: module loaded
[    8.180831] libphy: Fixed MDIO Bus: probed
[    8.185010] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.190322] ehci-pci: EHCI PCI platform driver
[    8.193589] ehci-platform: EHCI generic platform driver
[    8.197710] ehci-omap: OMAP-EHCI Host Controller driver
[    8.201795] ehci-orion: EHCI orion driver
[    8.204647] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    8.209602] ohci-pci: OHCI PCI platform driver
[    8.212842] ohci-platform: OHCI generic platform driver
[    8.216948] uhci_hcd: USB Universal Host Controller Interface driver
[    8.222583] usbcore: registered new interface driver usb-storage
[    8.227547] mousedev: PS/2 mouse device common for all mice
[    8.233421] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[    8.245203] device-mapper: uevent: version 1.0.3
[    8.248888] device-mapper: ioctl: 4.37.0-ioctl (2017-09-20) initialised: dm-devel@redhat.com
[    8.257453] sdhci: Secure Digital Host Controller Interface driver
[    8.262418] sdhci: Copyright(c) Pierre Ossman
[    8.401700] sdhost-bcm2835 3f202000.mmc: loaded - DMA enabled (>1)
[    8.406750] sdhci-pltfm: SDHCI platform and OF driver helper
[    8.471690] mmc1: SDHCI controller on 3f300000.sdhci [3f300000.sdhci] using PIO
[    8.478741] ledtrig-cpu: registered to indicate activity on CPUs
[    8.484277] hidraw: raw HID events driver (C) Jiri Kosina
[    8.488998] usbcore: registered new interface driver usbhid
[    8.493411] usbhid: USB HID core driver
[    8.496276] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    8.501300] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[    8.506869] ip_tables: (C) 2000-2006 Netfilter Core Team
[    8.510940] Initializing XFRM netlink socket
[    8.514732] NET: Registered protocol family 10
[    8.526642] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    8.532730] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    8.532914] Segment Routing with IPv6
[    8.538692] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    8.539496] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    8.547327] mmc0: host does not support reading read-only switch, assuming write-enable
[    8.547895] NET: Registered protocol family 17
[    8.556369] mmc0: new high speed SDHC card at address 0001
[    8.557838] Bridge firewalling registered
[    8.562627] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    8.564763] Key type dns_resolver registered
[    8.569042] mmcblk0: mmc0:0001 BB1QT 29.8 GiB 
[    8.572117] Registering SWP/SWPB emulation handler
[    8.579376] registered taskstats version 1
[    8.580203]  mmcblk0: p1 p2 p3
[    8.582234] Loading compiled-in X.509 certificates
[    8.605813] Loaded X.509 cert 'IPFire.org: Build time autogenerated kernel key: 00e3185d722bb695657c0e0ecdc6759801dc58cb'
[    8.619513] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[    8.630238] raspberrypi-firmware soc:firmware: Attached to firmware from 2018-03-16 16:18
[    8.638288] OF: /soc/usb@7e980000: could not get #phy-cells for /phy
[    8.643266] random: fast init done
[    8.643479] dwc2 3f980000.usb: 3f980000.usb supply vusb_d not found, using dummy regulator
[    8.649290] mmc1: new high speed SDIO card at address 0001
[    8.652678] dwc2 3f980000.usb: 3f980000.usb supply vusb_a not found, using dummy regulator
[    8.714877] dwc2 3f980000.usb: DWC OTG Controller
[    8.718349] dwc2 3f980000.usb: new USB bus registered, assigned bus number 1
[    8.724231] dwc2 3f980000.usb: irq 39, io mem 0x3f980000
[    8.728576] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    8.734172] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.740176] usb usb1: Product: DWC OTG Controller
[    8.743642] usb usb1: Manufacturer: Linux 4.14.184-ipfire-multi dwc2_hsotg
[    8.749293] usb usb1: SerialNumber: 3f980000.usb
[    8.753277] hub 1-0:1.0: USB hub found
[    8.755795] hub 1-0:1.0: 1 port detected
[    8.760411] hctosys: unable to open rtc device (rtc0)
[    8.764239] sr_init: No PMIC hook to init smartreflex
[    8.768131] sr_init: platform driver register failed for SR
[    8.772591] OF: fdt: not creating '/sys/firmware/fdt': CRC check failed
[    8.799272] Freeing unused kernel memory: 2048K
[    9.201772] usb 1-1: new high-speed USB device number 2 using dwc2
[    9.265416] dracut: dracut-038
[    9.452070] usb 1-1: New USB device found, idVendor=0424, idProduct=2514
[    9.457575] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    9.464394] hub 1-1:1.0: USB hub found
[    9.467018] hub 1-1:1.0: 4 ports detected
[    9.775624] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    9.781745] usb 1-1.1: new high-speed USB device number 3 using dwc2
[    9.781770] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    9.792972] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    9.806368] udevd[215]: starting eudev-3.2.6
[    9.912344] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514
[    9.918009] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    9.926547] hub 1-1.1:1.0: USB hub found
[    9.929486] hub 1-1.1:1.0: 3 ports detected
[   10.616719] EXT4-fs (mmcblk0p3): mounted filesystem without journal. Opts: (null)
[   10.651755] usb 1-1.1.1: new high-speed USB device number 4 using dwc2
[   10.782398] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800
[   10.788244] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   10.892256] dracut: Checking ext4: /dev/disk/by-uuid/5a248f13-4c7a-4925-8e73-3401f601f6f4
[   10.900475] dracut: issuing e2fsck -a  /dev/disk/by-uuid/5a248f13-4c7a-4925-8e73-3401f601f6f4
[   10.929239] dracut: /dev/disk/by-uuid/5a248f13-4c7a-4925-8e73-3401f601f6f4: clean, 22381/91776 files, 313471/366848 blocks
[   10.952815] dracut: Mounting /dev/disk/by-uuid/5a248f13-4c7a-4925-8e73-3401f601f6f4 with -o defaults
[   10.981255] EXT4-fs (mmcblk0p3): mounted filesystem without journal. Opts: (null)
[   11.069128] dracut: Mounted root filesystem /dev/mmcblk0p3
[   11.401174] dracut: Switching root
[   11.613995] random: crng init done
[   11.616126] random: 2 urandom warning(s) missed due to ratelimiting
[   12.909732] udevd[466]: specified group 'input' unknown
[   12.910113] udevd[466]: specified group 'render' unknown
[   12.911178] udevd[466]: specified group 'kvm' unknown
[   12.949705] udevd[467]: starting eudev-3.2.6
[   13.118185] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[   13.120190] i2c-bcm2835 3f805000.i2c: Could not read clock-frequency property
[   13.469771] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): No External EEPROM. Setting MAC Speed
[   13.471353] libphy: lan78xx-mdiobus: probed
[   13.623815] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): No phy led trigger registered for speed(-1)
[   13.639286] usbcore: registered new interface driver lan78xx
[   13.858541] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43455-sdio.bin for chip 0x004345(17221) rev 0x000006
[   13.859662] usbcore: registered new interface driver brcmfmac
[   14.044208] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Feb 27 2018 03:15:32 version 7.45.154 (r684107 CY) FWID 01-4fbe0b04
[   15.458962] EXT4-fs (mmcblk0p3): re-mounted. Opts: (null)
[   15.941644] EXT4-fs (mmcblk0p3): re-mounted. Opts: (null)
[   16.498513] EXT4-fs (mmcblk0p3): resizing filesystem from 366848 to 7782400 blocks
[   17.076158] EXT4-fs (mmcblk0p3): resized filesystem to 7782400

This means that the only way for ipfire configuration is using the default gui installation method?

I saw the installation process here: https://www.youtube.com/watch?v=0uj733zwku8
It seems that there are several steps that select file system, for network configuration, dhcp client configuration. Only after all these things have been completed, the services have started.

What file(s) does the intial configuration of ipfire?

it’s possible to skip all these configurations and bring up the service, much like RPi does. Then I get all the configuration, via cli(ssh)?