Table of Contents

Shell

It is based on FreeBSD

OPNSense custom

pkg update
 
 
pkg upgrade
pkg upgrade dnsmasq
 
opnsense-update

shell menu

# opnsense-shell
 
  0) Logout                              7) Ping host
  1) Assign interfaces                   8) Shell
  2) Set interface IP address            9) pfTop
  3) Reset the root password            10) Firewall log
  4) Reset to factory defaults          11) Reload all services
  5) Power off system                   12) Update from console
  6) Reboot system                      13) Restore a backup

webgui

/usr/local/etc/rc.restart_webgui
/var/etc/cert.pem
cat /var/etc/lighty-webConfigurator.conf
 
# Reinitialize circular log file (clog) after size change in webui:
/usr/local/opnsense/scripts/systemhealth/clearlog -m core -f dhcpd

firewall

ipfw -a list
pftop
 
pfctl -vvsr
 
# Routing table
netstat -nr

network interfaces

ifconfig nic0 media 1000baseTX

hardware related

pciconf -l -v

cdrom

camcontrol devlist
mkdir /media/cdrom
mount_cd9660 /dev/cd0 /media/cdrom

benchmark

# seek time and transfer rates benchmark
diskinfo -tv /dev/cd0

networking

sockstat -4 -l

system / ps

# top with command line names
top -a
 
swapinfo
 
pkg install sysinfo
sysinfo mem
sysinfo storage
 
iostat -x 1
 
mount -t procfs proc /proc
 
$ fetch https://raw.githubusercontent.com/ocochard/myscripts/master/FreeBSD/freebsd-memory.sh
## or use curl command ##
## $ curl -O https://raw.githubusercontent.com/ocochard/myscripts/master/FreeBSD/freebsd-memory.sh
$ sh freebsd-memory.sh
 
# Check who is performing huge disk IO: run top and switch to 'm'