932
edits
Changes
m
<ol><li value="8">You can use these tools to compare any two text files, they often come in handy. Note in your lab logbook the iptables rules that were added automatically by the '''libvirtd''' service.</li><li>Are there any differences between those 2 files? What does this mean if your VMs get disconnected in terms of the firewall rules?</li><li>You should notice the virtual machine manager no longer contains the vms. Close and then restart the virtual machine manager. What Happens?<br> What are the states of your VMs? Record your observations in your lab logbook.</li><li>Close the virtual machine manager application window again</li><li>Use the systemctl command to start the '''libvirtd''' service.</li><li>Now, restart the virtual machine mangaer. What happens? What is the status of your VMs?</li><li>What does this mean when you lose your vm connections (including the disruption of the libvirtd service)? Record your observations in your lab logbook.</li></ol>
Added a step to cause the rules for virtual networks to not be in the before.txt file. Simplified rest of instructions.
'''Perform the Following Steps:'''
# Leave your VMs running for this section (which seems counter-intuitive).
# On your '''host machine''', stop the '''libvirtd''' service (refer to [http://zenit.senecac.on.ca/wiki/index.php/Init_vs_systemd#systemd_Command_Usage systemctl] command), and restart the '''iptables''' service.
# Run '''iptables -L -v''' but redirect the output to a text file called '''before.txt''' (you will be using this file later).
#You should notice the virtual machine manager no longer contains the vms.#Close and then restart the virtual machine manager. What Happens?<br /> What are the states of your VMs? Record your observations in your lab logbook.#Close the virtual machine manager application window again.# Restart the '''iptableslibvirtd''' service.#Now, restart the virtual machine manager. What happens? What is the status of your VMs?#What does this mean when you lose your vm connections (including the disruption of the libvirtd service)? Record your observations in your lab logbook.
# Re-issue '''iptables -L -v''' commands making certain to redirect output to a second file ('''after.txt'''). This should provide a listing of the new state of your firewall settings.
# You now should have two text files representing the <u>before</u> and <u>after</u> states of your firewall. Compare differences between these two files using the '''diff''' command<br>(You should have used this tool in '''ULI101''').
#Run '''diff -u before.txt after.txt''' and figure out how to read the output.
#You can use these tools to compare any two text files, they often come in handy. Note in your lab logbook the iptables rules that were added automatically by the '''libvirtd''' service.
#Are there any differences between those 2 files? What does this mean if your VMs get disconnected in terms of the firewall rules?
{{Admon/tip|Graphically Compare File Differences|You can also install a graphical tool that makes it much easier to see differences: '''kompare before.txt after.txt<br><br>NOTE: Make certain to run the command as a regular user (not root!).}}
=== Practice Setting Firewall Rules ===