7.2 KiB
7.2 KiB
type, created, updated
type | created | updated |
---|---|---|
topic | 2024-01-06T01:25:36.078Z | 2024-01-06T01:25:36.078Z |
DESKTOP-H6JG91B
maas
1178
1178
sudo -i
apt-get update
apt-get upgrade
apt-get install links unzip net-tools ufw nginx git ncdu nano nmap -y
reboot
wsl --export Ubuntu Ubuntu-MAAS-001.tar
ip a
lsb_release -a
ufw enable
ufw status numbered
ufw disable
cd /home/maas/
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod +x ./dotnet-install.sh
./dotnet-install.sh --channel 8.0
ln -s /home/maas/.dotnet/dotnet /usr/local/bin/dotnet
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$HOME/.dotnet:$HOME/.dotnet/tools
dotnet --info
timedatectl set-timezone America/Phoenix
snap install dashkiosk
snap restart dashkiosk
snap install ubuntu-frame wpe-webkit-mir-kiosk
snap set wpe-webkit-mir-kiosk url=http://localhost:9400/receiver
wpe-webkit-mir-kiosk.cog http://localhost:9400/receiver
/snap/wpe-webkit-mir-kiosk/current/bin/setup.sh
wpe-webkit-mir-kiosk.cog http://localhost:9400/receiver
snap set ubuntu-frame daemon=true
apt-get install -y ca-certificates
nano /home/maas/localhost.conf
echo >/home/maas/localhost.conf && nano /home/maas/localhost.conf
[req]
default_bits = 2048
default_keyfile = localhost.key
distinguished_name = req_distinguished_name
req_extensions = req_ext
x509_extensions = v3_ca
[req_distinguished_name]
countryName = Country Name (2 letter code)
countryName_default = US
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = Arizona
localityName = Locality Name (eg, city)
localityName_default = Anthem
organizationName = Organization Name (eg, company)
organizationName_default = Phares
organizationalUnitName = organizationalunit
organizationalUnitName_default = Development
commonName = Common Name (e.g. server FQDN or YOUR name)
commonName_default = desktop-h6jg91b
commonName_max = 64
[req_ext]
subjectAltName = @alt_names
[v3_ca]
subjectAltName = @alt_names
[alt_names]
DNS.1 = desktop-h6jg91b
DNS.2 = localhost
DNS.3 = 127.0.0.1
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/localhost.key -out /etc/nginx/localhost.crt -config /home/maas/localhost.conf
ls /etc/nginx
nano /etc/nginx/sites-available/default
echo >/etc/nginx/sites-available/default && nano /etc/nginx/sites-available/default
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
}
server {
ssl_certificate 'localhost.crt';
ssl_certificate_key 'localhost.key';
listen 443 default_server ssl http2;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
listen [::]:443 default_server ssl http2;
server_name _;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:3000/;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
}
}
nginx -t
systemctl restart nginx
nginx -s reload
exit
cp ~/.bash_history /home/maas/bash-history-2023-11-20.txt
chown maas /home/maas -R
chgrp maas /home/maas -R
nano /home/maas/bash-history-2023-11-20.txt
exit
wsl --export Ubuntu Ubuntu-MAAS-002.tar
su -i
reboot
# https://maas.io/docs/fresh-installation-of-maas
sudo -i
snap install --channel=3.4/edge maas
systemctl disable --now systemd-timesyncd
apt install -y postgresql
mikepharesjr = ___________
1178 = ___________
maas = ___________
localhost = _________
sudo -i -u postgres psql
drop database maas with (force);
\q
sudo -i -u postgres psql -c "CREATE USER \"mikepharesjr\" WITH ENCRYPTED PASSWORD '1178'"
sudo -i -u postgres createdb -O "mikepharesjr" "maas"
cat /etc/postgresql/14/main/pg_hba.conf
nano /etc/postgresql/14/main/pg_hba.conf
host maas mikepharesjr 0/0 md5
maas init region+rack --database-uri "postgres://mikepharesjr:1178@localhost/maas"
http://172.23.77.6:5240/MAAS
http://127.0.0.1:5240/MAAS
maas createadmin
mikepharesjr
1178
1178
mikepharesjr@msn.com
gh:mikepharesjr
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/localhost.key -out /etc/nginx/localhost.crt -config /home/maas/localhost.conf
ls /etc/nginx
maas status
# http://localhost:5240/MAAS
snap stop maas
systemctl stop postgresql.service
~~systemctl stop maas-dhcpd.service~~
~~systemctl stop maas-rackd.service~~
~~systemctl stop maas-regiond.service~~
snap stop maas
snap remove --purge maas
systemctl enable --now systemd-timesyncd
systemctl disable --now systemd-timesyncd
snap install --channel=3.4/edge maas
maas init region+rack --database-uri "postgres://mikepharesjr:1178@localhost/maas"
maas status
wsl --export Ubuntu Ubuntu/Ubuntu-MAAS-003.tar
172.23.64.0/20 => 192.168.0.0/24
172.23.64.1 => 192.168.0.1
nmap -n -sU -p67 --script broadcast-dhcp-discover
netstat -a -b
wsl --export Ubuntu D:/9-Delete/Ubuntu-MAAS-004.tar
wsl --unregister Ubuntu
wsl --import Ubuntu "D:\9-Delete" "D:\9-Delete\Ubuntu-MAAS-004.tar"
pihole
1178
1178
sudo -i
apt-get update
apt-get upgrade
apt-get install links unzip net-tools ufw nginx git ncdu nano nmap ca-certificates -y
reboot
wsl --export Ubuntu Ubuntu/Ubuntu-PiHole-001.tar
wsl --unregister Ubuntu
wsl --import Ubuntu "C:\Users\mikep\Ubuntu" "C:\Users\mikep\Ubuntu\Ubuntu-PiHole-001.tar"
sudo -i
cd /home/pihole
curl -sSL https://install.pi-hole.net | bash
pihole -a -p 4hink
nano /etc/lighttpd/lighttpd.conf
...
server.port = 8005
...
service lighttpd restart
# http://localhost:8005/admin
mkdir -p /tftpboot/kali
cd /tftpboot/kali
# https://www.kali.org/docs/installation/network-pxe/
# https://discourse.pi-hole.net/t/setting-up-a-pxe-boot-server-with-docker-compose-and-boot-kali-linux-or-other-oss/50218
wget http://http.kali.org/kali/dists/kali-rolling/main/installer-amd64/current/images/netboot/netboot.tar.gz
tar -zxpf netboot.tar.gz
rm netboot.tar.gz
nano /etc/dnsmasq.d/99-pxeboot.conf
ls /etc/dnsmasq.d/
dhcp-boot=pxelinux.0
enable-tftp
tftp-root=/tftpboot/
pxe-prompt="Press F8 for menu.", 60
pxe-service=x86PC,"Boot from local disk",0
pxe-service=x86PC,"Boot Kali Linux",kali/pxelinux
pihole restartdns
pihole status
pihole-FTL dhcp-discover
nmap -n -sU -p67 --script broadcast-dhcp-discover
wsl --export Ubuntu Ubuntu/Ubuntu-PiHole-002.tar
wsl --unregister Ubuntu
wsl --import Ubuntu "C:\Users\mikep\Ubuntu" "C:\Users\mikep\Ubuntu\Ubuntu-PiHole-002.tar"