Results 1 to 1 of 1

Thread: Bridging networks in VM

Threaded View

  1. #1
    Just burned his ISO
    Join Date
    May 2011
    Posts
    1

    Question Bridging networks in VM

    I am using BT5 in VirtualBox on my Win7 laptop, and would like to bridge/forward my wifi to my ethernet port (so my 2nd device works as if it is plugged directly into the router) and perform some tests using tcpdump, tc, etc. I need this to work within a VM rather than livebooting as I will be utilizing some Win7 features simultaneously.

    Code:
    Setup:
    
           [Win7 Laptop]
               |    |
              [BT5 VM]
               |    |
           [eth0]--[eth1]
           |            |
        [WiFi]   [Ethernet Port]
           |            |
      [Internet]   [Device 2]
    Within my VM, I've tried using "brctl" to form a bridge (br0), but I lose internet connectivity every time I add eth0 to br0. I've also tried using iptables to forward eth0 to eth1 however I do not know that I am doing this correctly. This is what I have tried so far (separately):

    Code:
    brctl addbr br0
    brctl addif br0 eth0
    brctl addif br0 eth1
    ifconfig br0 up
    Code:
    echo 1 > /proc/sys/net/ipv4/ip_forward
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
    iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
    Neither example works. I am fairly new to linux but I am always trying to learn new things, how computers & networking works, etc, but I have never had the opportunity to go to school for this so I'm sure I'm missing something somewhere. Any help would be greatly appreciated!

    BT5R3 GNOME32
    VirtualBox Adapter 1: Bridged Adapter (wifi card)
    VirtualBox Adapter 2: Bridged Adapter (ethernet port)
    Last edited by rocktheory; 10-09-2012 at 05:05 AM.

Similar Threads

  1. Bridging between interfaces using brctl
    By btrack00 in forum BackTrack 5 Beginners Section
    Replies: 0
    Last Post: 07-24-2012, 09:15 AM
  2. Bridging in Vmware
    By Vagabond in forum OLD BT3final Support
    Replies: 8
    Last Post: 01-24-2009, 06:52 PM
  3. Bridging the Gap
    By theoleek in forum OLD Newbie Area
    Replies: 10
    Last Post: 12-16-2008, 12:08 PM
  4. Bridging a rogue AP and a cpnnection to internet ; possible ?
    By alan-smithee in forum OLD BT3final Support
    Replies: 3
    Last Post: 09-13-2008, 06:15 AM
  5. Bridging and Routing in Monitor mode
    By rooh333 in forum OLD Newbie Area
    Replies: 1
    Last Post: 04-09-2007, 03:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •