% CST8207 Week 14 Notes -- an attack whois script, shutdown of CLS, installing Linux, Linux Rap % Ian! D. Allen -- -- [www.idallen.com] % Winter 2019 - January to April 2019 - Updated 2022-05-04 04:39 EDT - [Course Home Page] - [Course Outline] - [All Weeks] - [Plain Text] This course ends (last classes) on Wednesday April 17 2019 ========================================================== | Friday April 19 is a holiday; there are no classes that day. | The last lecture class is Tuesday April 16. | The last lab classes are on Wednesday April 17. | I am not on campus on Thursday or Friday. | Your [Final Exam] is at 1pm on Tuesday April 23 in T119 (1pm to 4pm: 3 hours) Course Linux Server permanent shutdown April 30 2019 ==================================================== The [Course Linux Server] will be archived and shut down permanently at noon on **April 30 2019** because the CLS system administrator (Ian!) had to resign from the College and nobody else knows how to maintain a Linux server for a class of 120 students. For options on continuing to use Linux, see below. C O U R S E    E V A L U A T I O N ================================== ____ _ ____ __ __ | _ \ | | ___ __ _ ___ ___ | _ \ ___ \ \ / /___ _ _ _ __ | |_) || | / _ \ / _` |/ __| / _ \ | | | | / _ \ \ V // _ \ | | | || '__| | __/ | || __/| (_| |\__ \| __/ | |_| || (_) | | || (_) || |_| || | |_| |_| \___| \__,_||___/ \___| |____/ \___/ |_| \___/ \__,_||_| ____ ____ _____ _____ _ _ _ / ___/ ___|_ _| | ____|_ ____ _| |_ _ __ _| |_(_) ___ _ __ | | \___ \ | | | _| \ \ / / _` | | | | |/ _` | __| |/ _ \| '_ \ | |___ ___) || | | |___ \ V / (_| | | |_| | (_| | |_| | (_) | | | | \____|____/ |_| |_____| \_/ \__,_|_|\__,_|\__,_|\__|_|\___/|_| |_| -    **Closes Sunday April 28.** - Feedback is anonymous. Professors are not told who said what and results are not released until after grades have been submitted. - I publish my [anonymous course evaluations], so your comments will be there to guide future students. - Listen to Dogbert on [satisfaction surveys] - The Checking Program for your assignments tells you how to turn off the nag message. Read All The Words. Readings, Assignments, Labs, Tests, and ToDo ============================================ Read (at least) these things (All The Words) -------------------------------------------- 1. [Week 14 Notes HTML] -- this file -- **Read All The Words** 2. [List of Commands] -- Command names you should know, listed by week 3. [Video Tutorials on Lynda.com] -- tagged by week number 4. [Linux and Sysadmin News in the World] Assignments, Quizzes, and Lab work this week -------------------------------------------- > **Reminder:** There are now three quizzes that you need to complete (five > times each) on Brightspace as part of your term Quiz mark. The third quiz > has be posted. The Quizzes are *not* optional; see the [Course Outline]. > You need to do each quiz at least five times. Check the due date for each assignment and put a reminder in your agenda, calendar, and digital assistant. Just like in the Real World, not all due dates are on the same days or at the same times. - Review last week. Did you do everything assigned last week? - [Assignment #12 HTML] -- Shell Script Parameters and Control Flow - The checking program has a feature to check just one of your scripts. - OPTIONAL: Do Bonus [Assignment #10 HTML] to improve your Midterm #2 score. - This affects only your Midterm #2 score, not your Assignment score. - There is a checking program available to check your file format for this bonus assignment, but only people who Read All These Words will know about it. Wrong file format means no marks. *Do not redirect or save the output of this checking program!* Upcoming tests and exams ------------------------ This course had two midterm tests (10%, 15%) and will have one final exam (40%). ![Bring your favourite marker to your exam] Follow this link to see all your upcoming [Quizzes, Tests, Final Exam]. The dates are also posted on the [Course Home Page] and on [Brightspace CST8207]. For full marks, read the [Test Instructions] web page (all the words) **before** your tests. 1. First Midterm test: Done. 2. Second Midterm test: Done. 3. Final Exam: The date is now posted on ACSIS: Tuesday April 23 from 1pm to 4pm in T119. Academic Honesty Declaration ============================ There is no group work in this course. Because of the large number of students who shared, copied, and worked together on scripts in previous terms and who were all charged with Academic Dishonesty during Exam Week, you must now declare that you are the sole author of your scripts. You must write all your own scripts. You must type the text from the [Academic Honesty Declaration] into the end (bottom) of every script you write in this course. See [Assignment #12 HTML] for the details. If any of your scripts is found to have text in common with any other people, you will be charged with Academic Dishonesty ([AA18]) or Plagiarism ([AA20]) in the middle of your Exam Week, and your course marks may be delayed and downgraded. An Academic Discipline hearing is highly disruptive to your Exam Week. Do your own assignments; do not share, work together, or copy from another student or from the Internet. Do not help students fail my course ----------------------------------- Students who give answers (e.g. command lines) to other students are helping those other students fail my course. Stop doing that. I want *everyone* to pass my course. Let people do their own thinking. Notes from the Classroom ======================== - **Take notes in class!** Keep a pad open on your desk. - Bring your notes to class! Stop wasting time looking up commands. - Look at the [Practice Tests and Answers] related to the Final Exam. You can bring your questions to your lab periods and your instructor will go over them with you. - Check your EMail, especially when creating CRON jobs. One student had generated over 2,600 email messages (one per minute) using a CRON job that failed. (I deleted the job.) - Don't forget to finish your five Brightspace quiz attempts for each of the Midterm 1 and Midterm 2 quizzes. There is a third quiz available to prepare for the Final Exam. Do at least five attempts in all three quizzes. - Nobody should have any files larger than 1MB in their CLS account. If you have uploaded an image that is larger than 1MB, you should make it smaller using the `convert` command directions given in the [Student Web Site] page from [Assignment #09]. - "The Bash Academy is an initiative to promote the bash shell language and educate people on its use." - Regarding world-writable files in your account: See last week's notes. Commands Used ------------- Keep a notebook with a [List of Commands] in it. All commands have now been covered in the course. Your own personal web page on the CLS ===================================== Sorry, all the personal student web pages were only available on the [Course Linux Server] that had to be shut down in June 2019. ![/bin/cat] Using and installing Linux yourself =================================== I do not recommend installing Linux as a "dual boot" option. Installing in a Virtual Machine (VM) is a better option, because: 1. You don't risk damaging your host machine by making a mistake setting up dual-boot. A botched dual-boot can easily wipe out everything. 2. You can run multiple different Linux VMs. Try them all! 3. You don't have to shut down your main host to play with Linux. You can have both the host and Linux available at the same time. With dual-boot, you have to close everything and reboot the machine to get into Linux, and that's a pain you don't need. 4. You can take a snapshot of your VM before you do anything, so you can always recover back to the snapshot if something goes wrong. Here are some student options for continuing to use Linux/Unix: 1. You can get a free BSD Unix shell account here: 2. You can wait and install your own Linux virtual machine in CST8177. 3. *These CST8177 instructions below are obsolete, because the `linux2.ca` domain has expired. You may find some old notes in the Internet Archive, e.g. * CST8177 used to install Linux in a VM, but they overwrote the old notes when the prof created the new term and the links may be broken: To install Linux in a VM now, you can use an old version of CST8177 notes here: **LINK BROKEN** - (*These notes are **NOT** the notes for the current version of CST8177, which are unavailable and locked up on Brightspace.*) - The first two old assignments create Live-CD Linux VMs: - **LINK BROKEN** - **LINK BROKEN** - The third old assignment does a Linux install into a VM: - **LINK BROKEN** 4. To install Linux in a VM now, you can use a very old version of CST8207 [CentOS Installation] notes - The above configures a minimal server, not a full system with GUI. - You can follow the same general method to download and install a more modern GUI Desktop version of Linux, e.g. [Ubuntu Linux] or [Mint Linux]. Ottawa/Gatineau Linux Resources ------------------------------- - [Ottawa Canada Linux Users Group - OCLUG] - [Linux Ottawa Wiki] - [Ottawa Linux Mailing List] Script to list attacks on the CLS ================================= In our last class we wrote the script [attack_whois.sh.txt] and then I touched it up, made the output pretty, and added some comments. The output of the script now looks like this (April 2019): 8125 attacks from 185.234.217.221 from Ireland,IE 5026 attacks from 36.156.24.95 from China,CN 4954 attacks from 223.111.139.211 from China,CN 4927 attacks from 36.156.24.96 from China,CN 4792 attacks from 36.156.24.94 from China,CN 4754 attacks from 223.111.139.247 from China,CN 4708 attacks from 36.156.24.97 from China,CN 4688 attacks from 223.111.139.244 from China,CN 4589 attacks from 223.111.139.210 from China,CN 4485 attacks from 122.226.181.164 from China,CN 4365 attacks from 122.226.181.167 from China,CN 4163 attacks from 115.238.245.2 from China,CN 4135 attacks from 185.234.217.187 from Ireland,IE 4123 attacks from 115.238.245.4 from China,CN 4050 attacks from 122.226.181.166 from China,CN 4043 attacks from 36.156.24.99 from China,CN 3934 attacks from 122.226.181.165 from China,CN 3822 attacks from 222.186.30.71 from China,CN 3617 attacks from 61.184.247.8 from China,CN 3496 attacks from 61.184.247.3 from China,CN 3031 attacks from 36.156.24.98 from China,CN 2860 attacks from 125.65.42.192 from China,CN 2804 attacks from 61.184.247.6 from China,CN 2546 attacks from 61.184.247.11 from China,CN 2479 attacks from 61.184.247.4 from China,CN 2264 attacks from 118.151.209.119 from India,IN 1500 attacks from 223.111.139.239 from China,CN 1483 attacks from 118.123.15.142 from China,CN 988 attacks from 115.238.245.8 from China,CN 774 attacks from 139.162.99.243 from Netherlands,NL 557 attacks from 118.123.15.131 from China,CN 518 attacks from 114.33.108.178 from "Taiwan, Province of China",TW 450 attacks from 36.156.24.93 from China,CN 416 attacks from 80.82.77.139 from Netherlands,NL 382 attacks from 88.214.26.15 from Seychelles,SC 378 attacks from 58.241.250.152 from China,CN 350 attacks from 103.17.49.5 from India,IN 347 attacks from 80.82.77.33 from Netherlands,NL 346 attacks from 178.73.215.171 from Sweden,SE 341 attacks from 223.68.10.247 from China,CN 336 attacks from 222.187.225.10 from China,CN 322 attacks from 71.6.199.23 from United States,US 294 attacks from 122.114.252.120 from China,CN 277 attacks from 221.139.104.121 from UNKNOWN 230 attacks from 94.26.234.12 from Russian Federation,RU 228 attacks from 186.67.23.122 from Chile,CL 227 attacks from 185.142.236.34 from Netherlands,NL 226 attacks from 222.187.225.9 from China,CN 221 attacks from 71.6.146.185 from United States,US 208 attacks from 72.38.193.35 from Canada,CA The `MISSING COUNTRY` above is because Korea publishes its `whois` information in Korean, and the English field `Country:` is not used. My Last Linux Rap Video ======================= I did my final **Linux Rap** at the start of class on Tuesday, April 16, 2019. > "Only do, what only you can do." - E.W.Dijkstra(?), John Maxwell(?), John > Harvey Jones(?), others(?)... With this quote and my upcoming necessary resignation from Algonquin College firmly in mind, I solicited four words from the students at the start of my last 8am Linux lecture class, wrote them on the board, put on a rainbow hoodie and orange pants, and performed a short freestyle, completely improvised rap that included all of the words they gave me. [Ian! Linux Rap video by André D'Aoust] Ian! Linux Rap on YouTube: Creative Commons License: [Link to all Ian Linux Rap Videos] Thank You ========= ![[Certificate of Recognition]][1] -- | Ian! D. Allen, BA, MMath - idallen@idallen.ca - Ottawa, Ontario, Canada | Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/ | College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/ | Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/ [Plain Text] - plain text version of this page in [Pandoc Markdown] format [www.idallen.com]: http://www.idallen.com/ [Course Home Page]: .. [Course Outline]: course_outline.pdf [All Weeks]: indexcgi.cgi [Plain Text]: week14notes.txt [Final Exam]: 000_quizzes_and_tests.html#the-final-exam-40-1pm-tuesday-april-23-in-t119-week-15 [Course Linux Server]: 070_course_linux_server.html [anonymous course evaluations]: /#coursenotes [satisfaction surveys]: http://dilbert.com/strips/comic/2005-04-07/ [Week 14 Notes HTML]: week14notes.html [List of Commands]: 900_unix_command_list.html [Video Tutorials on Lynda.com]: 910_lynda_index.html [Linux and Sysadmin News in the World]: 950_linux_world.html [Assignment #12 HTML]: assignment12.html [Assignment #10 HTML]: assignment10.html [Bring your favourite marker to your exam]: data/sniff_markers.jpg "Bring your favourite marker to your exam" [Quizzes, Tests, Final Exam]: 000_quizzes_and_tests.html [Brightspace CST8207]: https://brightspace.algonquincollege.com/d2l/home/117776 [Test Instructions]: 000_test_instructions.html [Academic Honesty Declaration]: academic_honesty.png [AA18]: http://www.algonquincollege.com/policies/policy/academic-discipline/ [AA20]: http://www.algonquincollege.com/policies/policy/plagiarism/ [Practice Tests and Answers]: 000_practice_tests.html [Student Web Site]: 000_student_web_site.html [Assignment #09]: assignment09.html [/bin/cat]: bincat.jpg "/bin/cat" [CentOS Installation]: ../../15w/notes/000_centos_install.html [Ubuntu Linux]: https://www.ubuntu.com/ [Mint Linux]: https://linuxmint.com/ [Ottawa Canada Linux Users Group - OCLUG]: http://linux-ottawa.org/ [Linux Ottawa Wiki]: http://wiki.linux-ottawa.org/doku.php [Ottawa Linux Mailing List]: http://lists.linux-ottawa.org/linux/listinfo.html [attack_whois.sh.txt]: attack_whois.sh.txt [Ian! Linux Rap video by André D'Aoust]: ianCSTcomputersciencerap2019-04-16.mp4 [Link to all Ian Linux Rap Videos]: 000_rap.html [Certificate of Recognition]: ian_certificate_of_recognition.pdf [1]: ian_certificate_of_recognition.png "Certificate of Recognition" [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/