1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | dmidecode | awk ' BEGIN { printf "{" first_entry = 0 is_array = 0 array_first_entry = 0 } { if ($0 ~ /^Handle/) { if (is_array) { printf "]" is_array = 0 } if (first_entry) { printf "}," } first_entry = 1 gsub(/,$/, "" , $2); printf "\"%s\": {" , $2 getline line printf "\"_description\": \"%s\"" , line gsub(/,$/, "" , $5); printf ",\"_type\": \"%s\"" , $5 gsub(/,$/, "" , $6); printf ",\"_bytes\": \"%s\"" , $6 } else if ($0 ~ /:/) { if (is_array) { printf "]" is_array = 0 } gsub(/^[[:space:]]+/, "" , $0) split ($0, a, ": " ); if (length(a) > 1) { gsub(/ "/, " \\\ "" , a[2]) gsub(/[[:space:]]+$/, "" , a[2]) printf ",\"%s\": \"%s\"" , a[1], a[2] } else if (length(a) == 1) { gsub(/:$/, "" , a[1]) printf ",\"%s\": [" , a[1] is_array = 1 array_first_entry = 0 } } else if (is_array && NF > 0) { if (array_first_entry) { printf "," } array_first_entry = 1 gsub(/^[[:space:]]+/, "" , $0) gsub(/ "/, " \\\ "" , $0) printf "\"%s\"" , $0 } } END { if (is_array) { printf "]" } print "}}" }' |
All posts by iiidefix
Firefox Multi-Account Containers – manual site association
open about:debugging#/runtime/this-firefox
inspect “Firefox Multi-Account Containers”
paste the following function into Console
1 2 3 4 | async function open_in_container(id, fqdn) { var uuid = Object( await browser.storage.local.get(`identitiesState@@_firefox-container-${id}`))[`identitiesState@@_firefox-container-${id}`][ 'macAddonUUID' ] return await browser.storage.local.set(JSON.parse(`{ "siteContainerMap@@_${fqdn}" : { "userContextId" : "${id}" , "neverAsk" : true , "identityMacAddonUUID" : "${uuid}" }}`)); } |
call the just defined function
1 | await open_in_container(2, "example.com" ); |
first parameter is the container id
second parameter is the fqdn of the site
Unifi USG Radius default vlan
on USG
/config/scripts/post-config.d/radius_default_vlan.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/bin/bash # radius_default_vlan.sh # This script goes in /config/scripts/post-config.d if [[ -z "$1" ]] ; then echo "* * * * * root /config/scripts/post-config.d/radius_default_vlan.sh cron" > /etc/cron .d /radius_default_vlan exit 0 fi if grep -q "DEFAULT Auth-Type" "/etc/freeradius/users" ; then exit 0 fi cat >> /etc/freeradius/users <<EOF DEFAULT Auth-Type := Accept Tunnel-Type = 13, Tunnel-Medium-Type = 6, Tunnel-Private-Group-Id = 1 EOF service freeradius restart |
install
1 2 | chmod +x /config/scripts/post-config .d /radius_default_vlan .sh /config/scripts/post-config .d /radius_default_vlan .sh |
remove
1 2 | rm /etc/cron .d /radius_default_vlan rm /config/scripts/post-config .d /radius_default_vlan .sh |
EdgeRouter IPv6
Interfaces used:
- eth0: WAN
- eth1: secondary WAN (optional)
- eth2: LAN
Adjust accordingly.
Create firewall rules for WAN6_IN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | edit firewall ipv6-name WAN6_IN set default-action drop set rule 10 action accept set rule 10 description "allow established" set rule 10 protocol all set rule 10 state established enable set rule 10 state related enable set rule 20 action drop set rule 20 description "drop invalid packets" set rule 20 protocol all set rule 20 state invalid enable set rule 30 action accept set rule 30 description "allow ICMPv6" set rule 30 protocol icmpv6 top |
Create firewall rules for WAN6_LOCAL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | edit firewall ipv6-name WAN6_LOCAL set default-action drop set rule 10 action accept set rule 10 description "allow established" set rule 10 protocol all set rule 10 state established enable set rule 10 state related enable set rule 20 action drop set rule 20 description "drop invalid packets" set rule 20 protocol all set rule 20 state invalid enable set rule 30 action accept set rule 30 description "allow ICMPv6" set rule 30 protocol icmpv6 set rule 40 action accept set rule 40 description "allow DHCPv6 client/server" set rule 40 protocol udp set rule 40 source port 547 set rule 40 destination port 546 top |
Assign IPv6 firewall rules to primary wan interface
1 2 | set interfaces ethernet eth0 firewall in ipv6-name WAN6_IN set interfaces ethernet eth0 firewall local ipv6-name WAN6_LOCAL |
Assign IPv6 firewall rules to secondary wan interface (optional)
1 2 | set interfaces ethernet eth1 firewall in ipv6-name WAN6_IN set interfaces ethernet eth1 firewall local ipv6-name WAN6_LOCAL |
request v6 address on eth0 (optional)
1 2 | set interfaces ethernet eth0 ipv6 address autoconf set interfaces ethernet eth0 ipv6 dup-addr-detect-transmits 1 |
Request prefix with eth0 and assign to eth2
Requested prefix size /60 for compatibility with FritzBox
1 2 3 4 5 6 7 | edit interfaces ethernet eth0 dhcpv6-pd set prefix-only set pd 0 prefix-length /60 set pd 0 interface eth2 host-address ::1 set pd 0 interface eth2 prefix-id :0 set pd 0 interface eth2 service slaac top |
Set options for eth2
1 2 3 4 5 6 7 8 9 10 | edit interfaces ethernet eth2 ipv6 router-advert set send-advert true set min-interval 200 set max-interval 600 set managed-flag true set default-preference high set prefix '::/64' autonomous-flag true set prefix '::/64' preferred-lifetime 300 set prefix '::/64' valid-lifetime 600 top |
enable mss-clamping for v6 (optional)
1 | set firewall options mss-clamp6 1280 |
finally
1 2 | commit save |
Resources
ESXi configure SNMP
To configure the ESXi SNMP Agent:
- Open an SSH session to the ESXi host.
- Run this command to show the current SNMP config:
1
esxcli system snmp get
- Set the SNMP parameters of the ESXi Host:
123
esxcli system snmp set --communities public,eastnoc,westnoc
esxcli system snmp set --syscontact user
esxcli system snmp set --syslocation "location, world"
- Enable the SNMP Agent:
1
esxcli system snmp set --enable true