Hello,
I found a neat vm containing ubuntu 12.04 called CERT Tapioca for network checks using the man in the middle technique. My goal is to route traffic of an android device through it.
It is set up to have an inteet coection through NAT on eth0, which is working as intended.
Another device eth1 is set up for incoming coections. (It's bridged to a wireless access point/hostednetwork on a Windows 7 host.)
Here's the configuration
Code:
auto eth1 iface eth1 inet static address 192.168.56.1 netmask 255.255.255.0
Code:
option domain-name "mitm.proxy";
option domain-name-servers 192.168.56.1;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.56.0 netmask 255.255.255.0 {
option broadcast-address 192.168.56.255;
option routers 192.168.56.1;
range 192.168.56.100 192.168.56.200;
}
Code:
# Flush rules iptables -F iptables -t nat -F PREROUTING iptables -t nat -A POSTROUTING -o eth0 -s 192.168.56.0/24 -j MASQUERADE iptables -A FORWARD -o eth0 -i eth1 -s 192.168.56.0/24 -m cotrack --ctstate NEW -j ACCEPT iptables -A FORWARD -i eth0 -o eth1 -m cotrack --ctstate RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT iptables -t nat -F POSTROUTING iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Code:
fuzz@ubufuzz:~$ sudo iptables -nvL
Chain INPUT (policy ACCEPT 13 packets, 2834 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- eth1 eth0 192.168.56.0/24 0.0.0.0/0 ctstate NEW
0 0 ACCEPT all -- eth0 eth1 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
0 0 ACCEPT all -- eth1 eth0 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 7 packets, 2372 bytes)
pkts bytes target prot opt in out source destination
Code:
fuzz@ubufuzz:~$ sudo iptables -t nat -nvL
Chain PREROUTING (policy ACCEPT 5 packets, 1148 bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 5 packets, 1148 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 3 packets, 988 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 3 packets, 988 bytes)
pkts bytes target prot opt in out source destination
0 0 MASQUERADE all -- * eth0 0.0.0.0/0 0.0.0.0/0
Does anybody have an idea why this isn't working?
برچسب:
نویسنده: استخدام کار