13,420
edits
Changes
→INVESTIGATION 1: IPTABLES RULES AS A SCRIPT
==INVESTIGATION 1: IPTABLES RULES AS A SCRIPT==
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.
# FirstStart your host machine, issue and launch your vm1 machine.# Login to your root account on your vm1 machine.# Issue an ''iptables command'' to set the policy to disable '''all forwarding traffic''', and remove the rule that is rejecting it.
# Next, set the default policy to drop '''all inbound traffic''', and remove the rule that is rejecting traffic.
# Issue an iptables command to list rules for verification.<br /><br />The remaining tasks will relate to that same '''inbound''' traffic chain.<br /><br />