Archive

Last modified by Yu Pang Law on 2022/12/14 10:31

Blog - posts for January 2023

Jan 24 2023

Compiling Custom Kernel

  1. Update FreeBSD to latest patch
    freebsd-update fetch
    freebsd-update install
  2. Install git
    pkg install git
  3. Updating source file
    git clone -o freebsd https://git.FreeBSD.org/src.git /usr/src
    cd /usr/src
    git checkout stable/13
  4. prepare custom kernel file
    mkdir /root/kernels
    cd /usr/src/sys/amd64/conf
    cp GENERIC /root/kernels/MYKERNEL
    ln -s /root/kernels/MYKERNEL

    depends on your CPU architecture, config file location may be different. For usual, Intel/AMD CPU, it will be amd64

  5. add/remove options in the MYKERNEL file
  6. Compile and install MYKERNEL, then reboot
    cd /usr/src
    make buildkernel KERNCONF=MYKERNEL
    make installkernel KERNCONF=MYKERNEL
    reboot
  7. Check if MYKERNEL is installed correctly
    uname -a
    If correct, it should show MYKERNEL

Jan 02 2023

Configuring Unbound for whole network

  1. Install and config unbound as usual. For basic, remote set up check unbound remote resolver setup
  2. Install bgpq4
  3. Generate prefix list filter for your AS or AS SET
    bgpq4 -4A -h whois.radb.net -F 'access-control: %n/%l allow\n' AS-SET > /usr/local/etc/unbound/prefix.txt
  4. Edit unbound.conf, under server:, add
    include: /usr/local/etc/unbound/prefix.txt
  5. Set up cron job to update prefix list and restart unbound periodically
Tags:
Created by Yu Pang Law on 2005/01/28 23:50
 
Copyrighted by Pangnet.net