I am trying to 'man in the middle' a device on my wifi network. I have configured it to use my Linux machine (also in the wifi network) as a default gateway.
On the Linux (attack) host, I switched on IPv4 forwarding using
# sysctl -w net.ipv4.ip_forward=1
Then I start looking at the traffic from the victim device using wireshark. I then saw that the attack machine sends ICMP redirect packets to the victim device, pointing it to the actual default gateway in the network. That is, obviously, not what I want it to do.
Then I tried disabling ICMP redirects using
# sysctl -w net.ipv4.conf.all.send_redirects=0
That seemed to work, but after a while the redirect packets started to appear again...
Any clues to what I can do to fix?