Skip to content

Instantly share code, notes, and snippets.

/certificate
add name=ovpn-local-ca common-name="ovpn_local_ca" key-size=4096 days-valid=3650 key-usage=crl-sign,key-cert-sign
sign ovpn_local_ca ca-crl-host=127.0.0.1 name="ovpn_local_ca"
add name=ovpn_local_server common-name="ovpn_local_server" key-size=4096 days-valid=3650 key-usage=digital-signature,key-encipherment,tls-server
sign ovpn_local_server ca="ovpn_local_ca" name="ovpn_local_server"
add name=ovpn_local_client common-name="ovpn_local_client" key-size=4096 days-valid=3650 key-usage=tls-client
sign ovpn_local_client ca="ovpn-local-ca" name="ovpn_local_client"
/certificate
add name=local_ca common-name=local_ca days-valid=3650 key-size=4096 key-usage=key-cert-sign,crl-sign
sign local_ca
add name=local common-name=local days-valid=3650 key-size=4096 key-usage=tls-server
sign ca=local_ca local
set trusted=yes local_ca
set trusted=yes local
// Method 1
sudo nano /etc/modprobe.d/raspi-blacklist.conf
#wifi
blacklist brcmfmac
blacklist brcmutil
#bt
blacklist btbcm
blacklist hci_uart
offers.left_rail_offer_enabled/left_rail_offer
gui.show_plus_upsell
offers.sponsored_torrent_offer_enabled/sponsored_torrent_offer_enabled
bt.enable_pulse
gui.show_notorrents_node
offers.content_offer_autoexec
sudo fallocate -l 1G /swap
sudo chmod 600 /swap
sudo mkswap /swap
sudo swapon /swap
sudo nano /etc/fstab
/swapfile none swap sw 0 0
sudo nano /etc/sysctl.conf
# Please note this no longer works because APIv1 has been deprecated.
:global WANInterface "pppoe-out1"
:local CFdomain ""
:local CFzone ""
:local CFemail ""
:local CFtkn ""
:local CFid ""
:local CFrecordType "A"
:local CFserviceMode "0"
// Install Dot.Net FX 3.5 from ISO
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:D:\sources\sxs
// Win7 Startup Repair
# Enable:
bcdedit /set {default} bootstatuspolicy ignoreallfailures
# Disable
bcdedit /set {default} bootstatuspolicy displayallfailures
// Add super user permissions to user
visudo
%admin ALL=(ALL) NOPASSWD: ALL
groupadd admin
usermod -aG admin username
// Remove group from user
gpasswd -d username group
// Remove password from user
/ipv6 firewall filter
add action=accept chain=input comment="allow ICMPv6" disabled=no protocol=icmpv6
add action=accept chain=input comment="accept established connections" connection-state=established disabled=no
add action=accept chain=input comment="accept related connections" connection-state=related disabled=no
add action=drop chain=input comment="drop invalid connections" connection-state=invalid disabled=no
add action=accept chain=input comment="uDP" disabled=no protocol=udp
add action=accept chain=input comment="from wlan" disabled=no in-interface=wlan
add action=accept chain=input comment="from LAN" disabled=no in-interface=lan
add action=accept chain=input comment="from Hotspot" disabled=no in-interface=wlan-Public
add action=log chain=input comment="log everything else" disabled=yes log-prefix="IPV6 INPUT DROP"
# Add User
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
# Grant Privilege
GRANT ALL PRIVILEGES ON * . * TO 'user'@'localhost' WITH GRANT OPTION;