Packet forwarding is the relay of packets from one node on the network to another. In our case, we will relay packets from the victim to the gateway and vice versa. To allow packet forwarding from our system to the Internet, set the value located in the file
/proc/sys/net/ipv4/ip_forward on most modern GNU-Linux systems to
1. This enables IP forwarding as a GNU-Linux kernel function. We can then tell iptables to route the traffic from port to port. For instance, the following command can be used in conjunction with the previously mentioned SSLStrip utility to redirect the victim's traffic coming into port
80 to our local port
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-ports 10000 ...