*(sorry, the previous message is gone a bit fast)*

hi,

where can I get help for this ?

my problem is :

I'm on a corporate network that is filtered (proxy) and I need to run some
tests on a virtual machine that needs to have direct access to the Internet.
I set up this configuration and try to route everything that comes out of
tap0 to wlan0 and then to Internet.

           -                           -
            \                         /
             \                       /
              \                     /
      +--------\-------+   +-------/-------+
      |free GW         |   |corporate GW   |
      |192.168.144.254 |   |10.10.10.254/24| <http://10.10.10.254/24%7C>
      +--------|-------+   +-------|-------+
               \                  /
+---------------|-----------------|------+
|HOST  |wlan0           |  |eth0         |
|      |192.168.144.1/24| <http://192.168.144.1/24%7C>  |10.10.10.1/24|
<http://10.10.10.1/24%7C>
|      +----------------+  +-------------|
|                                        |
|      +-----------------+               |
|      |tap0             |               |
|      |192.168.11.254/24| <http://192.168.11.254/24%7C>               |
|      +--------|--------+               |
|               |                        |
| +-------------|--------+               |
| |VM  |eth0             |               |
| |    |192.168.11.1/24  |               |
| |    +-----------------|               |
| +----------------------+               |
+----------------------------------------+

here are the commands used:

# ip tuntap add tap0 mode tap user me
# ip addr add 192.168.11.254/24 dev tap0
# ip link set tap0 down
# echo 11 tap0 >> /etc/iproute2/rt_tables
# ip rule add from 192.168.11.254 lookup tap0
# ip route add default via 192.168.144.254 dev wlan0 proto dhcp src
192.168.144.1
# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

I can ping 8.8.8.8 from my virtual machine but all traffic (host/corporate)
now seems to flow through wlan0 (tshark -i wlan0)...

regards, lacsaP.

Reply via email to