1

I'm trying to route all packets on port 80 to kali linux so that I can ssl strip them but I cannot see to setup the iptables correctly to force all the packets to go to my other Vm.

[ Virtual Machine #1] ---------------------------- > [ Virtual Machine #2 ] route all packets on port 80

Information -Im using vbox both Vm's are using NAT

Things I've Tried

sysctl net.ipv4.ip_forward=1 #to enable port forwarding

iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 10.0.2.15:80

10.0.2.15 was the inet addr of my kali linux but idk what happened they now both have the same ip addr. I think i screwed something up while messing with it

My Vm network configurations #2 (The one that is taking all the routed packets)

eth0 Link encap:Ethernet HWaddr 08:00:27:a7:ff:7a
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fea7:ff7a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:13651 errors:0 dropped:0 overruns:0 frame:0 TX packets:3711 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:17769462 (16.9 MiB) TX bytes:262897 (256.7 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:234701 errors:0 dropped:0 overruns:0 frame:0 TX packets:234701 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:33563198 (32.0 MiB) TX bytes:33563198 (32.0 MiB)

My Vm network configurations #1 (The one that needs to route all of its packets to other one)

eth10 Link encap:Ethernet HWaddr 08:00:27:65:07:56
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe65:756/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4403 errors:0 dropped:0 overruns:0 frame:0 TX packets:2514 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4828213 (4.8 MB) TX bytes:315305 (315.3 KB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:23 errors:0 dropped:0 overruns:0 frame:0 TX packets:23 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1913 (1.9 KB) TX bytes:1913 (1.9 KB)

2
  • Please edit and add detail of what you have done so far
    – Paul
    Oct 21, 2014 at 3:01
  • Sorry, you want to get NAT from interface with IP 10.0.2.15 to VM with interface IP 10.0.2.15? The hell?
    – ptQa
    Oct 22, 2014 at 4:39

0

You must log in to answer this question.

Browse other questions tagged .