\begin{exe} {System Tunables with \textbf{sysctl}}

   \begin{enumerate}
      \item
      Check if you can \textbf{ping} your own system.
      \item
      Check the current value of
      \verb?net.ipv4.icmp_echo_ignore_all?, which is used to
      turn on and off whether your system will respond to
      \textbf{ping}.  A value of \verb?0?  allows your
      system to respond to pings.
      \item
      Set the value to \verb?1? using the \textbf{sysctl}
      command line utility and then check if pings are
      responded to.
      \item
      Set the value back to \verb?0? and show the original
      behavior in restored.
      \item
      Now change the value by modifying
      \filelink{/etc/sysctl.conf} and force the system to
      activate this setting file without a reboot.
      \item
      Check that this worked properly.
   \end{enumerate}
   You will probably want to reset your system to have its
   original behavior when you are done.

   \begin{sol}

      You can use either \verb?localhost?, \verb?127.0.0.1?
      (loopback address) or your actual IP address for
      target of \textbf{ping} below.
      \begin{enumerate}
         \item
         \begin{cmd}
$ ping localhost
         \end{cmd}
         \item
         \begin{cmd}
$ sysctl net.ipv4.icmp_echo_ignore_all
         \end{cmd}
         \item
         \begin{cmd}
$ sudo sysctl net.ipv4.icmp_echo_ignore_all=1
$ ping localhost
         \end{cmd}
         \item
         \begin{cmd}
$ sudo sysctl net.ipv4.icmp_echo_ignore_all=0
$ ping localhost
         \end{cmd}
         \item
         Add the following line to
         \filelink{/etc/sysctl.conf}:
         \begin{configlst}[in \texttt{/etc/sysctl.conf}]
net.ipv4.icmp_echo_ignore_all=1
         \end{configlst}
         and then do:
         \begin{cmd}
$ sysctl -p
         \end{cmd}
         \item
         \begin{cmd}
$ sysctl net.ipv4.icmp_echo_ignore_all
$ ping localhost
         \end{cmd}
      \end{enumerate}
      Since the changes to \filelink{/etc/sysctl.conf} are
      persistent, you probably want to restore things to its
      previous state.
   \end{sol}
\end{exe}

