Results 1 to 2 of 2

Thread: wlan/eth "bridge" assistance requested!

  1. #1
    Join Date
    2019-Sep
    Posts
    1

    wlan/eth "bridge" assistance requested!

    I have a very technical background and am fairly fluent in networking in general and Windows & Mac OS from 2000 to present. I decided I wanted a new challenge so have been learning Kali/Debian in stages for the past couple of years. I can figure most things out by searching + trial and error but I've been trying to do something specific for the past couple of weeks and cannot seem to get it quite right!

    I'm in a hotel for the next month and want to "bridge" one of the available wifi networks to an ethernet port to provide hardwired connectivity to my network via a Kali box. I can do it in Windows and MacOS all day long but so far have not quite figured out how to make it work with the current release of Kali, I understand that brutils does not natively support true "bridging" between wifi and ethernet (in station mode). I've tried following several write ups but am about to pull what hair I have left out trying to make this work! I think at this point I've read so much that I've thoroughly confused myself so hopefully someone can point me in the right direction.

    My Kali box has 2 ethernet ports and I'm using an Alfa AWUS036NHA USB adapter for wifi connectivity (I also have the Alfa Realtek USB adapter if that chipset/driver combination offers any advantages over the Atheros). It doesn't necessarily need to do DHCP as it's only connecting to one device - the WAN Port of my Ubiquiti USG Pro 4 router. Everything else will connect through one of the LAN ports on the router so I think if I can get bi-directional traffic between wlan0 and eth1 I should be in business.

    I was going to attach a picture of my current network but it won't let me most likely because I'm new to the forums. I gather that will change after I've posted a few times... Currently I'm using an iMac to grab the fastest wifi access point I can find and route it out the Ethernet port which is connected to WAN1 of my router. I didn't think it would be that difficult a thing to replicate in Kali but so far it's kicking my ***!!

    I've found several informative posts including a couple that appear to lay it out step-by-step from start to finish but I must be getting lost somewhere in the middle 'cuz the end result hasn't worked yet. I've also already been on this about 12 hours today so am not sure I could coherently write everything I've tried until I get some rest. In the meantime I'd greatly appreciate any and all assistance in getting this figured out!!

    Thanks in advance!

    BB

  2. #2
    Join Date
    2016-Dec
    Posts
    674
    1. Install HostAPd and create an AP configuration. You have to make sure to have a wireless card that supports AP mode (not all do, check on Wikidevi for the exact make, model, and if present hardware revision). Your particular adapter supports it, with a limitation of 5 devices (physical/firmware limitation).

    2. Set-up iptables to do routing using masquerade (instead of bridging). I don't remember exactly but it's between 1 and 3 lines/commands
    3. Configure a DHCP server.

    Done

    Here is an example config for hostapd:

    interface=wlan0
    driver=nl80211
    ssid=MyESSID
    channel=1
    wpa=2
    wpa_passphrase=passphrase
    wpa_key_mgmt=WPA-PSK
    rsn_pairwise=CCMP
    I don't have the iptables commands or the DHCP server set-up but you can just look for one that works on Debian (10) and it should work just fine. Just FYI, iptables commands are universal and they are the same regardless of the distro you're running.

Similar Threads

  1. Need advice on "Live" versus "Installed" custom builds
    By malakaldayook in forum Building Archive
    Replies: 3
    Last Post: 2017-10-03, 08:54
  2. Bridge utils "add bridge failed"
    By doctor88 in forum NetHunter General Questions
    Replies: 0
    Last Post: 2016-01-30, 01:15

Posting Permissions

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