add ip6tables and fix some security bugs