FreeBSD
# find /opt -name .DS_Store -print -delete
# shutdown -p 2509151100 Shutdown at Mon Sep 15 11:00:00 2025.
weekly_certbot_enable="YES"
/usr/local/etc/periodic/weekly/500.certbot-3.8
# certbot certonly --webroot -w /usr/local/www/apache24/data -d dataz.dyndns.info Successfully received certificate. Certificate is saved at: /usr/local/etc/letsencrypt/live/dataz.dyndns.info/fullchain.pem Key is saved at: /usr/local/etc/letsencrypt/live/dataz.dyndns.info/privkey.pem
# certbot certonly --webroot -w /usr/local/www/apache24/data -d dataz.dyndns.info --key-type rsa
pkg install coreutils
find mora -mtime -365 -type f -print0 | xargs -0 gcp --parents -t /home/hasebe/mora
# pkg install gcc php80-session # cd /usr/ports/www/mod_php80 # sh # export CC=/usr/local/bin/gcc # make install clean # pkg lock mod_php80 # pkg info -D mod_php80
# pkg delete mod_php80 php80-session php80 # pkg install php81-session
php_fpm_enable="YES"
listen = 127.0.0.1:9000
LoadModule proxy_module libexec/apache24/mod_proxy.so LoadModule proxy_fcgi_module libexec/apache24/mod_proxy_fcgi.so <FilesMatch "\.php$"> SetHandler proxy:fcgi://127.0.0.1:9000 </FilesMatch>
# /usr/local/etc/rc.d/php-fpm start # apachectl gfraceful
# cd /usr/ports/converters/libiconv/ # make config [x] ENCODINGS [x] PATCHES
# ce /usr/ports/net/rsync/ # make config [x] ICONV (*) FLAGS
pkg lock rsync pkg lock libiconv
# vpnserver/vpnserver start # vpncmd/vpncmd
> ServerPasswordSet > UserCreate > UserPasswordSet > BridgeCreate > IPsecEnable
To run softether vpn client from startup, add softether_client_enable="YES" in your rc.conf. To run softether vpn server from startup, add softether_server_enable="YES" in your rc.conf. To run softether vpn bridge from startup, add softether_bridge_enable="YES" in your rc.conf. Initial and further configuration of all softether services can be done either by using a Windows client to connect to the running services or by vpncmd from command line. Please note client and bridge functionality is not fully supported on FreeBSD right now. When removing SoftEther VPN without the desire to reinstall, please ensure to remove the directory /var/db/softether as well.
#samba_enable="YES" samba_server_enable="YES"
# cp /usr/local/etc/smb.conf /usr/local/etc/smb4.conf
# /usr/local/etc/rc.d/samba_server start # /usr/local/etc/rc.d/samba_server stop
# cp /usr/local/etc/samba/* /var/db/samba4/private
# pkg install py39-wsdd
wsdd_enable="YES"
hw.vga.textmode=0 kern.vty=vt
# vidcontrol -i mode
# vidcontrol MODE_291
allscreens_flags="MODE_291"
# cd /usr/ports/devel/dbus # make config - X11 # make install clean
# cd /usr/ports/net/avahi # make config - AUTOIPD - GTK # make install clean # vi /usr/local/etc/avahi/avahi-daemon.conf host-name domain-name # vi /etc/nsswitch.conf hosts: files mdns dns
# portmaster dns/nss_mdns
escape ^T^T vbell off startup_message off defscrollback 1000 defhstatus "^En:^Et"
| shortcut | command |
|---|---|
| c-t S | split |
| c-t TAB | switch between split screens |
| c-t X | remove |
| c-t c-[ | copy |
| c-t c-] | paste |
| SPACE | set start and end point in copy mode |
export PS1='\h\$ '
(setq inhibit-startup-message t) (setq display-time-24hr-format t) (display-time) (setq column-number-mode t) (global-set-key "\M-g" 'goto-line) (set-input-mode nil nil t) ;// -nwのときaltをmetaに ;(tool-bar-mode 0) ; // -nwのときエラーになる todo
pf_enable="YES" gateway_enable="YES"
ext_if="xl0" int_if="fxp0" internal_net="192.168.0.0/24"
scrub in all scrub out all random-id max-mss 1414
nat on $ext_if from $internal_net to any -> ($ext_if)
rdr on $ext_if proto tcp from any to port 1234 -> $gbx port 1234
rdr-anchor "miniupnpd" anchor "miniupnpd" pass out on $int_if from any to 239.0.0.0/8 keep state pass in on $int_if from any to 239.0.0.0/8 keep state
block on $ext_if proto {tcp, udp} from any to any port {137, 138, 139, 445}startup:
default:
load pppoe_client
pppoe_client:
create bundle static B1
set iface route default
set iface enable tcpmssfix
create link static L1 pppoe
set link action bundle B1
set link no acfcomp protocomp
set link disable pap
set link accept chap
set link max-redial 0
set link mtu 1454
set link mru 1454
set link keep-alive 10 60
set auth authname xxx
set ipcp yes vjcomp
set ipcp ranges 0.0.0.0/0 0.0.0.0/0
set pppoe iface fxp0
set pppoe service ""
openifconfig wlan0 create wlandev ath0 mode 11a country J5 wpa_supplicant -B -Dbsd -iwlan0 -c/etc/wpa_supplicant.conf sleep 4 dhclient wlan0
または
wlans_ath0="wlan0" ifconfig_wlan0="WPA DHCP" ifconfig_wlan0_ipv6="inet6 accept_rtadv"
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="AirPort5"
psk="1234123412345"
}# ifconfig wlan0 create wlandev ath0 wlanmode hostap mode 11na country J5 # ifconfig bridge0 create addm wlan0 addm fxp0 up
nterface=wlan0 driver=bsd ctrl_interface=/var/run/hostapd ctrl_interface_group=wheel ssid=aaa country_code=JP #ieee80211d=1 hw_mode=a #channel=13 auth_algs=1 #wme_enabled=1 wpa=2 wpa_passphrase=1111111111111 wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP
create_args_wlan0="wlanmode hostap mode 11na country J5" wlans_ath0="wlan0" ifconfig_wlan0="channel 3:ht/40" hostapd_enable="YES" cloned_interfaces="bridge0" ifconfig_bridge0="addm wlan0 addm fxp0 up"
# ifconfig wlan0 create wlandev ath0 wlanmode monitor mode 11a country J5
# ifconfig wlan0 channel 36 # tcpdump -i wlan0 -y IEEE802_11_RADIO -e # tcpdump -i wlan0 -I -e
if_bridge_load="YES" if_tap_load="YES
options {
port 5000; # Listen on this port.
bindaddr { iface vr0; };
# Syslog facility
syslog daemon;
# Path to various programs
ppp /usr/sbin/pppd;
ifconfig /sbin/ifconfig;
route /sbin/route;
firewall /sbin/ipchains;
ip /sbin/ip;
}
# Default session options
default {
compress no; # Compression is off by default
speed 0; # By default maximum speed, NO shaping
}
# Ethernet example. Session 'lion'.
lion {
passwd aaaaaa; # Password
type ether; # Ethernet tunnel
device tap0; # Device tap0
proto udp; # UDP protocol
compress lzo:1; # LZO compression level 1
encrypt yes; # Encryption
stat yes; # Log connection statistic
keepalive yes; # Keep connection alive
up {
ifconfig "%% 192.168.0.2 netmask 0xffffff00";
ifconfig "bridge0 create";
ifconfig "bridge0 addm tap0 addm fxp0 up";
};
down {
ifconfig "bridge0 deletem tap0 deletem fxp0";
ifconfig "bridge0 down destroy";
ifconfig "%% delete down";
};
}options {
port 5000; # Connect to this port.
timeout 60; # General timeout
# Path to various programs
ppp /usr/sbin/pppd;
ifconfig /sbin/ifconfig;
route /sbin/route;
firewall /sbin/ipchains;
ip /sbin/ip;
}
# Ethernet example. Session 'lion'.
lion {
passwd aaaaaa; # Password
type ether; # Ethernet tunnel
device tap0; # Device tap1
up {
ifconfig "%% 192.168.100.253 netmask 0xffffff00";
ifconfig "bridge0 create";
ifconfig "bridge0 addm tap0 addm fxp0 up";
};
down {
ifconfig "bridge0 deletem tap0 deletem fxp0";
ifconfig "bridge0 destroy";
ifconfig "%% delete down";
};#!/bin/sh mixer =rec line rec 25 wavrec -s 48000 -M -t 900 RJ-`date "+%Y-%m-%d"`.wav