netbsd packages - binaries

Initial setup

cp ~/.profile ~/.profile.dist
chmod u+w ~/.profile
vi ~/.profile

export PKG_PATH="http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r|cut -f '1 2' -d.|cut -f 1 -d_)/All"

. ~/.profile
echo $PKG_PATH/

Casual system

pkg_add curl
pkg_add wget
pkg_add git
pkg_add screen
pkg_add ca-certificates
mv -i /usr/pkg/etc/ca-certificates-dir.conf /usr/pkg/etc/ca-certificates-dir.conf.dist
echo ETCCERTSDIR=/etc/openssl/certs > /usr/pkg/etc/ca-certificates-dir.conf
update-ca-certificates
pkg_add mozilla-rootcerts
pkg_add mozilla-rootcerts-openssl

ls -alhF /etc/openssl/certs/

Router / Gateway

    pkg_add \
            alpine \
            iftop \
            iperf3 \
            netcat \
            nmap \
            trafshow

            #tmux \
            #dsniff-nox11 \

as of today Apr 2019 glib2 dep is missing for dsniff

    cp -i /usr/share/examples/openssl/openssl.cnf /etc/openssl
    ll /etc/openssl/certs/
    mozilla-rootcerts install
    ll /etc/openssl/certs/ca-certificates.crt
    curl -I https://os3.su/

Server environment

    pkg_add \
            e2fsprogs \
            lftp \
            lynx \
            mc \
            pwgen

            #vim \

Additional notes

python

    echo $PKG_PATH
    pkg_add python38
    pkg_add py38-setuptools
    pkg_add py38-pip
    pkg_add py38-curses
    pkg_add py38-cursespanel
    cd /usr/pkg/bin/
    ln -s python3.8 python
    ln -s pip3.8 pip

daily audits

    ls -lhF /usr/pkg/etc/audit-packages.conf # no exist
ls -lhF ls -lhF /usr/pkg/pkgdb/pkg-vulnerabilities # no exist

    mkdir -p /usr/pkg/etc/
echo 'VUL_SOURCE="ftp://ftp.fr.netbsd.org/pub/NetBSD/packages/distfiles/pkg-vulnerabilities"' > /usr/pkg/etc/audit-packages.conf

    /usr/sbin/pkg_admin fetch-pkg-vulnerabilities -u -s
    /usr/sbin/pkg_admin check-pkg-vulnerabilities /usr/pkg/pkgdb/pkg-vulnerabilities

    /usr/sbin/pkg_admin audit

# gnu/linux
    #/usr/pkg/sbin/pkg_admin

    grep run_security /etc/defaults/daily.conf
    grep vulnerabilities /etc/daily.conf # empty
    vi /etc/daily.conf

    fetch_pkg_vulnerabilities=YES
    check_pkg_vulnerabilities=YES

and eventually

crontab -e

    20 3 * * * /usr/sbin/pkg_admin audit

Resources

daily audits

Security and NetBSD http://www.netbsd.org/support/security/

5.1.5. Checking for security vulnerabilities in installed packages https://www.netbsd.org/docs/pkgsrc/using.html#vulnerabilities


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun