I’m running iptables on the output and input chains on my local computer. It is not Kali but it’s my own Debian based creation. I’m using python 3.7 and some things are different because the course is a little outdated some of the commands he uses are depreciated or just not working. I had to make the changes I did to stop the errors. All the other programs work as intended with scapy.all import *, so I don’t see why that would be the problem. I took out the first two lines of the mod function I left those in when I was trying to figure out the problem, sorry. In the above screenshot I also sent the wrong packet to the mod function I sent the original netfilterqueue packet that’s why I was using IP(get_payload()). I fixed all that and reverted to what I had, sending the scapy pkt from the main process function to the mod function with the modified load. Now the mod function is just like Zaid’s, setting the pkt[Raw].load to the new load and deleting the len and chksums from UDP and TCP layers.
After changing those few lines the program still does not work. Running it on my computer it never receives any responses in the terminal or in my browser. My browser is Firefox and it just forever loads with a white screen.
I’m wondering if it could be that I need to set a new lens for the UDP and TCP layers? But I thought Zaid said they are automatically fixed to the right number after we delete them.