Changes

Jump to: navigation, search

OPS335 Lab 2b

736 bytes removed, 11:51, 4 May 2017
Removing scripting portion of this lab. Too many students had trouble understanding it, and it took away from them learning iptables.
==INVESTIGATION 1: CUSTOM IPTABLES RULES AS ON A SCRIPTVM==
We will now '''set iptables rules for your vm1 machine'''. As an alternative to editing the configuration file, you can '''place iptables commands in a script''' to be executed any time the machine boots (or any other time to you need to refresh your rules). In this way, then you can '''apply your new iptables rules to your vm2 and vm3 machines''' by using the scp command and run your shell script.
'''Perform the following Steps:'''
# Issue an ''iptables command'' to allow icmp traffic from addresses in your virtual network.
# Test that your machines can still use ping and ssh to communicate with each other.
# Store the commands you used to modify Save your rules in the location that iptables into a shell script called: '''firewall_restorewill automatically read from when it starts.bash'''<br><br>{{Admon/important |Shell Script Does Not Execute at # Reboot| If your shell script does not execute at reboot: first; machine and check that the shell script has execute permissions, in the shell script, use the absolute pathname for iptables (inew rules are being applied.e. use the '''which iptables''' command) If they are not, and it may be useful to resolve this issue the iptables command with the '''-w''' option.}}<br><ol><li value="13">Set up a cron entry so that your rules are automatically applied every time the machine bootsbefore moving on.</li><li># Now copy the script file to your other VMs and make it apply to them when they boot as well.</li><li># Reboot each machine and make sure this works before you move on.</li></ol>
'''Record your observations in this section on your OPS335 lab log-book'''
932
edits

Navigation menu