ufw和iptables的关系
UFW is just a simple (hence the U in UFW; Uncomplicated FireWall) frontend to Iptables. You don't need UFW if you know how to and prefer to use Iptables. UFW is there so that someone could set up a firewall without having to know all the complex Iptables commands.