Last active
September 15, 2020 16:02
-
-
Save ilude/a6042bdba071fa55a5056e661a336da3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo systemctl disable systemd-resolved | |
| sudo rm -v /etc/resolv.conf | |
| echo "nameserver 9.9.9.9" | sudo tee /etc/resolv.conf | |
| sudo apt install dnsmasq -y | |
| # https://opensource.com/article/18/3/manage-workstation-ansible | |
| # https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-ubuntu | |
| # https://stackoverflow.com/questions/39819378/ansible-get-current-target-hosts-ip-address | |
| # Currently ubuntu 20.04 focus does not have a ppa repo | |
| # https://stackoverflow.com/a/61922637 | |
| # sudo apt-get install software-properties-common -y | |
| # sudo apt-add-repository ppa:ansible/ansible | |
| # sudo apt-get update | |
| # sudo apt-get install ansible -y | |
| # use pip instead | |
| # https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-with-pip | |
| sudo apt-get install python-is-python3 | |
| sudo apt-get autoremove --purge | |
| sudo python get-pip.py | |
| sudo pip install ansible | |
| # ansible playbook to setup ufw and ip masquerading | |
| sudo apt install ufw | |
| # sudo ufw status verbose | |
| # sudo ufw app list | |
| sudo ufw allow ssh | |
| sudo ufw allow in on eth1 to any port 80 | |
| sudo ufw enable | |
| 30 sudo nano /etc/default/ufw | |
| 31 sudo nano /etc/ufw/before.rules | |
| 32 sudo ufw disable && sudo ufw enable | |
| 33 sudo nano /etc/ufw/before.rules | |
| 34 sudo ufw disable && sudo ufw enable | |
| 35 sudo nano /etc/ufw/sysctl.conf | |
| 36 sysctl -p | |
| 37 sudo sysctl -p | |
| 38 sudo nano /etc/dnsmasq.conf | |
| 39 sudo cp /etc/dnsmasq.conf /etc/dnsmasq.orig | |
| 40 sudo nano /etc/dnsmasq.conf | |
| 41 cat /dev/null > /etc/dnsmasq.conf | |
| 42 sudo cat /dev/null > /etc/dnsmasq.conf | |
| 43 sudo rm /etc/dnsmasq.conf | |
| 44 sudo nano /etc/dnsmasq.conf | |
| 45 sudo systemctl restart dnsmasq | |
| 46 sudo nano /etc/dnsmasq.conf | |
| 47 cd ~ | |
| 48 wget http://archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64/current/images/netboot/netboot.tar.gz -O netboot.tar.gz --quiet | |
| 49 mkdir -p /apps/tftp | |
| 50 tar xf netboot.tar.gz -C /apps/tftp/ | |
| 51 cat > /apps/tftp/pxelinux.cfg/default << EOF | |
| default install | |
| label install | |
| kernel ubuntu-installer/amd64/linux | |
| append vga=788 initrd=ubuntu-installer/amd64/initrd.gz auto=true priority=critical preseed/url=tftp://10.10.16.1/preseed.cfg | |
| EOF | |
| 52 netstat -tul | |
| 53 sudo apt install net-tools | |
| 54 netstat -tul | |
| 55 netstat -tuln | |
| 56 history | |
| 57 sudo systemctl restart dnsmasq | |
| 58 netstat -tuln | |
| 59 netstat -tul | |
| 60 sudo apt-get install tftp | |
| 61 sudo tftp | |
| 62 l | |
| 63 cat | |
| 64 cat /var/log/installer/autoinstall-user-data | |
| 65 sudo cat /var/log/installer/autoinstall-user-data | |
| 66 wget https://releases.ubuntu.com/20.04/ubuntu-20.04-live-server-amd64.iso -O /apps/tftp/ | |
| 67 wget https://releases.ubuntu.com/20.04/ubuntu-20.04-live-server-amd64.iso -O /apps/tftp/ubuntu-20.04-live-server-amd64.iso | |
| 68 history | |
| 69 history |grep pxe | |
| 70 mount | |
| 71 ip add | |
| 72 mv ubuntu-20.04.1-live-server-amd64.iso /apps/tftp/ | |
| 73 cd /apps/tftp/ | |
| 74 l | |
| 75 rm ubuntu-20.04-live-server-amd64.iso | |
| 76 sudo nano pxelinux.cfg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://askubuntu.com/questions/1238070/deploy-ubuntu-20-04-on-bare-metal-or-virtualbox-vm-by-pxelinux-cloud-init-doesn/1240068#1240068 | |
| https://askubuntu.com/questions/1238070/deploy-ubuntu-20-04-on-bare-metal-or-virtualbox-vm-by-pxelinux-cloud-init-doesn | |
| https://linuxize.com/post/how-to-setup-a-firewall-with-ufw-on-ubuntu-20-04/ | |
| https://jrm.cc/blog/home-cluster-part-ii-machine-setup-pixies/ | |
| https://medium.com/myatus/poor-mans-device-discovery-dns-492a95ea8c8b | |
| https://diegolemos.net/2017/08/06/pxe-booting/ | |
| https://github.com/bertvv/ansible-role-pxeserver | |
| https://askubuntu.com/questions/412574/pxe-boot-server-installation-steps-in-ubuntu-server-vm | |
| https://askubuntu.com/questions/1235723/automated-20-04-server-installation-using-pxe-and-live-server-image | |
| https://medium.com/@tlhakhan/ubuntu-server-20-04-autoinstall-2e5f772b655a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment