tutorial: fix “iptables: command not found” error on CentOS 5.2

Goal: enable us to use the iptables command in the terminal

Reference: http://articles.slicehost.com/2008/1/30/centos-setup-page-1#comment-2869


  • CentOS 5.2
  • vi
  • bash


  1. Add /sbin to your path by editing your ~./bash_profile: user $ vi ~/.bash_profile
  2. Append /sbin to the PATH definition.  In my file, this looks like: PATH=$PATH:$HOME/bin –> PATH=$PATH:$HOME/bin:/sbin
  3. Save and close ~/.bash_profile
  4. Reload ~/.bash_profile: user $ source ~/.bash_profile