Results 1 to 4 of 4

Thread: How to setup bridge between wlan0 and eth0

Hybrid View

  1. #1
    Just burned his ISO
    Join Date
    Mar 2010
    Posts
    7

    Question How to setup bridge between wlan0 and eth0

    Hello,

    I have done some research on how to share my wireless connection with the ethernet port on my laptop, but I have ran into some problems and I'm looking for further support.

    I installed backtrack4 on the HDD so it's persistent. I connect to my home router using my wireless card and I want to enable ICS on the ethernet port so I can connect a Fonera router that I have.



    1- Once I boot into backtrack and run ifconfig I see only the l0 interface listed.
    2- I run this command which brings up eth0 and wlan0
    Code:
    /etc/init.d/wicd start
    3- I connect to the internet and able to access all websites. My wlan0 IP is 192.168.1.X
    4- I set a static IP to my eth0 using:
    Code:
    sudo ifconfig eth1 192.168.0.1 subnet 255.255.255.0
    4-1 I checked and I verified that the IP address and subnet are set as I requested
    5- I plug in the Fonera router to the ethernet port and run the following commands in this exact order:
    Code:
    sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
    iptables -X
    iptables -F
    iptables -A FORWARD -i wlan0 -o eth0 -s 192.168.0.0/24 -m state --state NEW -j ACCEPT
    iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
    iptables -A POSTROUTING -t nat -j MASQUERADE
    route del default
    route add default gw 192.168.1.X wlan0
    (where 192.168.1.X is the IP from wlan0)

    Those are all the steps that I followed so far, and so far no luck.
    I noticed that I can't be connected to both the wired and wireless connection at the same time. So if I need to go online I need to go to the wicd manager and connect to the wireless and if I need to access the fonera router I need to connect to wired connection which then disconnects me from the wireless.

    Note: I have gathered this information from different forum posts thanks to google. I am not sure if it applies to BT4 or not
    My questions are:
    What am I missing?
    Am I doing those steps in the right order?
    How can I get to connect to both the wlan0 and eth0 at the same time so I can pass the internet connection to the Fonera on the other end?


    Your feedback is much appreciated.

  2. #2
    Member Mr-Protocol's Avatar
    Join Date
    Jan 2010
    Location
    Ohio
    Posts
    142

    Default Re: How to setup bridge between wlan0 and eth0

    So what you want to do... is have "clients" connect to your Fon router, have the fon wired to your laptop Ethernet port to get internet from your laptop's wifi? If this is correct I have done this... With my own fon/Jasager. Thing is... you have to use wicd to configure your wireless first. Close the GUI and then set a static IP to your eth0 (wired) card. The issue you are having (if you flashed your fon to make a Jasager box) is in the Fon itself. If you are using a Jasager box then consult the hak5 forums. The information is there regardless of what your fon is running because I have posted them there as well as others. Your issue isn't a BT4 related one I feel, sorry.

    But if you flashed your fon with jasager firmware, and you can't get it working... It's the fon settings. Still a bridging issue.. just internal to the fon .
    Last edited by Mr-Protocol; 03-17-2010 at 07:17 AM.

  3. #3
    Just burned his ISO
    Join Date
    Mar 2010
    Posts
    7

    Default

    Hey Mr-Protocol,
    I have read lots of your posts on the hak5 forum about Jasager, and you're right, I'm trying to setup a box to have the clients connect too.

    I think the problem I'm having is not with the fon (at the moment), but with how I'm setting up the bridge between wlan0 (wireless) and eth0 (ethernet). I have tried the steps you wrote in your reply
    Thing is... you have to use wicd to configure your wireless first. Close the GUI and then set a static IP to your eth0 (wired) card.
    and I still can't access the fon while being connected to the internet using wlan0. When I disconnect from the wireless and connect the wired connection through the wicd gui I can access the fon box and I can access webif and Karma, but once I connect to the wireless I lose the connection the ethernet.

    Lets forget about the fon for now. Isn't the idea of having a bridge is maintaining both the wired and wireless at the same time? well that's not happening with me. So far I can only connect to one at a time. I also read somewhere about creating a br0, maybe bridge interface? well after I follow all the steps I listed earlier and in the same order you told me to do, I do a
    Code:
    ifconfig
    and don't see any new interface called br0.

    I honestly think so far the problem I'm having right now is because I'm doing something wrong to do a bridge connection between the wlan0 and eth0.

    Any idea what the problem is? just give me some directions and I will search it in google.
    It seems that I'm unable to maintain a connection to eth0 and wlan0 at the same time.
    Last edited by Archangel-Amael; 03-18-2010 at 06:16 PM.

  4. #4
    Member
    Join Date
    Jan 2010
    Location
    Helsinki, Finland
    Posts
    235

    Default Re: How to setup bridge between wlan0 and eth0

    Hi Im just order FON+ How long did you wait untill you got yours, Im in Finland, so fon delivers it from spain.

    I tried to use D-Link wireless router to share network connection. Ip gives ip and I can join to that wlan, but it doesnt give me internet connection.

    The same happends when I use airbase-ng to create "fake AP" I can join to it, and I get ip address, but no internet connection. So it seems that something is blocking connection with wlan0 and eth0

    Iv tried a lot of things. Can I somehow disable whole firewall to test if firewall is blocking it? or what should I do?

Similar Threads

  1. Eth0 Issues
    By sirwolfgang in forum Beginners Forum
    Replies: 8
    Last Post: 06-17-2010, 10:08 PM
  2. Windows to Linux Ethernet Bridge
    By SilentBronco in forum Beginners Forum
    Replies: 3
    Last Post: 03-02-2010, 10:18 AM
  3. Little help with airmon-ng start wlan0
    By sneja in forum Beginners Forum
    Replies: 3
    Last Post: 03-01-2010, 06:27 PM
  4. No eth0 or wlan0 access in vmware
    By xxxdirtyfrankxxx in forum Beginners Forum
    Replies: 6
    Last Post: 02-19-2010, 06:20 AM
  5. wlan0 error?
    By mixit in forum Beginners Forum
    Replies: 4
    Last Post: 01-31-2010, 08:40 PM

Tags for this Thread

Posting Permissions

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